hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmcc...@apache.org
Subject svn commit: r1574256 - in /hadoop/common/branches/branch-2/hadoop-common-project: ./ hadoop-common/ hadoop-common/src/ hadoop-common/src/main/java/ hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/SharedFileDescriptorFactory.java
Date Tue, 04 Mar 2014 23:41:28 GMT
Author: cmccabe
Date: Tue Mar  4 23:41:28 2014
New Revision: 1574256

URL: http://svn.apache.org/r1574256
Log:
HDFS-6051. HDFS cannot run on Windows since short-circuit memory segment changes (cmccabe)

Modified:
    hadoop/common/branches/branch-2/hadoop-common-project/   (props changed)
    hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/   (props changed)
    hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/   (props changed)
    hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/   (props
changed)
    hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/SharedFileDescriptorFactory.java

Propchange: hadoop/common/branches/branch-2/hadoop-common-project/
------------------------------------------------------------------------------
  Merged /hadoop/common/trunk/hadoop-common-project:r1574246

Propchange: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/
------------------------------------------------------------------------------
  Merged /hadoop/common/trunk/hadoop-common-project/hadoop-common:r1574246

Propchange: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/
------------------------------------------------------------------------------
  Merged /hadoop/common/trunk/hadoop-common-project/hadoop-common/src:r1574246

Propchange: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/
------------------------------------------------------------------------------
  Merged /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java:r1574246

Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/SharedFileDescriptorFactory.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/SharedFileDescriptorFactory.java?rev=1574256&r1=1574255&r2=1574256&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/SharedFileDescriptorFactory.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/SharedFileDescriptorFactory.java
Tue Mar  4 23:41:28 2014
@@ -48,6 +48,16 @@ public class SharedFileDescriptorFactory
   private final String prefix;
   private final String path;
 
+  public static String getLoadingFailureReason() {
+    if (!NativeIO.isAvailable()) {
+      return "NativeIO is not available.";
+    }
+    if (!SystemUtils.IS_OS_UNIX) {
+      return "The OS is not UNIX.";
+    }
+    return null;
+  }
+
   /**
    * Create a SharedFileDescriptorFactory.
    *
@@ -56,8 +66,7 @@ public class SharedFileDescriptorFactory
    */
   public SharedFileDescriptorFactory(String prefix, String path)
       throws IOException {
-    Preconditions.checkArgument(NativeIO.isAvailable());
-    Preconditions.checkArgument(SystemUtils.IS_OS_UNIX);
+    Preconditions.checkState(getLoadingFailureReason() == null);
     this.prefix = prefix;
     this.path = path;
     deleteStaleTemporaryFiles0(prefix, path);



Mime
View raw message