goiri 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_r373708397
########## 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: #elseif WINDOWS ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org