JingsongLi commented on a change in pull request #18114:
URL: https://github.com/apache/flink/pull/18114#discussion_r776126706
##########
File path:
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HiveDynamicTableFactory.java
##########
@@ -70,13 +72,18 @@ public DynamicTableSink createDynamicTableSink(Context
context) {
// we don't support temporary hive tables yet
if (!isHiveTable || context.isTemporary()) {
- return FactoryUtil.createDynamicTableSink(
- null,
- context.getObjectIdentifier(),
- context.getCatalogTable(),
- context.getConfiguration(),
- context.getClassLoader(),
- context.isTemporary());
+ DynamicTableSink sink =
+ FactoryUtil.createDynamicTableSink(
+ null,
+ context.getObjectIdentifier(),
+ context.getCatalogTable(),
+ context.getConfiguration(),
+ context.getClassLoader(),
+ context.isTemporary());
+ if (sink instanceof RequireCatalogLock) {
+ ((RequireCatalogLock)
sink).setLockFactory(HiveCatalogLock.createFactory(hiveConf));
Review comment:
Now this is an internal interface. If we need lock to be more general,
we can put lock factory into `{@link DynamicTableFactory.Context}`.
--
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]