Radeity commented on code in PR #252:
URL:
https://github.com/apache/incubator-hugegraph-computer/pull/252#discussion_r1216712217
##########
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.",
+ null,
+ "default"
Review Comment:
If we set it null, value.getClass() will throw exeception.
```java
public ConfigOption(String name, String desc, Predicate<T> pred, T value) {
this(name, false, desc, pred, (Class<T>) value.getClass(), value);
}
```
If we set it "", default path will be `//local_001`, can we add a non-null
judgement in `constructPath`? Like:
```java
protected String constructPath(BspEvent event, Object... paths) {
StringBuilder sb = new StringBuilder();
if (event != null) {
// TODO: replace event.code() with event.name()
sb.append(event.name());
}
for (Object path : paths) {
if (!StringUtils.isEmpty(path.toString())) {
sb.append("/").append(path);
}
}
return sb.toString();
}
```
--
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]