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



##########
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:
       What I mean is that previously the default number of hashpartitions was 
replicas * 2, now if the new option is not specified it falls back to a default 
of 3




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to