Github user ijokarumawak commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2518#discussion_r188193956
  
    --- Diff: 
nifi-nar-bundles/nifi-standard-services/nifi-hbase_1_1_2-client-service-bundle/nifi-hbase_1_1_2-client-service/src/main/java/org/apache/nifi/hbase/HBase_1_1_2_ClientService.java
 ---
    @@ -336,51 +346,85 @@ public void shutdown() {
             }
         }
     
    +    private static final byte[] EMPTY_VIS_STRING;
    +
    +    static {
    +        try {
    +            EMPTY_VIS_STRING = "".getBytes("UTF-8");
    +        } catch (UnsupportedEncodingException e) {
    +            throw new RuntimeException(e);
    +        }
    +    }
    +
    +    private List<Put> buildPuts(byte[] rowKey, List<PutColumn> columns) {
    +        List<Put> retVal = new ArrayList<>();
    +
    +        try {
    +            Put put = null;
    +
    +            for (final PutColumn column : columns) {
    --- End diff --
    
    @anoopsjohn Good point. I think you're correct. Bundling columns into the 
same put would be able to reduce the number of Put objects. I wonder how much 
performance gain we can get by doing so. If you are interested in making such 
optimization, please go ahead and create another PR. Before/after benchmarking 
result would be appreciated. Thanks!


---

Reply via email to