/** * Returns true if the memory threshold for the hash table was reached. */ private boolean shouldFlush(VectorizedRowBatch batch) { if (batch.size == 0) { return false; } //numEntriesSinceCheck is the number of entries added to the hash table // since the last time we checked the average variable size if (numEntriesSinceCheck >= this.checkInterval) { // Were going to update the average variable row size by sampling the current batch updateAvgVariableSize(batch); numEntriesSinceCheck = 0; } if (numEntriesHashTable > this.maxHtEntries || numEntriesHashTable * (fixedHashEntrySize + avgVariableSize) > maxHashTblMemory) { return true; } if (gcCanary.get() == null) { return true; } return false; }
/** * Returns true if the memory threshold for the hash table was reached. */ private boolean shouldFlush(VectorizedRowBatch batch) { if (batch.size == 0) { return false; } //numEntriesSinceCheck is the number of entries added to the hash table // since the last time we checked the average variable size if (numEntriesSinceCheck >= this.checkInterval) { // Were going to update the average variable row size by sampling the current batch updateAvgVariableSize(batch); numEntriesSinceCheck = 0; } if (numEntriesHashTable > this.maxHtEntries || numEntriesHashTable * (fixedHashEntrySize + avgVariableSize) > maxHashTblMemory) { return true; } if (gcCanary.get() == null) { return true; } return false; }
/** * Returns true if the memory threshold for the hash table was reached. */ private boolean shouldFlush(VectorizedRowBatch batch) { if (batch.size == 0) { return false; } //numEntriesSinceCheck is the number of entries added to the hash table // since the last time we checked the average variable size if (numEntriesSinceCheck >= this.checkInterval) { // Were going to update the average variable row size by sampling the current batch updateAvgVariableSize(batch); numEntriesSinceCheck = 0; } if (numEntriesHashTable > this.maxHtEntries || numEntriesHashTable * (fixedHashEntrySize + avgVariableSize) > maxHashTblMemory) { return true; } if (gcCanary.get() == null) { return true; } return false; }