lukmajercak commented on a change in pull request #1825: HDFS-15151 Use
TransmitFile for file to socket data transfer
URL: https://github.com/apache/hadoop/pull/1825#discussion_r373748571
##########
File path:
hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c
##########
@@ -1341,6 +1350,68 @@
Java_org_apache_hadoop_io_nativeio_NativeIO_00024Windows_extendWorkingSetSize(
#endif
}
+jint
+fdval(JNIEnv *env, jobject fdo)
+{
+ return (*env)->GetIntField(env, fdo, fd_fdID);
+}
+
+jlong
+handleval(JNIEnv *env, jobject fdo)
+{
+ return (*env)->GetLongField(env, fdo, handle_fdID);
+}
+
+JNIEXPORT jlong JNICALL
+Java_org_apache_hadoop_io_nativeio_NativeIO_00024Windows_transmitFile(
+ JNIEnv *env, jobject jObject, jobject srcFD, jlong position, jlong count,
+ jobject dstFD)
+{
+#ifdef UNIX
+ THROW(env, "java/io/IOException",
+ "The function transmitFile is not supported on Unix");
+#endif
+
+#ifdef WINDOWS
Review comment:
i was following the way this was done just above for
Windows_extendWorkingSetSize
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]