javeme commented on code in PR #252:
URL: 
https://github.com/apache/incubator-hugegraph-computer/pull/252#discussion_r1215504968


##########
computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/BspBase.java:
##########
@@ -42,6 +43,8 @@ public BspBase(Config config) {
         this.config = config;
 
         this.jobId = config.get(ComputerOptions.JOB_ID);
+        String jobNamespace = config.get(ComputerOptions.JOB_NAMESPACE);
+        this.namespace = this.constructPath(null, jobNamespace,this.jobId);

Review Comment:
   can we move to line 65 for more clear logic?
   and expect a space after "jobNamespace,".



##########
computer-core/src/main/java/org/apache/hugegraph/computer/core/bsp/BspBase.java:
##########
@@ -124,7 +127,9 @@ public final long logInterval() {
     protected String constructPath(BspEvent event, Object... paths) {
         StringBuilder sb = new StringBuilder();
         // TODO: replace event.code() with event.name()
-        sb.append(event.name());
+        if (event != null) {
+            sb.append(event.name());

Review Comment:
   keep the `TODO: replace...` comment adjacent to the `event.name()` code



##########
computer-api/src/main/java/org/apache/hugegraph/computer/core/config/ComputerOptions.java:
##########
@@ -420,6 +420,14 @@ public static synchronized ComputerOptions instance() {
                     10000
             );
 
+    public static final ConfigOption<String> JOB_NAMESPACE =
+            new ConfigOption<>(
+                    "job.namespace",
+                    "The job namespace can seperate different data source.",
+                    disallowEmpty(),
+                    "default"

Review Comment:
   empty string "" is ok



-- 
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