@Test public void testGroupbyKey(){ GroupbyKey key1 = new GroupbyKey(); Assert.assertEquals(0, key1.getValue().size()); key1.addValue(new byte[]{1, 3, 5}); Assert.assertEquals(1, key1.getValue().size()); key1.clear(); Assert.assertEquals(0, key1.getValue().size()); key1.addValue(new byte[]{1, 3, 5}); GroupbyKey key2 = new GroupbyKey(); key2.addValue(new byte[]{1, 3, 5}); Assert.assertEquals(key1, key2); GroupbyKey key3 = new GroupbyKey(key1); Assert.assertEquals(key1, key3); Assert.assertEquals(key2, key3); }
public GroupbyKey(){ this.value = new WritableList<BytesWritable>(BytesWritable.class); }
GroupbyKey implements Writable { public GroupbyKey(){ this.value = new WritableList<BytesWritable>(BytesWritable.class); } }
GroupbyKey implements Writable { public GroupbyKey(){ this.value = new WritableList<BytesWritable>(BytesWritable.class); } GroupbyKey();  GroupbyKey(GroupbyKey key);  GroupbyKey(List<byte[]> bytes); }
GroupbyKey implements Writable { public GroupbyKey(){ this.value = new WritableList<BytesWritable>(BytesWritable.class); } GroupbyKey();  GroupbyKey(GroupbyKey key);  GroupbyKey(List<byte[]> bytes); void addValue(byte[] value); void addAll(List<BytesWritable> list); List<BytesWritable> getValue(); void clear(); @Override boolean equals(Object obj); @Override int hashCode(); @Override void write(DataOutput out); @Override void readFields(DataInput in); }
GroupbyKey implements Writable { public GroupbyKey(){ this.value = new WritableList<BytesWritable>(BytesWritable.class); } GroupbyKey();  GroupbyKey(GroupbyKey key);  GroupbyKey(List<byte[]> bytes); void addValue(byte[] value); void addAll(List<BytesWritable> list); List<BytesWritable> getValue(); void clear(); @Override boolean equals(Object obj); @Override int hashCode(); @Override void write(DataOutput out); @Override void readFields(DataInput in);  }