zhuzhurk commented on code in PR #24962:
URL: https://github.com/apache/flink/pull/24962#discussion_r1650686355


##########
flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/connectors/hive/HiveSourceTest.java:
##########
@@ -202,14 +195,16 @@ void testDynamicParallelismInferenceWithFiltering() 
throws Exception {
                                                                 
tablePath.getDatabaseName(),
                                                                 
tablePath.getObjectName(),
                                                                 new 
LinkedHashMap<>(spec)))
-                                        .collect(Collectors.toList()))
-                        .buildWithDefaultBulkFormat();
+                                        .collect(Collectors.toList()));
+        if (limit != null) {

Review Comment:
   It's better to use `long` and use `-1` to represent `no limit`.



##########
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HiveDynamicParallelismInferenceFactory.java:
##########
@@ -62,6 +62,18 @@ public HiveParallelismInference create() {
                                         globalMaxParallelism),
                         globalMaxParallelism);
         int parallelism = ExecutionConfig.PARALLELISM_DEFAULT;
+        reSetInferMaxParallelism(jobConf, inferMaxParallelism);
         return new HiveParallelismInference(tablePath, infer, 
inferMaxParallelism, parallelism);
     }
+
+    /**
+     * Reset infer source max parallelism in jobConf, and {@link
+     * HiveSourceFileEnumerator#createInputSplits} will infer InputSplits 
based on the
+     * inferMaxParallelism.
+     */
+    private void reSetInferMaxParallelism(JobConf jobConf, int 
inferMaxParallelism) {

Review Comment:
   reSetInferMaxParallelism -> adjustInferMaxParallelism



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

Reply via email to