collabH commented on a change in pull request #103:
URL: https://github.com/apache/bahir-flink/pull/103#discussion_r553777626



##########
File path: 
flink-connector-kudu/src/main/java/org/apache/flink/connectors/kudu/table/utils/KuduTableUtils.java
##########
@@ -79,10 +80,19 @@ public static KuduTableInfo createTableInfo(String 
tableName, TableSchema schema
             ColumnSchemasFactory schemasFactory = () -> 
toKuduConnectorColumns(columns, keyColumns);
             List<String> hashColumns = getHashColumns(props);
             int replicas = 
Optional.ofNullable(props.get(KuduTableFactory.KUDU_REPLICAS)).map(Integer::parseInt).orElse(1);
+            // if hash partitions nums not exists,default 1;
+            int hashPartitionNums = 
Optional.ofNullable(props.get(KUDU_HASH_PARTITION_NUMS)).map(Integer::parseInt).orElse(3);
+            // if table owner is null,default 'admin';
+            String tableOwner = 
Optional.ofNullable(props.get(KUDU_TABLE_OWNER)).orElse("admin");
+
+            PartialRow lowerRow = new PartialRow(new 
Schema(schemasFactory.getColumnSchemas()));
+            PartialRow upper = new PartialRow(new 
Schema(schemasFactory.getColumnSchemas()));
+
 
             CreateTableOptionsFactory optionsFactory = () -> new 
CreateTableOptions()
                     .setNumReplicas(replicas)
-                    .addHashPartitions(hashColumns, replicas * 2);
+                    .addHashPartitions(hashColumns, hashPartitionNums)

Review comment:
       Instead of hard coding 3, I provide a parameter 'kudu. 
Hash-partition-nums' to support the number of buckets configured in kudu's hash 
partition




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