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

    https://github.com/apache/incubator-phoenix/pull/14#discussion_r10315962
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/client/GenericKeyValueBuilder.java
 ---
    @@ -27,55 +20,69 @@
     import org.apache.hadoop.hbase.util.Bytes;
     
     /**
    - * {@link KeyValueBuilder} that does simple byte[] copies to build the 
underlying key-value. This is
    - * exactly the same behavior as currently used in {@link Delete} and 
{@link Put}.
    + * {@link KeyValueBuilder} that does simple byte[] copies to build the 
underlying key-value. This is exactly the same
    + * behavior as currently used in {@link Delete} and {@link Put}.
      */
     public class GenericKeyValueBuilder extends KeyValueBuilder {
     
    -  public static final KeyValueBuilder INSTANCE = new 
GenericKeyValueBuilder();
    +    public static final KeyValueBuilder INSTANCE = new 
GenericKeyValueBuilder();
     
    -  private GenericKeyValueBuilder() {
    -    // private ctor for singleton
    -  }
    +    private GenericKeyValueBuilder() {
    +        // private ctor for singleton
    +    }
     
    -  @Override
    -  public KeyValue buildPut(ImmutableBytesWritable row, 
ImmutableBytesWritable family,
    -      ImmutableBytesWritable qualifier, long ts, ImmutableBytesWritable 
value) {
    -    return build(row, family, qualifier, ts, Type.Put, value);
    -  }
    +    @Override
    +    public KeyValue buildPut(ImmutableBytesWritable row, 
ImmutableBytesWritable family,
    +            ImmutableBytesWritable qualifier, long ts, 
ImmutableBytesWritable value) {
    +        return build(row, family, qualifier, ts, Type.Put, value);
    +    }
     
    -  @Override
    -  public KeyValue buildDeleteFamily(ImmutableBytesWritable row, 
ImmutableBytesWritable family,
    -      ImmutableBytesWritable qualifier, long ts) {
    -    return build(row, family, qualifier, ts, Type.DeleteFamily, null);
    -  }
    +    @Override
    +    public KeyValue buildDeleteFamily(ImmutableBytesWritable row, 
ImmutableBytesWritable family,
    +            ImmutableBytesWritable qualifier, long ts) {
    +        return build(row, family, qualifier, ts, Type.DeleteFamily, null);
    +    }
     
    -  @Override
    -  public KeyValue buildDeleteColumns(ImmutableBytesWritable row, 
ImmutableBytesWritable family,
    -      ImmutableBytesWritable qualifier, long ts) {
    -    return build(row, family, qualifier, ts, Type.DeleteColumn, null);
    -  }
    +    @Override
    +    public KeyValue buildDeleteColumns(ImmutableBytesWritable row, 
ImmutableBytesWritable family,
    +            ImmutableBytesWritable qualifier, long ts) {
    +        return build(row, family, qualifier, ts, Type.DeleteColumn, null);
    +    }
     
    -  @Override
    -  public KeyValue buildDeleteColumn(ImmutableBytesWritable row, 
ImmutableBytesWritable family,
    +    @Override
    +    public KeyValue buildDeleteColumn(ImmutableBytesWritable row, 
ImmutableBytesWritable family,
                 ImmutableBytesWritable qualifier, long ts) {
    -    return build(row, family, qualifier, ts, Type.Delete, null);
    -  }
    +        return build(row, family, qualifier, ts, Type.Delete, null);
    +    }
    +
    +    private KeyValue build(ImmutableBytesWritable row, 
ImmutableBytesWritable family, ImmutableBytesWritable qualifier,
    +            long ts, KeyValue.Type type, ImmutableBytesWritable value) {
    +        return new KeyValue(copyBytesIfNecessary(row), 
copyBytesIfNecessary(family), copyBytesIfNecessary(qualifier),
    +                ts, type, value == null ? null : 
copyBytesIfNecessary(value));
    +    }
    +
    +    @Override
    --- End diff --
    
    These two methods are new


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to