ferenc-csaky commented on code in PR #36:
URL: 
https://github.com/apache/flink-connector-hbase/pull/36#discussion_r1447787469


##########
flink-connector-hbase-base/src/main/java/org/apache/flink/connector/hbase/sink/RowDataToMutationConverter.java:
##########
@@ -43,23 +43,26 @@ public class RowDataToMutationConverter implements 
HBaseMutationConverter<RowDat
     private final TimestampMetadata timestampMetadata;
     private final TimeToLiveMetadata timeToLiveMetadata;
     private transient HBaseSerde serde;
+    private final boolean dynamicTable;

Review Comment:
   nit: Can we move the new field above `serde` to keep the grouping of the 
`private final` fields?



##########
flink-connector-hbase-base/src/main/java/org/apache/flink/connector/hbase/table/HBaseConnectorOptions.java:
##########
@@ -60,6 +60,12 @@ public class HBaseConnectorOptions {
                             "Representation for null values for string fields. 
HBase source and "
                                     + "sink encodes/decodes empty bytes as 
null values for all types except string type.");
 
+    public static final ConfigOption<Boolean> DYNAMIC_TABLE =
+            ConfigOptions.key("dynamic.table")

Review Comment:
   I think `dynamic-table` would comply more to the other similar options like 
`null-string-literal` or `table-name`.



##########
flink-connector-hbase-base/src/main/java/org/apache/flink/connector/hbase/util/HBaseSerde.java:
##########


Review Comment:
   At this point I think it would worth to make `HBaseSerde` to an abstract 
class, e.g. `BaseHBaseSerde` (or `AbstractHBaseSerde`, cause base HBase sounds 
a bit weird) , which contains any common logic and introduce 2 child classes 
(for example `DefaultHBaseSerde` and `DynamicHBaseSerde`) that cointains the 
different implementations where it makes sense.
   
   Furthermore, I would add an error msg constant and use that message in the 
thrown `UnsupportedOperationException`s to make it more meaningful and explicit.



##########
flink-connector-hbase-2.2/src/main/java/org/apache/flink/connector/hbase2/HBase2DynamicTableFactory.java:
##########
@@ -121,6 +122,7 @@ public DynamicTableSink createDynamicTableSink(Context 
context) {
         validatePrimaryKey(context.getPhysicalRowDataType(), 
context.getPrimaryKeyIndexes());
 
         String tableName = tableOptions.get(TABLE_NAME);
+        boolean dynamicTable = tableOptions.get(DYNAMIC_TABLE);

Review Comment:
   This variable is unused, can be removed.



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

Reply via email to