hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject svn commit: r1535217 - /hadoop/common/branches/HDFS-4949/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c
Date Thu, 24 Oct 2013 00:08:16 GMT
Author: wang
Date: Thu Oct 24 00:08:15 2013
New Revision: 1535217

URL: http://svn.apache.org/r1535217
Log:
HDFS-5404 Resolve regressions in Windows compatibility on HDFS-4949 branch. Contributed by
Chris Nauroth.

Modified:
    hadoop/common/branches/HDFS-4949/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c

Modified: hadoop/common/branches/HDFS-4949/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-4949/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c?rev=1535217&r1=1535216&r2=1535217&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-4949/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c
(original)
+++ hadoop/common/branches/HDFS-4949/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/NativeIO.c
Thu Oct 24 00:08:15 2013
@@ -383,6 +383,7 @@ Java_org_apache_hadoop_io_nativeio_Nativ
   JNIEnv *env, jclass clazz,
   jobject buffer, jlong len)
 {
+#ifdef UNIX
   void* buf = (void*)(*env)->GetDirectBufferAddress(env, buffer);
   PASS_EXCEPTIONS(env);
 
@@ -390,6 +391,12 @@ Java_org_apache_hadoop_io_nativeio_Nativ
     CHECK_DIRECT_BUFFER_ADDRESS(buf);
     throw_ioe(env, errno);
   }
+#endif
+
+#ifdef WINDOWS
+  THROW(env, "java/io/IOException",
+    "The function POSIX.mlock_native() is not supported on Windows");
+#endif
 }
 
 /**
@@ -404,6 +411,7 @@ Java_org_apache_hadoop_io_nativeio_Nativ
   JNIEnv *env, jclass clazz,
   jobject buffer, jlong len)
 {
+#ifdef UNIX
   void* buf = (void*)(*env)->GetDirectBufferAddress(env, buffer);
   PASS_EXCEPTIONS(env);
 
@@ -411,6 +419,12 @@ Java_org_apache_hadoop_io_nativeio_Nativ
     CHECK_DIRECT_BUFFER_ADDRESS(buf);
     throw_ioe(env, errno);
   }
+#endif
+
+#ifdef WINDOWS
+  THROW(env, "java/io/IOException",
+    "The function POSIX.munlock_native() is not supported on Windows");
+#endif
 }
 
 #ifdef __FreeBSD__



Mime
View raw message