You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "Hisoka-X (via GitHub)" <gi...@apache.org> on 2023/08/26 10:42:48 UTC

[GitHub] [seatunnel] Hisoka-X commented on a diff in pull request #5234: [Improve][hbase] The specified column is written to the specified column family

Hisoka-X commented on code in PR #5234:
URL: https://github.com/apache/seatunnel/pull/5234#discussion_r1306396869


##########
seatunnel-connectors-v2/connector-hbase/src/main/java/org/apache/seatunnel/connectors/seatunnel/hbase/sink/HbaseSinkWriter.java:
##########
@@ -128,8 +129,13 @@ private Put convertRowToPut(SeaTunnelRow row) {
                         .collect(Collectors.toList());
         for (Integer writeColumnIndex : writeColumnIndexes) {
             String fieldName = seaTunnelRowType.getFieldName(writeColumnIndex);
-            String familyName =
-                    hbaseParameters.getFamilyNames().getOrDefault(fieldName, defaultFamilyName);
+            // This is the family of columns that we define to be written through the.conf file
+            Map<String, String> configurationFamilyNames = hbaseParameters.getFamilyNames();
+            String familyName = configurationFamilyNames.getOrDefault(fieldName, defaultFamilyName);
+            if (!configurationFamilyNames.containsKey(ALL_COLUMNS)

Review Comment:
   Maybe you should add test case for this.



-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org