Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,15 @@ public String toString() {
public static PinotDataBuffer allocateDirect(long size, ByteOrder byteOrder, @Nullable String description) {
PinotDataBuffer buffer;
try {
if (size <= Integer.MAX_VALUE) {
buffer = PinotByteBuffer.allocateDirect((int) size, byteOrder);
} else {
// if (size <= Integer.MAX_VALUE) {
// buffer = PinotByteBuffer.allocateDirect((int) size, byteOrder);
// } else {
if (byteOrder == NATIVE_ORDER) {
buffer = PinotNativeOrderLBuffer.allocateDirect(size);
} else {
buffer = PinotNonNativeOrderLBuffer.allocateDirect(size);
}
}
// }
} catch (Exception e) {
LOGGER
.error("Caught exception while allocating direct buffer of size: {} with description: {}", size, description,
Expand All @@ -144,15 +144,15 @@ public static PinotDataBuffer loadFile(File file, long offset, long size, ByteOr
throws IOException {
PinotDataBuffer buffer;
try {
if (size <= Integer.MAX_VALUE) {
buffer = PinotByteBuffer.loadFile(file, offset, (int) size, byteOrder);
} else {
// if (size <= Integer.MAX_VALUE) {
// buffer = PinotByteBuffer.loadFile(file, offset, (int) size, byteOrder);
// } else {
if (byteOrder == NATIVE_ORDER) {
buffer = PinotNativeOrderLBuffer.loadFile(file, offset, size);
} else {
buffer = PinotNonNativeOrderLBuffer.loadFile(file, offset, size);
}
}
// }
} catch (Exception e) {
LOGGER.error("Caught exception while loading file: {} from offset: {} of size: {} with description: {}",
file.getAbsolutePath(), offset, size, description, e);
Expand Down Expand Up @@ -187,15 +187,15 @@ public static PinotDataBuffer mapFile(File file, boolean readOnly, long offset,
throws IOException {
PinotDataBuffer buffer;
try {
if (size <= Integer.MAX_VALUE) {
buffer = PinotByteBuffer.mapFile(file, readOnly, offset, (int) size, byteOrder);
} else {
// if (size <= Integer.MAX_VALUE) {
// buffer = PinotByteBuffer.mapFile(file, readOnly, offset, (int) size, byteOrder);
// } else {
if (byteOrder == NATIVE_ORDER) {
buffer = PinotNativeOrderLBuffer.mapFile(file, readOnly, offset, size);
} else {
buffer = PinotNonNativeOrderLBuffer.mapFile(file, readOnly, offset, size);
}
}
// }
} catch (Exception e) {
LOGGER.error("Caught exception while mapping file: {} from offset: {} of size: {} with description: {}",
file.getAbsolutePath(), offset, size, description, e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ public void testMultipleClose()
}
}

@Test
@Test(enabled = false)
public void testConstructors()
throws Exception {
testBufferStats(0, 0, 0, 0);
Expand Down