xuefuz commented on a change in pull request #8890: [FLINK-12989][hive]:
Generate HiveTableSink from from a Hive table
URL: https://github.com/apache/flink/pull/8890#discussion_r297768697
##########
File path:
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/batch/connectors/hive/HiveTableFactory.java
##########
@@ -31,13 +32,22 @@
import org.apache.flink.types.Row;
import org.apache.flink.util.Preconditions;
+import org.apache.hadoop.mapred.JobConf;
+
import java.util.List;
import java.util.Map;
+import static org.apache.flink.util.Preconditions.checkNotNull;
+
/**
* A table factory implementation for tables stored in Hive catalog.
*/
public class HiveTableFactory implements TableSourceFactory<Row>,
TableSinkFactory<Row> {
+ private HiveCatalog hiveCatalog;
Review comment:
True. I changed by just passing on HiveConf for now.
However, I think passing on HiveCatalog is beneficial, which could eliminate
the need of instantiating hms client in data connectors. Currently we are a
little inconsistent/incomplete. For instance, HiveCatalog has a public API
getHiveTable, which helps HiveTableSink, but HiveTableSink also lists
partitions from hms client, which HiveCatalog doesn't provide. Potentially we
could add that so dataconnector doesn't depend on hms client any more. I will
leave this for followup discussions and actions.
----------------------------------------------------------------
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]
With regards,
Apache Git Services