@Override public MapJoinKey putRow(Writable currentKey, Writable currentValue) throws SerDeException, HiveException, IOException { // We are not using the key and value contexts, nor do we support a MapJoinKey. vectorMapJoinFastHashTable.putRow((BytesWritable) currentKey, (BytesWritable) currentValue); return null; }
public VectorMapJoinFastHashTable( boolean isFullOuter, int initialCapacity, float loadFactor, int writeBuffersSize, long estimatedKeyCount) { this.isFullOuter = isFullOuter; initialCapacity = (Long.bitCount(initialCapacity) == 1) ? initialCapacity : nextHighestPowerOfTwo(initialCapacity); validateCapacity(initialCapacity); this.estimatedKeyCount = estimatedKeyCount; logicalHashBucketCount = initialCapacity; logicalHashBucketMask = logicalHashBucketCount - 1; resizeThreshold = (int)(logicalHashBucketCount * loadFactor); this.loadFactor = loadFactor; this.writeBuffersSize = writeBuffersSize; }
@Override public int size() { return vectorMapJoinFastHashTable.size(); }
@Override public long getEstimatedMemorySize() { long size = 0; size += super.getEstimatedMemorySize(); size += unsafeReadPos == null ? 0 : unsafeReadPos.getEstimatedMemorySize(); size += JavaDataModel.get().lengthForLongArrayOfSize(slots.length); return size; } }
@Override public long getEstimatedMemorySize() { JavaDataModel jdm = JavaDataModel.get(); long size = 0; size += vectorMapJoinFastHashTable.getEstimatedMemorySize(); size += (4 * jdm.primitive1()); size += (2 * jdm.object()); size += (jdm.primitive2()); return size; }
public VectorMapJoinFastHashTable( int initialCapacity, float loadFactor, int writeBuffersSize, long estimatedKeyCount) { initialCapacity = (Long.bitCount(initialCapacity) == 1) ? initialCapacity : nextHighestPowerOfTwo(initialCapacity); validateCapacity(initialCapacity); this.estimatedKeyCount = estimatedKeyCount; logicalHashBucketCount = initialCapacity; logicalHashBucketMask = logicalHashBucketCount - 1; resizeThreshold = (int)(logicalHashBucketCount * loadFactor); this.loadFactor = loadFactor; this.writeBuffersSize = writeBuffersSize; }
@Override public MapJoinKey putRow(Writable currentKey, Writable currentValue) throws SerDeException, HiveException, IOException { // We are not using the key and value contexts, nor do we support a MapJoinKey. vectorMapJoinFastHashTable.putRow((BytesWritable) currentKey, (BytesWritable) currentValue); return null; }
@Override public int size() { return vectorMapJoinFastHashTable.size(); }
@Override public long getEstimatedMemorySize() { JavaDataModel jdm = JavaDataModel.get(); long size = super.getEstimatedMemorySize(); size += slotPairs == null ? 0 : jdm.lengthForLongArrayOfSize(slotPairs.length); size += (2 * jdm.primitive2()); size += (2 * jdm.primitive1()); size += jdm.object(); // adding 16KB constant memory for keyBinarySortableDeserializeRead as the rabit hole is deep to implement // MemoryEstimate interface, also it is constant overhead size += (16 * 1024L); return size; } }
public VectorMapJoinFastHashTable( int initialCapacity, float loadFactor, int writeBuffersSize) { initialCapacity = (Long.bitCount(initialCapacity) == 1) ? initialCapacity : nextHighestPowerOfTwo(initialCapacity); validateCapacity(initialCapacity); logicalHashBucketCount = initialCapacity; logicalHashBucketMask = logicalHashBucketCount - 1; resizeThreshold = (int)(logicalHashBucketCount * loadFactor); this.loadFactor = loadFactor; this.writeBuffersSize = writeBuffersSize; } }
map.putRow(keyWritable, valueWritable);
TypeInfo[] valueTypeInfos, boolean doClipping, boolean useExactBytes, Random random) throws IOException { int mapSize = map.size(); if (mapSize != count) { TestCase.fail("map.size() does not match expected count");
@Override public MapJoinKey putRow(MapJoinObjectSerDeContext keyContext, Writable currentKey, MapJoinObjectSerDeContext valueContext, Writable currentValue) throws SerDeException, HiveException, IOException { // We are not using the key and value contexts, nor do we support a MapJoinKey. VectorMapJoinFastHashTable.putRow((BytesWritable) currentKey, (BytesWritable) currentValue); return null; }