You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2018/01/18 21:06:35 UTC

[GitHub] keith-turner commented on a change in pull request #361: WIP - ACCUMULO-4784 - Create build methods for Connector

keith-turner commented on a change in pull request #361: WIP - ACCUMULO-4784 - Create build methods for Connector
URL: https://github.com/apache/accumulo/pull/361#discussion_r162468005
 
 

 ##########
 File path: core/src/main/java/org/apache/accumulo/core/client/BatchWriterConfig.java
 ##########
 @@ -309,6 +311,36 @@ public boolean equals(Object o) {
     return false;
   }
 
+  public BatchWriterConfig merge(BatchWriterConfig other) {
+    BatchWriterConfig result = new BatchWriterConfig();
+    if (this.maxMemory != null) {
 
 Review comment:
   Could do something like the following here
   
   ```java
   private static<T> T merge(T o1, T o2) {
     if(o1 != null) return o1;
     return o2;
   }
   
   public static BatchWriterConfig merge(BatchWriterConfig other) {
      BatchWriterConfig result = new BatchWriterConfig();
      result.maxMemory = merge(this.maxMemory, other.maxMemory);
   }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services