sadwitdastreetz commented on code in PR #683:
URL: 
https://github.com/apache/incubator-hugegraph-toolchain/pull/683#discussion_r2445040057


##########
hugegraph-loader/src/main/java/org/apache/hugegraph/loader/HugeGraphLoader.java:
##########
@@ -153,11 +272,286 @@ private void createSchema() {
                 throw new LoadException("Failed to read schema file '%s'", e,
                                         options.schema);
             }
-            groovyExecutor.execute(script, client);
+
+            if (!options.shorterIDConfigs.isEmpty()) {
+                for (ShortIdConfig config : options.shorterIDConfigs) {
+                    PropertyKey propertyKey = 
client.schema().propertyKey(config.getIdFieldName())
+                                                    .ifNotExist()
+                                                    
.dataType(config.getIdFieldType())
+                                                    .build();
+                    client.schema().addPropertyKey(propertyKey);
+                }
+                groovyExecutor.execute(script, client);
+                List<VertexLabel> vertexLabels = 
client.schema().getVertexLabels();
+                for (VertexLabel vertexLabel : vertexLabels) {

Review Comment:
   the client will be closed in the finally blocks in `main()`, included in the 
function `context.close()`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to