diff --git a/src/main/cpp/src/NativeParquetJni.cpp b/src/main/cpp/src/NativeParquetJni.cpp index c6d90be0cc..06f29f3f90 100644 --- a/src/main/cpp/src/NativeParquetJni.cpp +++ b/src/main/cpp/src/NativeParquetJni.cpp @@ -782,7 +782,7 @@ JNIEXPORT jlong JNICALL Java_com_nvidia_spark_rapids_jni_ParquetFooter_getNumCol } JNIEXPORT jobject JNICALL Java_com_nvidia_spark_rapids_jni_ParquetFooter_serializeThriftFile( - JNIEnv* env, jclass, jlong handle) + JNIEnv* env, jclass, jlong handle, jobject host_memory_allocator) { CUDF_FUNC_RANGE(); try { @@ -798,7 +798,7 @@ JNIEXPORT jobject JNICALL Java_com_nvidia_spark_rapids_jni_ParquetFooter_seriali transportOut->getBuffer(&buf_ptr, &buf_size); // 12 extra is for the MAGIC thrift_footer length MAGIC - jobject ret = cudf::jni::allocate_host_buffer(env, buf_size + 12, false); + jobject ret = cudf::jni::allocate_host_buffer(env, buf_size + 12, false, host_memory_allocator); uint8_t* ret_addr = reinterpret_cast(cudf::jni::get_host_buffer_address(env, ret)); ret_addr[0] = 'P'; ret_addr[1] = 'A'; diff --git a/src/main/java/com/nvidia/spark/rapids/jni/ParquetFooter.java b/src/main/java/com/nvidia/spark/rapids/jni/ParquetFooter.java index cd836869eb..681a01d81d 100644 --- a/src/main/java/com/nvidia/spark/rapids/jni/ParquetFooter.java +++ b/src/main/java/com/nvidia/spark/rapids/jni/ParquetFooter.java @@ -103,8 +103,12 @@ private ParquetFooter(long handle) { * footer file. This will include the MAGIC PAR1 at the beginning and end and also the * length of the footer just before the PAR1 at the end. */ + public HostMemoryBuffer serializeThriftFile(HostMemoryAllocator hostMemoryAllocator) { + return serializeThriftFile(nativeHandle, hostMemoryAllocator); + } + public HostMemoryBuffer serializeThriftFile() { - return serializeThriftFile(nativeHandle); + return serializeThriftFile(DefaultHostMemoryAllocator.get()); } /** @@ -232,5 +236,6 @@ private static native long readAndFilter(long address, long length, private static native int getNumColumns(long nativeHandle); - private static native HostMemoryBuffer serializeThriftFile(long nativeHandle); + private static native HostMemoryBuffer serializeThriftFile(long nativeHandle, + HostMemoryAllocator hostMemoryAllocator); } diff --git a/thirdparty/cudf b/thirdparty/cudf index 14522003f3..7b9f4a1757 160000 --- a/thirdparty/cudf +++ b/thirdparty/cudf @@ -1 +1 @@ -Subproject commit 14522003f3bbd8041e66b1ff34077acdae4869ba +Subproject commit 7b9f4a17579befd902d1c30af38daa5fe493e335