Author: tomwhite Date: Wed May 16 08:40:51 2007 New Revision: 538631 URL: http://svn.apache.org/viewvc?view=rev&rev=538631 Log: HADOOP-1340. Set the replication factor of the MD5 file in the filecache to be the same as the replication factor of the original file. Contributed by Dhruba Borthakur.
Modified: lucene/hadoop/trunk/CHANGES.txt lucene/hadoop/trunk/src/java/org/apache/hadoop/filecache/DistributedCache.java Modified: lucene/hadoop/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=538631&r1=538630&r2=538631 ============================================================================== --- lucene/hadoop/trunk/CHANGES.txt (original) +++ lucene/hadoop/trunk/CHANGES.txt Wed May 16 08:40:51 2007 @@ -14,6 +14,10 @@ 4. HADOOP-1342. In aggregators, permit one to limit the number of unique values per key. (Runping Qi via cutting) + 5. HADOOP-1340. Set the replication factor of the MD5 file in the filecache + to be the same as the replication factor of the original file. + (Dhruba Borthakur via tomwhite.) + Branch 0.13 (unreleased changes) Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/filecache/DistributedCache.java URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/filecache/DistributedCache.java?view=diff&rev=538631&r1=538630&r2=538631 ============================================================================== --- lucene/hadoop/trunk/src/java/org/apache/hadoop/filecache/DistributedCache.java (original) +++ lucene/hadoop/trunk/src/java/org/apache/hadoop/filecache/DistributedCache.java Wed May 16 08:40:51 2007 @@ -320,7 +320,8 @@ fsStream.close(); digest = md5.digest(); - FSDataOutputStream out = fileSystem.create(md5File); + short replication = fileSystem.getReplication(filePath); + FSDataOutputStream out = fileSystem.create(md5File, replication); out.write(digest); out.close(); } else {