[HUDI-1133] Tune buffer sizes for the diskbased external spillable map
This commit is contained in:
committed by
n3nash
parent
492ddcbb06
commit
cc555ba188
@@ -79,7 +79,7 @@ public final class BufferedRandomAccessFile extends RandomAccessFile {
|
|||||||
*/
|
*/
|
||||||
public BufferedRandomAccessFile(File file, String mode) throws IOException {
|
public BufferedRandomAccessFile(File file, String mode) throws IOException {
|
||||||
super(file, mode);
|
super(file, mode);
|
||||||
this.init(0);
|
this.init(DEFAULT_BUFFER_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -102,7 +102,7 @@ public final class BufferedRandomAccessFile extends RandomAccessFile {
|
|||||||
*/
|
*/
|
||||||
public BufferedRandomAccessFile(String name, String mode) throws IOException {
|
public BufferedRandomAccessFile(String name, String mode) throws IOException {
|
||||||
super(name, mode);
|
super(name, mode);
|
||||||
this.init(0);
|
this.init(DEFAULT_BUFFER_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ public final class DiskBasedMap<T extends Serializable, R extends Serializable>
|
|||||||
try {
|
try {
|
||||||
BufferedRandomAccessFile readHandle = randomAccessFile.get();
|
BufferedRandomAccessFile readHandle = randomAccessFile.get();
|
||||||
if (readHandle == null) {
|
if (readHandle == null) {
|
||||||
readHandle = new BufferedRandomAccessFile(filePath, "r");
|
readHandle = new BufferedRandomAccessFile(filePath, "r", BUFFER_SIZE);
|
||||||
readHandle.seek(0);
|
readHandle.seek(0);
|
||||||
randomAccessFile.set(readHandle);
|
randomAccessFile.set(readHandle);
|
||||||
openedAccessFiles.offer(readHandle);
|
openedAccessFiles.offer(readHandle);
|
||||||
|
|||||||
Reference in New Issue
Block a user