com.facebook.hive.orc.MemoryEstimate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hive-dwrf Show documentation
Show all versions of hive-dwrf Show documentation
DWRF file format for Hive
package com.facebook.hive.orc;
/**
*
* MemoryEstimate.
*
* A global entity to keep track of memory used across all WriterImpls.
*
* The values represent estimates of the amount of memory used by the writers.
*
*/
public class MemoryEstimate {
// The estimate of the total amount of memory currently being used
private long totalMemory;
// The memory being used by the dictionaries (note this should only account for memory
// actually being used, not memory allocated for potential use in the future)
private long dictionaryMemory;
public long getTotalMemory() {
return totalMemory;
}
public long getDictionaryMemory() {
return dictionaryMemory;
}
public void incrementTotalMemory(long increment) {
totalMemory += increment;
}
public void incrementDictionaryMemory(long increment) {
dictionaryMemory += increment;
}
public void decrementTotalMemory(long decrement) { totalMemory -= decrement; }
public void decrementDictionaryMemory(long decrement) { dictionaryMemory -= decrement; }
public void reset() {
totalMemory = 0;
dictionaryMemory = 0;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy