hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r587329 - /lucene/hadoop/branches/branch-0.15/src/java/org/apache/hadoop/fs/ChecksumFileSystem.java
Date Tue, 23 Oct 2007 00:26:31 GMT
Author: omalley
Date: Mon Oct 22 17:26:30 2007
New Revision: 587329

URL: http://svn.apache.org/viewvc?rev=587329&view=rev
Log:
Merge -r 587325:587326 from trunk to branch 0.15. Part of HADOOP-2080.

Modified:
    lucene/hadoop/branches/branch-0.15/src/java/org/apache/hadoop/fs/ChecksumFileSystem.java

Modified: lucene/hadoop/branches/branch-0.15/src/java/org/apache/hadoop/fs/ChecksumFileSystem.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.15/src/java/org/apache/hadoop/fs/ChecksumFileSystem.java?rev=587329&r1=587328&r2=587329&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.15/src/java/org/apache/hadoop/fs/ChecksumFileSystem.java
(original)
+++ lucene/hadoop/branches/branch-0.15/src/java/org/apache/hadoop/fs/ChecksumFileSystem.java
Mon Oct 22 17:26:30 2007
@@ -37,7 +37,7 @@
  *****************************************************************/
 public abstract class ChecksumFileSystem extends FilterFileSystem {
   private static final byte[] CHECKSUM_VERSION = new byte[] {'c', 'r', 'c', 0};
-  private final int bytesPerChecksum;
+  private int bytesPerChecksum;
 
   public static double getApproxChkSumLength(long size) {
     return ChecksumFSOutputSummer.CHKSUM_AS_FRACTION * size;
@@ -45,7 +45,13 @@
   
   public ChecksumFileSystem(FileSystem fs) {
     super(fs);
-    bytesPerChecksum = getConf().getInt("io.bytes.per.checksum", 512);
+  }
+
+  public void setConf(Configuration conf) {
+    super.setConf(conf);
+    if (conf != null) {
+      bytesPerChecksum = conf.getInt("io.bytes.per.checksum", 512);
+    }
   }
 
   /** get the raw file system */



Mime
View raw message