hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sur...@apache.org
Subject svn commit: r1419977 - in /hadoop/common/branches/branch-1-win: ./ src/core/org/apache/hadoop/fs/ src/core/org/apache/hadoop/util/ src/test/org/apache/hadoop/util/
Date Tue, 11 Dec 2012 02:43:47 GMT
Author: suresh
Date: Tue Dec 11 02:43:46 2012
New Revision: 1419977

URL: http://svn.apache.org/viewvc?rev=1419977&view=rev
Log:
HADOOP-8617. Merging r1365591 from branch-1

Added:
    hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/util/PureJavaCrc32.java
      - copied unchanged from r1365591, hadoop/common/branches/branch-1/src/core/org/apache/hadoop/util/PureJavaCrc32.java
    hadoop/common/branches/branch-1-win/src/test/org/apache/hadoop/util/TestPureJavaCrc32.java
      - copied unchanged from r1365591, hadoop/common/branches/branch-1/src/test/org/apache/hadoop/util/TestPureJavaCrc32.java
Modified:
    hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt
    hadoop/common/branches/branch-1-win/CHANGES.txt
    hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/fs/ChecksumFileSystem.java
    hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/util/DataChecksum.java

Modified: hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt?rev=1419977&r1=1419976&r2=1419977&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt (original)
+++ hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt Tue Dec 11 02:43:46 2012
@@ -289,3 +289,6 @@ Branch-hadoop-1-win (branched from branc
     be run with ant 1.8.x.  (Jing Zhao via szetszwo)
     HADOOP-9090. Support on-demand publish of metrics. (Mostafa Elhemali via
     suresh)
+
+    HADOOP-8617. Backport HADOOP-6148, HADOOP-6166 and HADOOP-7333 for a pure
+    Java CRC32 calculator implementation.  (Brandon Li via szetszwo)

Modified: hadoop/common/branches/branch-1-win/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/CHANGES.txt?rev=1419977&r1=1419976&r2=1419977&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1-win/CHANGES.txt Tue Dec 11 02:43:46 2012
@@ -1,6 +1,7 @@
 Hadoop Change Log
 
 Release 1.1.0 - (partial upto at r1293509 as of 2012-02-24 17:46:42)
+
   BUG FIXES
 
     HDFS-2305. Running multiple 2NNs can result in corrupt file system. (atm)

Modified: hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/fs/ChecksumFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/fs/ChecksumFileSystem.java?rev=1419977&r1=1419976&r2=1419977&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/fs/ChecksumFileSystem.java
(original)
+++ hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/fs/ChecksumFileSystem.java
Tue Dec 11 02:43:46 2012
@@ -20,13 +20,13 @@ package org.apache.hadoop.fs;
 
 import java.io.*;
 import java.util.Arrays;
-import java.util.zip.CRC32;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.permission.FsPermission;
 import org.apache.hadoop.util.Progressable;
+import org.apache.hadoop.util.PureJavaCrc32;
 import org.apache.hadoop.util.StringUtils;
 
 /****************************************************************
@@ -135,7 +135,7 @@ public abstract class ChecksumFileSystem
         if (!Arrays.equals(version, CHECKSUM_VERSION))
           throw new IOException("Not a checksum file: "+sumFile);
         this.bytesPerSum = sums.readInt();
-        set(fs.verifyChecksum, new CRC32(), bytesPerSum, 4);
+        set(fs.verifyChecksum, new PureJavaCrc32(), bytesPerSum, 4);
       } catch (FileNotFoundException e) {         // quietly ignore
         set(fs.verifyChecksum, null, 1, 0);
       } catch (IOException e) {                   // loudly ignore
@@ -330,7 +330,7 @@ public abstract class ChecksumFileSystem
                           long blockSize,
                           Progressable progress)
       throws IOException {
-      super(new CRC32(), fs.getBytesPerSum(), 4);
+      super(new PureJavaCrc32(), fs.getBytesPerSum(), 4);
       int bytesPerSum = fs.getBytesPerSum();
       this.datas = fs.getRawFileSystem().create(file, overwrite, bufferSize, 
                                          replication, blockSize, progress);

Modified: hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/util/DataChecksum.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/util/DataChecksum.java?rev=1419977&r1=1419976&r2=1419977&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/util/DataChecksum.java
(original)
+++ hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/util/DataChecksum.java
Tue Dec 11 02:43:46 2012
@@ -19,7 +19,6 @@
 package org.apache.hadoop.util;
 
 import java.util.zip.Checksum;
-import java.util.zip.CRC32;
 
 import java.io.*;
 
@@ -51,7 +50,7 @@ public class DataChecksum implements Che
       return new DataChecksum( CHECKSUM_NULL, new ChecksumNull(), 
                                CHECKSUM_NULL_SIZE, bytesPerChecksum );
     case CHECKSUM_CRC32 :
-      return new DataChecksum( CHECKSUM_CRC32, new CRC32(), 
+      return new DataChecksum( CHECKSUM_CRC32, new PureJavaCrc32(),
                                CHECKSUM_CRC32_SIZE, bytesPerChecksum );
     default:
       return null;  



Mime
View raw message