public static void persistDummyTable(ObjectOutputStream out) throws IOException { MapJoinPersistableTableContainer tableContainer = new HashMapWrapper(); out.writeUTF(tableContainer.getClass().getName()); out.writeObject(tableContainer.getMetaData()); out.writeInt(tableContainer.size()); }
public static void persistDummyTable(ObjectOutputStream out) throws IOException { MapJoinPersistableTableContainer tableContainer = new HashMapWrapper(); out.writeUTF(tableContainer.getClass().getName()); out.writeObject(tableContainer.getMetaData()); out.writeInt(tableContainer.size()); }
private static MapJoinTableContainer getDefaultEmptyContainer(MapJoinObjectSerDeContext keyCtx, MapJoinObjectSerDeContext valCtx) throws SerDeException { MapJoinTableContainer container = new HashMapWrapper(); container.setSerde(keyCtx, valCtx); container.seal(); return container; } }
private static MapJoinTableContainer getDefaultEmptyContainer(Configuration hconf, MapJoinObjectSerDeContext keyCtx, MapJoinObjectSerDeContext valCtx) throws SerDeException { boolean useOptimizedContainer = HiveConf.getBoolVar( hconf, HiveConf.ConfVars.HIVEMAPJOINUSEOPTIMIZEDTABLE); if (useOptimizedContainer) { return new MapJoinBytesTableContainer(hconf, valCtx, -1, 0); } MapJoinTableContainer container = new HashMapWrapper(); container.setSerde(keyCtx, valCtx); container.seal(); return container; } }
@Before public void setup() throws Exception { rowContainer = new MapJoinEagerRowContainer(); rowContainer.addRow(VALUE); container = new HashMapWrapper(); } @Test
@Before public void setup() throws Exception { key = new MapJoinKeyObject(KEY); rowContainer = new MapJoinEagerRowContainer(); rowContainer.addRow(VALUE); baos = new ByteArrayOutputStream(); out = new ObjectOutputStream(baos); LazyBinarySerDe keySerde = new LazyBinarySerDe(); Properties keyProps = new Properties(); keyProps.put(serdeConstants.LIST_COLUMNS, "v1"); keyProps.put(serdeConstants.LIST_COLUMN_TYPES, "string"); SerDeUtils.initializeSerDe(keySerde, null, keyProps, null); LazyBinarySerDe valueSerde = new LazyBinarySerDe(); Properties valueProps = new Properties(); valueProps.put(serdeConstants.LIST_COLUMNS, "v1"); valueProps.put(serdeConstants.LIST_COLUMN_TYPES, "string"); SerDeUtils.initializeSerDe(valueSerde, null, keyProps, null); containerSerde = new MapJoinTableContainerSerDe( new MapJoinObjectSerDeContext(keySerde, false), new MapJoinObjectSerDeContext(valueSerde, false)); container = new HashMapWrapper(); }
tableContainer = new HashMapWrapper(hconf, keyCount);
tableContainer = new HashMapWrapper(hconf, keyCount);
continue; mapJoinTables[pos] = new HashMapWrapper(hconf, -1); TableDesc valueTableDesc = conf.getValueTblFilteredDescs().get(pos); AbstractSerDe valueSerDe = (AbstractSerDe) ReflectionUtils.newInstance(valueTableDesc.getDeserializerClass(), null);
continue; mapJoinTables[pos] = new HashMapWrapper(hconf, -1); TableDesc valueTableDesc = conf.getValueTblFilteredDescs().get(pos); AbstractSerDe valueSerDe = (AbstractSerDe) ReflectionUtils.newInstance(valueTableDesc.getDeserializerClass(), null);
new HashMapWrapper( testDesc.hiveConf, -1) : new MapJoinBytesTableContainer(
public static void persistDummyTable(ObjectOutputStream out) throws IOException { MapJoinPersistableTableContainer tableContainer = new HashMapWrapper(); out.writeUTF(tableContainer.getClass().getName()); out.writeObject(tableContainer.getMetaData()); out.writeInt(tableContainer.size()); }
@Override protected void initializeOp(Configuration hconf) throws HiveException { super.initializeOp(hconf); maxMapJoinSize = HiveConf.getIntVar(hconf, HiveConf.ConfVars.HIVEMAXMAPJOINSIZE); metadataValueTag = new int[numAliases]; for (int pos = 0; pos < numAliases; pos++) { metadataValueTag[pos] = -1; } metadataKeyTag = -1; bigTableAlias = order[posBigTable]; mapJoinTables = new HashMap<Byte, HashMapWrapper<AbstractMapJoinKey, MapJoinObjectValue>>(); rowContainerMap = new HashMap<Byte, MapJoinRowContainer<ArrayList<Object>>>(); // initialize the hash tables for other tables for (int pos = 0; pos < numAliases; pos++) { if (pos == posBigTable) { continue; } HashMapWrapper<AbstractMapJoinKey, MapJoinObjectValue> hashTable = new HashMapWrapper<AbstractMapJoinKey, MapJoinObjectValue>(); mapJoinTables.put(Byte.valueOf((byte) pos), hashTable); MapJoinRowContainer<ArrayList<Object>> rowContainer = new MapJoinRowContainer<ArrayList<Object>>(); rowContainerMap.put(Byte.valueOf((byte) pos), rowContainer); } }
new HashMapWrapper<AbstractMapJoinKey, MapJoinObjectValue>();
HashMapWrapper<AbstractMapJoinKey, MapJoinObjectValue> hashTable = new HashMapWrapper<AbstractMapJoinKey, MapJoinObjectValue>( hashTableThreshold, hashTableLoadFactor, hashTableMaxMemoryUsage);
memory, desc.getParentDataSizes().get(pos), nwayConf) : new MapJoinBytesTableContainer(hconf, valCtx, keyCount, 0)) : new HashMapWrapper(hconf, keyCount); LOG.info("Using tableContainer " + tableContainer.getClass().getSimpleName());
continue; mapJoinTables[pos] = new HashMapWrapper(hconf, -1); TableDesc valueTableDesc = conf.getValueTblFilteredDescs().get(pos); SerDe valueSerDe = (SerDe) ReflectionUtils.newInstance(valueTableDesc.getDeserializerClass(), null);