JingsongLi commented on a change in pull request #12004:
URL: https://github.com/apache/flink/pull/12004#discussion_r422462727
##########
File path:
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HiveTableSource.java
##########
@@ -181,6 +214,47 @@ public boolean isBounded() {
return source.name(explainSource());
}
+ private DataStream<RowData> createStreamSource(
+ StreamExecutionEnvironment execEnv,
+ TypeInformation<RowData> typeInfo,
+ HiveTableInputFormat inputFormat) {
+ final Map<String, String> properties =
catalogTable.getProperties();
+ PartitionFetcherFactory strategyFactory = cl ->
PartitionFetcher.createStrategy(
+
properties.get(HIVE_STREAMING_SOURCE_PARTITION_STRATEGY.key()),
+
properties.get(HIVE_STREAMING_SOURCE_PARTITION_STRATEGY_CLASS.key()),
+ cl);
+
+ String monitorIntervalStr =
properties.get(HIVE_STREAMING_SOURCE_MONITOR_INTERVAL.key());
+ Duration monitorInterval = monitorIntervalStr != null ?
+ TimeUtils.parseDuration(monitorIntervalStr) :
+
HIVE_STREAMING_SOURCE_MONITOR_INTERVAL.defaultValue();
+
+ HiveContinuousMonitoringFunction monitoringFunction = new
HiveContinuousMonitoringFunction(
+ hiveShim,
+ jobConf,
+ tablePath,
+ catalogTable,
+ getStartupPartition(),
+ strategyFactory,
+ execEnv.getParallelism(),
+ monitorInterval.toMillis());
+
+ ContinuousFileReaderOperatorFactory<RowData,
TimestampedHiveInputSplit> factory =
+ new
ContinuousFileReaderOperatorFactory<>(inputFormat);
Review comment:
> we don't do any split inside the file
We will split one file to many splits.
----------------------------------------------------------------
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]