imbajin commented on code in PR #704:
URL: 
https://github.com/apache/incubator-hugegraph-toolchain/pull/704#discussion_r2704459940


##########
hugegraph-loader/src/main/java/org/apache/hugegraph/loader/executor/LoadOptions.java:
##########
@@ -165,21 +169,31 @@ public final class LoadOptions implements Cloneable {
     public int singleInsertThreads = 8;
 
     @Parameter(names = {"--max-conn"}, arity = 1,
-               description = "Max number of HTTP connections to server")
-    public int maxConnections = CPUS * 4;
+               validateWith = {PositiveValidator.class},
+               description = "Max number of HTTP connections to server. " +
+                             "If left as default and batch-insert-threads is " 
+
+                             "set, this may be auto-adjusted")
+    public int maxConnections = DEFAULT_MAX_CONNECTIONS;
 
     @Parameter(names = {"--max-conn-per-route"}, arity = 1,
-               description = "Max number of HTTP connections to each route")
-    public int maxConnectionsPerRoute = CPUS * 2;
+               validateWith = {PositiveValidator.class},
+               description = "Max number of HTTP connections to each route. " +
+                             "If left as default and batch-insert-threads is " 
+
+                             "set, this may be auto-adjusted")
+    public int maxConnectionsPerRoute = DEFAULT_MAX_CONNECTIONS_PER_ROUTE;
 
     @Parameter(names = {"--batch-size"}, arity = 1,
                validateWith = {PositiveValidator.class},
                description = "The number of lines in each submit")
     public int batchSize = 500;
 
-    @Parameter(names = {"--parallel-count"}, arity = 1,
-            description = "The number of parallel read pipelines")
-    public int parallelCount = 1;
+    @Parameter(names = {"--parallel-count", "--parser-threads"}, arity = 1,

Review Comment:
   🧹 **Minor - 参数名弃用处理不完整**
   
   使用 `--parallel-count` 和 `--parser-threads` 作为别名,但缺少弃用警告。
   
   **建议改进:**
   添加弃用日志提醒用户迁移到新参数名:
   
   ```java
   // 在 parseOptions 方法中添加
   if (Arrays.asList(args).contains("--parallel-count")) {
       LOG.warn("Parameter --parallel-count is deprecated, " +
                "please use --parser-threads instead");
   }
   ```
   
   这样可以:
   1. 平滑过渡,不破坏现有脚本
   2. 引导用户使用新参数名
   3. 为将来完全移除旧参数名做准备



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