@Override public MapJoinKey putRow(Writable currentKey, Writable currentValue) throws SerDeException, HiveException { MapJoinKey key = MapJoinKey.read(output, keyContext, currentKey); FlatRowContainer values = (FlatRowContainer)get(key); if (values == null) { values = new FlatRowContainer(); put(key, values); } values.add(valueContext, (BytesWritable)currentValue); return key; }
@Override public MapJoinKey putRow(Writable currentKey, Writable currentValue) throws SerDeException, HiveException { MapJoinKey key = MapJoinKey.read(output, keyContext, currentKey); FlatRowContainer values = (FlatRowContainer)get(key); if (values == null) { values = new FlatRowContainer(); put(key, values); } values.add(valueContext, (BytesWritable)currentValue); return key; }
@Test public void testContainerBasics() throws Exception { container.put(KEY1, rowContainer); container.put(KEY2, rowContainer); container.put(KEY3, rowContainer); container.put(KEY4, rowContainer); Assert.assertEquals(4, container.size()); Map<MapJoinKey, MapJoinRowContainer> localContainer = new HashMap<MapJoinKey, MapJoinRowContainer>(); for(Entry<MapJoinKey, MapJoinRowContainer> entry : container.entrySet()) { localContainer.put(entry.getKey(), entry.getValue()); } Utilities.testEquality(container.get(KEY1), localContainer.get(KEY1)); Utilities.testEquality(container.get(KEY2), localContainer.get(KEY2)); Utilities.testEquality(container.get(KEY3), localContainer.get(KEY3)); Utilities.testEquality(container.get(KEY4), localContainer.get(KEY4)); container.clear(); Assert.assertEquals(0, container.size()); Assert.assertTrue(container.entrySet().isEmpty()); } }
@Override public MapJoinKey putRow(MapJoinObjectSerDeContext keyContext, Writable currentKey, MapJoinObjectSerDeContext valueContext, Writable currentValue) throws SerDeException, HiveException { MapJoinKey key = MapJoinKey.read(output, keyContext, currentKey); FlatRowContainer values = (FlatRowContainer)get(key); if (values == null) { values = new FlatRowContainer(); put(key, values); } values.add(valueContext, (BytesWritable)currentValue); return key; }
if (pos.intValue() != tag) { MapJoinObjectValue o = mapJoinTables.get(pos).get(key); MapJoinRowContainer<ArrayList<Object>> rowContainer = rowContainerMap.get(pos);
.get((byte) tag); MapJoinObjectValue o = hashTable.get(keyMap); MapJoinRowContainer<Object[]> res = null;