hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r1390022 - in /hadoop/common/branches/branch-1.1: ./ src/core/org/apache/hadoop/fs/ src/core/org/apache/hadoop/util/ src/test/org/apache/hadoop/util/
Date Tue, 25 Sep 2012 17:54:39 GMT
Author: acmurthy
Date: Tue Sep 25 17:54:38 2012
New Revision: 1390022

URL: http://svn.apache.org/viewvc?rev=1390022&view=rev
Log:
Merge -c 1365591 from branch-1 to branch-1.1 to fix HADOOP-8617. Backport HADOOP-6148, HADOOP-6166
and HADOOP-7333 for a pure Java CRC32 calculator implementation.

Added:
    hadoop/common/branches/branch-1.1/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.1/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.1/CHANGES.txt
    hadoop/common/branches/branch-1.1/src/core/org/apache/hadoop/fs/ChecksumFileSystem.java
    hadoop/common/branches/branch-1.1/src/core/org/apache/hadoop/util/DataChecksum.java

Modified: hadoop/common/branches/branch-1.1/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1.1/CHANGES.txt?rev=1390022&r1=1390021&r2=1390022&view=diff
==============================================================================
--- hadoop/common/branches/branch-1.1/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1.1/CHANGES.txt Tue Sep 25 17:54:38 2012
@@ -179,6 +179,9 @@ Release 1.1.0 - 2012.09.16
     JobTracker for smaller clusters. (Todd Lipcon, backport by 
     Brandon Li via sseth)
 
+    HADOOP-8617. Backport HADOOP-6148, HADOOP-6166 and HADOOP-7333 for a pure
+    Java CRC32 calculator implementation.  (Brandon Li via szetszwo)
+
   BUG FIXES
 
     HDFS-3696. Set chunked streaming mode in WebHdfsFileSystem write operations

Modified: hadoop/common/branches/branch-1.1/src/core/org/apache/hadoop/fs/ChecksumFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1.1/src/core/org/apache/hadoop/fs/ChecksumFileSystem.java?rev=1390022&r1=1390021&r2=1390022&view=diff
==============================================================================
--- hadoop/common/branches/branch-1.1/src/core/org/apache/hadoop/fs/ChecksumFileSystem.java
(original)
+++ hadoop/common/branches/branch-1.1/src/core/org/apache/hadoop/fs/ChecksumFileSystem.java
Tue Sep 25 17:54:38 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.1/src/core/org/apache/hadoop/util/DataChecksum.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1.1/src/core/org/apache/hadoop/util/DataChecksum.java?rev=1390022&r1=1390021&r2=1390022&view=diff
==============================================================================
--- hadoop/common/branches/branch-1.1/src/core/org/apache/hadoop/util/DataChecksum.java (original)
+++ hadoop/common/branches/branch-1.1/src/core/org/apache/hadoop/util/DataChecksum.java Tue
Sep 25 17:54:38 2012
@@ -19,8 +19,6 @@
 package org.apache.hadoop.util;
 
 import java.util.zip.Checksum;
-import java.util.zip.CRC32;
-
 import java.io.*;
 
 /**
@@ -51,7 +49,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