hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1171808 - in /hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common: CHANGES.txt src/main/docs/ src/main/java/ src/main/java/org/apache/hadoop/io/compress/SnappyCodec.java src/test/core/
Date Fri, 16 Sep 2011 21:35:47 GMT
Author: atm
Date: Fri Sep 16 21:35:45 2011
New Revision: 1171808

URL: http://svn.apache.org/viewvc?rev=1171808&view=rev
Log:
Merge trunk into HA branch

Modified:
    hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/CHANGES.txt   (contents,
props changed)
    hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/main/docs/  
(props changed)
    hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/main/java/  
(props changed)
    hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/SnappyCodec.java
    hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/test/core/  
(props changed)

Modified: hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1171808&r1=1171807&r2=1171808&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/CHANGES.txt (original)
+++ hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/CHANGES.txt Fri Sep
16 21:35:45 2011
@@ -591,6 +591,9 @@ Release 0.23.0 - Unreleased
     HADOOP-7629. Allow immutable FsPermission objects to be used as IPC
     parameters. (todd)
 
+    HADOOP-7608. SnappyCodec check for Hadoop native lib is wrong
+    (Alejandro Abdelnur via todd)
+
 Release 0.22.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Propchange: hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/CHANGES.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 16 21:35:45 2011
@@ -1,5 +1,5 @@
 /hadoop/common/branches/yahoo-merge/CHANGES.txt:1079157,1079163-1079164,1079167
-/hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt:1161333-1171312
+/hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt:1161333-1171806
 /hadoop/core/branches/branch-0.18/CHANGES.txt:727226
 /hadoop/core/branches/branch-0.19/CHANGES.txt:713112
 /hadoop/core/trunk/CHANGES.txt:776175-785643,785929-786278

Propchange: hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/main/docs/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 16 21:35:45 2011
@@ -1,2 +1,2 @@
-/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/docs:1152502-1171312
+/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/docs:1152502-1171806
 /hadoop/core/branches/branch-0.19/src/docs:713112

Propchange: hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/main/java/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 16 21:35:45 2011
@@ -1,3 +1,3 @@
-/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java:1152502-1171312
+/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java:1152502-1171806
 /hadoop/core/branches/branch-0.19/core/src/java:713112
 /hadoop/core/trunk/src/core:776175-785643,785929-786278

Modified: hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/SnappyCodec.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/SnappyCodec.java?rev=1171808&r1=1171807&r2=1171808&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/SnappyCodec.java
(original)
+++ hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/SnappyCodec.java
Fri Sep 16 21:35:45 2011
@@ -28,6 +28,7 @@ import org.apache.hadoop.io.compress.sna
 import org.apache.hadoop.io.compress.snappy.SnappyCompressor;
 import org.apache.hadoop.io.compress.snappy.SnappyDecompressor;
 import org.apache.hadoop.fs.CommonConfigurationKeys;
+import org.apache.hadoop.util.NativeCodeLoader;
 
 /**
  * This class creates snappy compressors/decompressors.
@@ -63,13 +64,10 @@ public class SnappyCodec implements Conf
   /**
    * Are the native snappy libraries loaded & initialized?
    *
-   * @param conf configuration
    * @return true if loaded & initialized, otherwise false
    */
-  public static boolean isNativeSnappyLoaded(Configuration conf) {
-    return LoadSnappy.isLoaded() && conf.getBoolean(
-        CommonConfigurationKeys.IO_NATIVE_LIB_AVAILABLE_KEY,
-        CommonConfigurationKeys.IO_NATIVE_LIB_AVAILABLE_DEFAULT);
+  public static boolean isNativeCodeLoaded() {
+    return LoadSnappy.isLoaded() && NativeCodeLoader.isNativeCodeLoaded();
   }
 
   /**
@@ -99,7 +97,7 @@ public class SnappyCodec implements Conf
   public CompressionOutputStream createOutputStream(OutputStream out,
                                                     Compressor compressor)
       throws IOException {
-    if (!isNativeSnappyLoaded(conf)) {
+    if (!isNativeCodeLoaded()) {
       throw new RuntimeException("native snappy library not available");
     }
     int bufferSize = conf.getInt(
@@ -119,7 +117,7 @@ public class SnappyCodec implements Conf
    */
   @Override
   public Class<? extends Compressor> getCompressorType() {
-    if (!isNativeSnappyLoaded(conf)) {
+    if (!isNativeCodeLoaded()) {
       throw new RuntimeException("native snappy library not available");
     }
 
@@ -133,7 +131,7 @@ public class SnappyCodec implements Conf
    */
   @Override
   public Compressor createCompressor() {
-    if (!isNativeSnappyLoaded(conf)) {
+    if (!isNativeCodeLoaded()) {
       throw new RuntimeException("native snappy library not available");
     }
     int bufferSize = conf.getInt(
@@ -169,7 +167,7 @@ public class SnappyCodec implements Conf
   public CompressionInputStream createInputStream(InputStream in,
                                                   Decompressor decompressor)
       throws IOException {
-    if (!isNativeSnappyLoaded(conf)) {
+    if (!isNativeCodeLoaded()) {
       throw new RuntimeException("native snappy library not available");
     }
 
@@ -185,7 +183,7 @@ public class SnappyCodec implements Conf
    */
   @Override
   public Class<? extends Decompressor> getDecompressorType() {
-    if (!isNativeSnappyLoaded(conf)) {
+    if (!isNativeCodeLoaded()) {
       throw new RuntimeException("native snappy library not available");
     }
 
@@ -199,7 +197,7 @@ public class SnappyCodec implements Conf
    */
   @Override
   public Decompressor createDecompressor() {
-    if (!isNativeSnappyLoaded(conf)) {
+    if (!isNativeCodeLoaded()) {
       throw new RuntimeException("native snappy library not available");
     }
     int bufferSize = conf.getInt(

Propchange: hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/test/core/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 16 21:35:45 2011
@@ -1,3 +1,3 @@
-/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/core:1152502-1171312
+/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/core:1152502-1171806
 /hadoop/core/branches/branch-0.19/core/src/test/core:713112
 /hadoop/core/trunk/src/test/core:776175-785643,785929-786278



Mime
View raw message