wuchong commented on a change in pull request #14536:
URL: https://github.com/apache/flink/pull/14536#discussion_r557074319



##########
File path: 
flink-connectors/flink-connector-hbase-1.4/src/main/java/org/apache/flink/connector/hbase1/HBase1DynamicTableFactory.java
##########
@@ -74,13 +72,13 @@ public DynamicTableSource createDynamicTableSource(Context 
context) {
         validatePrimaryKey(tableSchema);
         validateTableSourceOptions(tableOptions);

Review comment:
       We don't need this, this has been checked in 
`helper.validateExcept(PROPERTIES_PREFIX)`.
   
   

##########
File path: 
flink-connectors/flink-connector-hbase-2.2/src/test/java/org/apache/flink/connector/hbase2/HBaseDynamicTableFactoryTest.java
##########
@@ -181,6 +185,25 @@ public void testTableSinkFactory() {
                 new DataType[] {DECIMAL(10, 3), TIMESTAMP(3), DATE(), TIME()},
                 hbaseSchema.getQualifierDataTypes("f4"));
 
+        // verify hadoop Configuration
+        org.apache.hadoop.conf.Configuration expectedConfiguration =
+                HBaseConfigurationUtil.getHBaseConfiguration();
+        expectedConfiguration.set(HConstants.ZOOKEEPER_QUORUM, 
"localhost:2181");
+        expectedConfiguration.set(HConstants.ZOOKEEPER_ZNODE_PARENT, "/flink");
+        expectedConfiguration.set("hbase.security.authentication", "kerberos");
+        Map<String, String> expectedProperties =

Review comment:
       ditto.

##########
File path: 
flink-connectors/flink-connector-hbase-1.4/src/test/java/org/apache/flink/connector/hbase1/HBaseDynamicTableFactoryTest.java
##########
@@ -181,6 +185,25 @@ public void testTableSinkFactory() {
                 new DataType[] {DECIMAL(10, 3), TIMESTAMP(3), DATE(), TIME()},
                 hbaseSchema.getQualifierDataTypes("f4"));
 
+        // verify hadoop Configuration
+        org.apache.hadoop.conf.Configuration expectedConfiguration =
+                HBaseConfigurationUtil.getHBaseConfiguration();
+        expectedConfiguration.set(HConstants.ZOOKEEPER_QUORUM, 
"localhost:2181");
+        expectedConfiguration.set(HConstants.ZOOKEEPER_ZNODE_PARENT, "/flink");
+        expectedConfiguration.set("hbase.security.authentication", "kerberos");
+        Map<String, String> expectedProperties =
+                Lists.newArrayList(expectedConfiguration.iterator()).stream()
+                        .collect(Collectors.toMap(Map.Entry::getKey, 
Map.Entry::getValue));

Review comment:
       We can directly construct the expected Map.




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