@Override public void collect(BytesWritable key, BytesWritable value) throws IOException { if (!key.equals(this.key)) { this.key = key; values.clear(); } values.add(value); } }
if (handleGroupKey && !keyWritable.equals(this.groupKey)) {
if (!keyWritable.equals(groupKey)) {
if (!keyWritable.equals(groupKey)) {
if (!keyWritable.equals(groupKey)) {
@Test public void testSimple() throws Exception { // Create KV result cache object, add one (k,v) pair and retrieve them. HiveKVResultCache cache = new HiveKVResultCache(); HiveKey key = new HiveKey("key".getBytes(), "key".hashCode()); BytesWritable value = new BytesWritable("value".getBytes()); cache.add(key, value); assertTrue("KV result cache should have at least one element", cache.hasNext()); Tuple2<HiveKey, BytesWritable> row = cache.next(); assertTrue("Incorrect key", row._1().equals(key)); assertTrue("Incorrect value", row._2().equals(value)); assertTrue("Cache shouldn't have more records", !cache.hasNext()); }
if (handleGroupKey && !keyWritable.equals(this.groupKey)) {
if (handleGroupKey && !keyWritable.equals(this.groupKey)) {
if (!keyWritable.equals(groupKey)) {
groupKey = new BytesWritable(); } else { isKeyChange = !keyWritable.equals(groupKey);
equals(((BinaryObjectInspector) oi2).getPrimitiveWritableObject(o2));
if (key.equals(prevKey)) { for (IntWritable value : values) { prevSupport += value.get();
if (handleGroupKey && !keyWritable.equals(this.groupKey)) {
if (!keyWritable.equals(groupKey)) {
if (handleGroupKey && !keyWritable.equals(this.groupKey)) {
if (!keyWritable.equals(groupKey)) {
equals(((BinaryObjectInspector) oi2).getPrimitiveWritableObject(o2));
equals(((BinaryObjectInspector) oi2).getPrimitiveWritableObject(o2));
equals(((BinaryObjectInspector) oi2).getPrimitiveWritableObject(o2));
equals(((BinaryObjectInspector) oi2).getPrimitiveWritableObject(o2));