lirui-apache commented on a change in pull request #13963:
URL: https://github.com/apache/flink/pull/13963#discussion_r519243418



##########
File path: 
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HiveSource.java
##########
@@ -46,29 +58,98 @@
 
        private static final long serialVersionUID = 1L;
 
+       private final JobConfWrapper jobConfWrapper;
+       private final List<String> partitionKeys;
+       private final ContinuousPartitionFetcher<Partition, ?> fetcher;
+       private final HiveTableSource.HiveContinuousPartitionFetcherContext<?> 
fetcherContext;
+       private final ObjectPath tablePath;
+
        HiveSource(
                        JobConf jobConf,
+                       ObjectPath tablePath,
                        CatalogTable catalogTable,
                        List<HiveTablePartition> partitions,
                        @Nullable Long limit,
                        String hiveVersion,
                        boolean useMapRedReader,
-                       boolean isStreamingSource,
+                       @Nullable ContinuousEnumerationSettings 
continuousEnumerationSettings,
+                       ContinuousPartitionFetcher<Partition, ?> fetcher,
+                       
HiveTableSource.HiveContinuousPartitionFetcherContext<?> fetcherContext,
                        RowType producedRowType) {
                super(
                                new org.apache.flink.core.fs.Path[1],
                                new 
HiveSourceFileEnumerator.Provider(partitions, new JobConfWrapper(jobConf)),
-                               DEFAULT_SPLIT_ASSIGNER,
+                               continuousEnumerationSettings == null ? 
DEFAULT_SPLIT_ASSIGNER : SimpleSplitAssigner::new,

Review comment:
       In streaming read, we would want the splits to be consumed in order. The 
`DEFAULT_SPLIT_ASSIGNER` is locality-aware and therefore doesn't meet the 
requirement. But perhaps I should only do this for partitioned table, because 
non-partitioned table still reuse super class's enumerator and the splits are 
not generated in order in the first place.




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

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


Reply via email to