Class LimitedTemporaryStorage
java.lang.Object
org.apache.druid.query.groupby.epinephelinae.LimitedTemporaryStorage
- All Implemented Interfaces:
Closeable,AutoCloseable
An area for limited temporary storage on disk. Limits are checked when opening files and on all writes to those
files. Thread-safe.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionLimitedTemporaryStorage(File storageDirectory, long maxBytesUsed, int maxFileCount, GroupByStatsProvider.PerQueryStats perQueryStatsContainer) -
Method Summary
-
Constructor Details
-
LimitedTemporaryStorage
public LimitedTemporaryStorage(File storageDirectory, long maxBytesUsed, int maxFileCount, GroupByStatsProvider.PerQueryStats perQueryStatsContainer)
-
-
Method Details
-
createFile
Create a new temporary file. All methods of the returned output stream may throwTemporaryStorageFullExceptionif the temporary storage area fills up. This method may also throwTemporaryStorageFileLimitExceptionif the number of files in the temporary storage exceeds the configured limit.- Returns:
- output stream to the file
- Throws:
TemporaryStorageFullException- if the temporary storage area is fullIOException- if something goes wrong while creating the file
-
delete
-
maxSize
public long maxSize() -
currentSize
public long currentSize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-