Browse Source

HADOOP-2832. Remove tabs from code of DFSClient for better
indentation. (dhruba)



git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@627860 13f79535-47bb-0310-9956-ffa450edef68

Dhruba Borthakur 17 years ago
parent
commit
e6e1fa2f89

+ 3 - 0
CHANGES.txt

@@ -41,6 +41,9 @@ Trunk (unreleased changes)
     HADOOP-2191. du and dus command on non-existent directory gives 
     appropriate error message.  (Mahadev Konar via dhruba)
 
+    HADOOP-2832. Remove tabs from code of DFSClient for better
+    indentation. (dhruba)
+
 Release 0.16.1 - Unrelease
 
   BUG FIXES

+ 23 - 23
src/java/org/apache/hadoop/dfs/DFSClient.java

@@ -1632,9 +1632,9 @@ class DFSClient implements FSConstants {
                         " lastPacketInBlock:" + one.lastPacketInBlock);
             } catch (IOException e) {
               LOG.warn("DataStreamer Exception: " + e);
-			  hasError = true;
-		    }
-	      }
+              hasError = true;
+            }
+          }
 
           if (closed || hasError || !clientRunning) {
             continue;
@@ -1684,8 +1684,8 @@ class DFSClient implements FSConstants {
               Thread.sleep(artificialSlowdown); 
             } catch (InterruptedException e) {}
           }
-		}
-	  }
+        }
+      }
 
       // shutdown thread
       void close() {
@@ -1698,12 +1698,12 @@ class DFSClient implements FSConstants {
         }
         this.interrupt();
       }
-	}
-		  
+    }
+                  
+    //
+    // Processes reponses from the datanodes.  A packet is removed 
+    // from the ackQueue when its response arrives.
     //
-	// Processes reponses from the datanodes.  A packet is removed 
-	// from the ackQueue when its response arrives.
-	//
     private class ResponseProcessor extends Thread {
 
       private volatile boolean closed = false;
@@ -1714,31 +1714,31 @@ class DFSClient implements FSConstants {
         this.targets = targets;
       }
 
-	  public void run() {
+      public void run() {
 
         this.setName("ResponseProcessor for block " + block);
   
         while (!closed && clientRunning && !lastPacketInBlock) {
-		    // process responses from datanodes.
-		    try {
-			  // verify seqno from datanode
+          // process responses from datanodes.
+          try {
+              // verify seqno from datanode
               int numTargets = -1;
-			  long seqno = blockReplyStream.readLong();
+              long seqno = blockReplyStream.readLong();
               LOG.debug("DFSClient received ack for seqno " + seqno);
               if (seqno == -1) {
                 continue;
               } else if (seqno == -2) {
                 // no nothing
               } else {
-			    Packet one = null;
-			    synchronized (ackQueue) {
-			      one = ackQueue.getFirst();
-			    }
-			    if (one.seqno != seqno) {
-			      throw new IOException("Responseprocessor: Expecting seqno " + 
+                Packet one = null;
+                synchronized (ackQueue) {
+                  one = ackQueue.getFirst();
+                }
+                if (one.seqno != seqno) {
+                  throw new IOException("Responseprocessor: Expecting seqno " + 
                                         " for block " + block +
-			                            one.seqno + " but received " + seqno);
-			    }
+                                        one.seqno + " but received " + seqno);
+                }
                 lastPacketInBlock = one.lastPacketInBlock;
               }
 

+ 4 - 4
src/java/org/apache/hadoop/dfs/DataNode.java

@@ -171,7 +171,7 @@ public class DataNode implements FSConstants, Runnable {
    * This method starts the data node with the specified conf.
    * 
    * @param conf - the configuration
-   * 		if conf's CONFIG_PROPERTY_SIMULATED property is set
+   *  if conf's CONFIG_PROPERTY_SIMULATED property is set
    *  then a simulated storage based data node is created.
    * 
    * @param dataDirs - only for a non-simulated storage data node
@@ -262,7 +262,7 @@ public class DataNode implements FSConstants, Runnable {
     if (this.initialBlockReportDelay >= blockReportIntervalBasis) {
       this.initialBlockReportDelay = 0;
       LOG.info("dfs.blockreport.initialDelay is greater than " +
-      	"dfs.blockreport.intervalMsec." + " Setting initial delay to 0 msec:");
+        "dfs.blockreport.intervalMsec." + " Setting initial delay to 0 msec:");
     }
     this.heartBeatInterval = conf.getLong("dfs.heartbeat.interval", HEARTBEAT_INTERVAL) * 1000L;
     DataNode.nameNodeAddr = nameNodeAddr;
@@ -1981,7 +1981,7 @@ public class DataNode implements FSConstants, Runnable {
         // Open local disk out
         //
         streams = data.writeToBlock(block, isRecovery);
-		this.finalized = data.isValidBlock(block);
+        this.finalized = data.isValidBlock(block);
         if (streams != null) {
           this.bufStream = new DFSBufferedOutputStream(
                                           streams.dataOut, BUFFER_SIZE);
@@ -2644,7 +2644,7 @@ public class DataNode implements FSConstants, Runnable {
   public void scheduleBlockReport(long delay) {
     if (delay > 0) { // send BR after random delay
       lastBlockReport = System.currentTimeMillis()
-  							- ( blockReportInterval - new Random().nextInt((int)(delay)));
+                            - ( blockReportInterval - new Random().nextInt((int)(delay)));
     } else { // send at next heartbeat
       lastBlockReport = lastHeartbeat - blockReportInterval;
     }