hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r559628 - in /lucene/hadoop/branches/branch-0.14: ./ src/java/org/apache/hadoop/dfs/ src/test/org/apache/hadoop/dfs/
Date Wed, 25 Jul 2007 21:58:01 GMT
Author: omalley
Date: Wed Jul 25 14:58:00 2007
New Revision: 559628

URL: http://svn.apache.org/viewvc?view=rev&rev=559628
Log:
HADOOP-1628 merged into branch-0.14.

Added:
    lucene/hadoop/branches/branch-0.14/src/test/org/apache/hadoop/dfs/TestDataTransferProtocol.java
      - copied unchanged from r559623, lucene/hadoop/trunk/src/test/org/apache/hadoop/dfs/TestDataTransferProtocol.java
Modified:
    lucene/hadoop/branches/branch-0.14/CHANGES.txt
    lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/DFSClient.java
    lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/DataNode.java
    lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/FSConstants.java

Modified: lucene/hadoop/branches/branch-0.14/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/CHANGES.txt?view=diff&rev=559628&r1=559627&r2=559628
==============================================================================
--- lucene/hadoop/branches/branch-0.14/CHANGES.txt (original)
+++ lucene/hadoop/branches/branch-0.14/CHANGES.txt Wed Jul 25 14:58:00 2007
@@ -410,6 +410,8 @@
 137. HADOOP-1587.  Fix TestSymLink to get required system properties.
      (Devaraj Das via omalley)
 
+138. HADOOP-1628.  Add block CRC protocol unit tests. (Raghu Angadi via omalley)
+
 Release 0.13.0 - 2007-06-08
 
  1. HADOOP-1047.  Fix TestReplication to succeed more reliably.

Modified: lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/DFSClient.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/DFSClient.java?view=diff&rev=559628&r1=559627&r2=559628
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/DFSClient.java (original)
+++ lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/DFSClient.java Wed Jul
25 14:58:00 2007
@@ -1665,7 +1665,7 @@
           numSuccessfulWrites++;
 
           //We should wait for response from the receiver.
-          int reply = blockReplyStream.readByte();
+          int reply = blockReplyStream.readShort();
           if ( reply == OP_STATUS_SUCCESS ||
               ( reply == OP_STATUS_ERROR_EXISTS &&
                   numSuccessfulWrites > 1 ) ) {

Modified: lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/DataNode.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/DataNode.java?view=diff&rev=559628&r1=559627&r2=559628
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/DataNode.java (original)
+++ lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/DataNode.java Wed Jul
25 14:58:00 2007
@@ -875,7 +875,7 @@
         long blockLen = 0;
         long lastOffset = 0;
         long lastLen = 0;
-        int status = -1;
+        short status = -1;
         boolean headerWritten = false;
         
         while ( true ) {
@@ -1006,9 +1006,9 @@
           if ( mirrorOut != null ) {
             //Wait for the remote reply
             mirrorOut.flush();
-            byte result = OP_STATUS_ERROR; 
+            short result = OP_STATUS_ERROR; 
             try {
-              result = mirrorIn.readByte();
+              result = mirrorIn.readShort();
             } catch ( IOException ignored ) {}
 
             msg += " and " +  (( result != OP_STATUS_SUCCESS ) ? 
@@ -1023,7 +1023,7 @@
             
         if ( status >= 0 ) {
           try {
-            reply.writeByte( status );
+            reply.writeShort( status );
             reply.flush();
           } catch ( IOException ignored ) {}
         }
@@ -1133,6 +1133,10 @@
 
       int bytesPerChecksum = checksum.getBytesPerChecksum();
       int checksumSize = checksum.getChecksumSize();
+      
+      if (length < 0) {
+        length = data.getLength(block);
+      }
 
       long endOffset = data.getLength( block );
       if ( startOffset < 0 || startOffset > endOffset ||

Modified: lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/FSConstants.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/FSConstants.java?view=diff&rev=559628&r1=559627&r2=559628
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/FSConstants.java (original)
+++ lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/dfs/FSConstants.java Wed
Jul 25 14:58:00 2007
@@ -26,8 +26,6 @@
 public interface FSConstants {
   public static int MIN_BLOCKS_FOR_WRITE = 5;
 
-  public static final long WRITE_COMPLETE = 0xcafae11a;
-
   //
   // IPC Opcodes 
   //



Mime
View raw message