@Override public void putRow(BytesWritable currentKey, BytesWritable currentValue) throws HiveException, IOException { if (!stringCommon.adaptPutRow(this, currentKey, currentValue)) { // Ignore NULL keys, except for FULL OUTER. if (isFullOuter) { addFullOuterNullKeyValue(currentValue); } } }
@Override public long getEstimatedMemorySize() { long size = super.getEstimatedMemorySize(); size += hashMultiSetStore.getEstimatedMemorySize(); return size; } }
@Override public long getEstimatedMemorySize() { long size = super.getEstimatedMemorySize(); size += hashMapStore.getEstimatedMemorySize(); return size; } }
private void verifyOne(VectorMapJoinFastLongHashMap map, int index, MatchTracker matchTracker) { FastLongHashMapElement element = array[index]; long longKey = element.getKey(); List<byte[]> values = element.getValues(); VectorMapJoinHashMapResult hashMapResult = map.createHashMapResult(); JoinUtil.JoinResult joinResult = map.lookup(longKey, hashMapResult, matchTracker); if (joinResult != JoinUtil.JoinResult.MATCH) { assertTrue(false); } verifyHashMapValues(hashMapResult, values); }
private void verifyOne(VectorMapJoinFastBytesHashMap map, int index, MatchTracker matchTracker) { FastBytesHashMapElement element = array[index]; byte[] key = element.getKey(); List<byte[]> values = element.getValues(); VectorMapJoinHashMapResult hashMapResult = map.createHashMapResult(); JoinUtil.JoinResult joinResult = map.lookup(key, 0, key.length, hashMapResult, matchTracker); if (joinResult != JoinUtil.JoinResult.MATCH) { assertTrue(false); } verifyHashMapValues(hashMapResult, values); }
@Override public void init() { super.init(); noMore = false; keyIsNull = false; nonMatchedHashMapResult = new VectorMapJoinFastValueStore.HashMapResult(); }
@Override public ByteSegmentRef next() { if (!hasRows) { return null; } return internalRead(); }
@Override public void putRow(BytesWritable currentKey, BytesWritable currentValue) throws HiveException, IOException { if (!stringCommon.adaptPutRow(this, currentKey, currentValue)) { // Ignore NULL keys, except for FULL OUTER. if (isFullOuter) { fullOuterNullKeyValueCount++; } } }
public VectorMapJoinFastStringHashMultiSet( boolean isFullOuter, int initialCapacity, float loadFactor, int writeBuffersSize, long estimatedKeyCount) { super( isFullOuter, initialCapacity, loadFactor, writeBuffersSize, estimatedKeyCount); fullOuterNullKeyValueCount = 0; stringCommon = new VectorMapJoinFastStringCommon(); }
@Override public long getEstimatedMemorySize() { return super.getEstimatedMemorySize() + valueStore.getEstimatedMemorySize(); } }
@Override public long getEstimatedMemorySize() { long size = super.getEstimatedMemorySize(); size += hashSetStore.getEstimatedMemorySize(); return size; } }
@Override public void putRow(BytesWritable currentKey, BytesWritable currentValue) throws HiveException, IOException { if (!adaptPutRow(currentKey, currentValue)) { // Ignore NULL keys, except for FULL OUTER. if (isFullOuter) { addFullOuterNullKeyValue(currentValue); } } }
public VectorMapJoinFastBytesHashSet( boolean isFullOuter, int initialCapacity, float loadFactor, int writeBuffersSize, long estimatedKeyCount) { super( isFullOuter, initialCapacity, loadFactor, writeBuffersSize, estimatedKeyCount); hashSetStore = new VectorMapJoinFastBytesHashSetStore(writeBuffersSize); writeBuffers = hashSetStore.getWriteBuffers(); }
@Override public long getEstimatedMemorySize() { long size = 0; // adding 16KB constant memory for stringCommon as the rabit hole is deep to implement // MemoryEstimate interface, also it is constant overhead size += (16 * 1024L); return super.getEstimatedMemorySize() + size; } }
@Override public long getEstimatedMemorySize() { return super.getEstimatedMemorySize(); } }
/** * Get partial hash code from the reference word. * @param hashCode * @return */ public static long getPartialHashCodeFromRefWord(long refWord) { return KeyRef.getPartialHashCode(refWord); } }
/** * Mark the key matched with equalKey as a match and read the set membership count, * if necessary. */ public void setContains() { setJoinResult(JoinResult.MATCH); }
private int findKeyInArray(long searchLong) { // Brute force search. for (int index = 0; index < count; index++) { FastLongHashMapElement element = array[index]; long longKey = element.getKey(); if (longKey == searchLong) { return index; } } return -1; }
@Override public long getEstimatedMemorySize() { return super.getEstimatedMemorySize(); } }