hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1581124 [2/5] - in /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs: ./ src/main/java/org/apache/hadoop/hdfs/ src/main/java/org/apache/hadoop/hdfs/client/ src/main/java/org/apache/hadoop/hdfs/net/ src/main/java/org/apache/hadoop/hdfs/p...
Date Mon, 24 Mar 2014 23:32:52 GMT
Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/BalancingPolicy.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/BalancingPolicy.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/BalancingPolicy.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/BalancingPolicy.java Mon Mar 24 23:32:37 2014
@@ -75,7 +75,7 @@ abstract class BalancingPolicy {
    * Cluster is balanced if each node is balanced.
    */
   static class Node extends BalancingPolicy {
-    static Node INSTANCE = new Node();
+    static final Node INSTANCE = new Node();
     private Node() {}
 
     @Override
@@ -99,7 +99,7 @@ abstract class BalancingPolicy {
    * Cluster is balanced if each pool in each node is balanced.
    */
   static class Pool extends BalancingPolicy {
-    static Pool INSTANCE = new Pool();
+    static final Pool INSTANCE = new Pool();
     private Pool() {}
 
     @Override

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java Mon Mar 24 23:32:37 2014
@@ -116,8 +116,8 @@ public class BlockManager {
   private volatile long corruptReplicaBlocksCount = 0L;
   private volatile long underReplicatedBlocksCount = 0L;
   private volatile long scheduledReplicationBlocksCount = 0L;
-  private AtomicLong excessBlocksCount = new AtomicLong(0L);
-  private AtomicLong postponedMisreplicatedBlocksCount = new AtomicLong(0L);
+  private final AtomicLong excessBlocksCount = new AtomicLong(0L);
+  private final AtomicLong postponedMisreplicatedBlocksCount = new AtomicLong(0L);
   
   /** Used by metrics */
   public long getPendingReplicationBlocksCount() {
@@ -3416,16 +3416,16 @@ assert storedBlock.findDatanode(dn) < 0 
 
   private static class ReplicationWork {
 
-    private Block block;
-    private BlockCollection bc;
+    private final Block block;
+    private final BlockCollection bc;
 
-    private DatanodeDescriptor srcNode;
-    private List<DatanodeDescriptor> containingNodes;
-    private List<DatanodeStorageInfo> liveReplicaStorages;
-    private int additionalReplRequired;
+    private final DatanodeDescriptor srcNode;
+    private final List<DatanodeDescriptor> containingNodes;
+    private final List<DatanodeStorageInfo> liveReplicaStorages;
+    private final int additionalReplRequired;
 
     private DatanodeStorageInfo targets[];
-    private int priority;
+    private final int priority;
 
     public ReplicationWork(Block block,
         BlockCollection bc,

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlocksMap.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlocksMap.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlocksMap.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlocksMap.java Mon Mar 24 23:32:37 2014
@@ -35,7 +35,7 @@ import com.google.common.collect.Iterabl
  */
 class BlocksMap {
   private static class StorageIterator implements Iterator<DatanodeStorageInfo> {
-    private BlockInfo blockInfo;
+    private final BlockInfo blockInfo;
     private int nextIdx = 0;
       
     StorageIterator(BlockInfo blkInfo) {

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/CorruptReplicasMap.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/CorruptReplicasMap.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/CorruptReplicasMap.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/CorruptReplicasMap.java Mon Mar 24 23:32:37 2014
@@ -46,7 +46,7 @@ public class CorruptReplicasMap{
     CORRUPTION_REPORTED  // client or datanode reported the corruption
   }
 
-  private SortedMap<Block, Map<DatanodeDescriptor, Reason>> corruptReplicasMap =
+  private final SortedMap<Block, Map<DatanodeDescriptor, Reason>> corruptReplicasMap =
     new TreeMap<Block, Map<DatanodeDescriptor, Reason>>();
   
   /**

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeDescriptor.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeDescriptor.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeDescriptor.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeDescriptor.java Mon Mar 24 23:32:37 2014
@@ -55,7 +55,7 @@ public class DatanodeDescriptor extends 
 
   // Stores status of decommissioning.
   // If node is not decommissioning, do not use this object for anything.
-  public DecommissioningStatus decommissioningStatus = new DecommissioningStatus();
+  public final DecommissioningStatus decommissioningStatus = new DecommissioningStatus();
   
   /** Block and targets pair */
   @InterfaceAudience.Private
@@ -190,12 +190,12 @@ public class DatanodeDescriptor extends 
   private long bandwidth;
 
   /** A queue of blocks to be replicated by this datanode */
-  private BlockQueue<BlockTargetPair> replicateBlocks = new BlockQueue<BlockTargetPair>();
+  private final BlockQueue<BlockTargetPair> replicateBlocks = new BlockQueue<BlockTargetPair>();
   /** A queue of blocks to be recovered by this datanode */
-  private BlockQueue<BlockInfoUnderConstruction> recoverBlocks =
+  private final BlockQueue<BlockInfoUnderConstruction> recoverBlocks =
                                 new BlockQueue<BlockInfoUnderConstruction>();
   /** A set of blocks to be invalidated by this datanode */
-  private LightWeightHashSet<Block> invalidateBlocks = new LightWeightHashSet<Block>();
+  private final LightWeightHashSet<Block> invalidateBlocks = new LightWeightHashSet<Block>();
 
   /* Variables for maintaining number of blocks scheduled to be written to
    * this storage. This count is approximate and might be slightly bigger

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/Host2NodesMap.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/Host2NodesMap.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/Host2NodesMap.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/Host2NodesMap.java Mon Mar 24 23:32:37 2014
@@ -31,9 +31,9 @@ import org.apache.hadoop.hdfs.DFSUtil;
 @InterfaceAudience.Private
 @InterfaceStability.Evolving
 class Host2NodesMap {
-  private HashMap<String, DatanodeDescriptor[]> map
+  private final HashMap<String, DatanodeDescriptor[]> map
     = new HashMap<String, DatanodeDescriptor[]>();
-  private ReadWriteLock hostmapLock = new ReentrantReadWriteLock();
+  private final ReadWriteLock hostmapLock = new ReentrantReadWriteLock();
 
   /** Check if node is already in the map. */
   boolean contains(DatanodeDescriptor node) {

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingDataNodeMessages.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingDataNodeMessages.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingDataNodeMessages.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingDataNodeMessages.java Mon Mar 24 23:32:37 2014
@@ -34,7 +34,7 @@ import com.google.common.collect.Maps;
  * */  
 class PendingDataNodeMessages {
   
-  Map<Block, Queue<ReportedBlockInfo>> queueByBlockId =
+  final Map<Block, Queue<ReportedBlockInfo>> queueByBlockId =
     Maps.newHashMap();
   private int count = 0;
   

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingReplicationBlocks.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingReplicationBlocks.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingReplicationBlocks.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingReplicationBlocks.java Mon Mar 24 23:32:37 2014
@@ -46,8 +46,8 @@ import org.apache.hadoop.util.Daemon;
 class PendingReplicationBlocks {
   private static final Log LOG = BlockManager.LOG;
 
-  private Map<Block, PendingBlockInfo> pendingReplications;
-  private ArrayList<Block> timedOutItems;
+  private final Map<Block, PendingBlockInfo> pendingReplications;
+  private final ArrayList<Block> timedOutItems;
   Daemon timerThread = null;
   private volatile boolean fsRunning = true;
 
@@ -56,7 +56,7 @@ class PendingReplicationBlocks {
   // a request is timed out.
   //
   private long timeout = 5 * 60 * 1000;
-  private long defaultRecheckInterval = 5 * 60 * 1000;
+  private final static long DEFAULT_RECHECK_INTERVAL = 5 * 60 * 1000;
 
   PendingReplicationBlocks(long timeoutPeriod) {
     if ( timeoutPeriod > 0 ) {
@@ -215,7 +215,7 @@ class PendingReplicationBlocks {
     @Override
     public void run() {
       while (fsRunning) {
-        long period = Math.min(defaultRecheckInterval, timeout);
+        long period = Math.min(DEFAULT_RECHECK_INTERVAL, timeout);
         try {
           pendingReplicationCheck();
           Thread.sleep(period);

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/UnderReplicatedBlocks.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/UnderReplicatedBlocks.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/UnderReplicatedBlocks.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/UnderReplicatedBlocks.java Mon Mar 24 23:32:37 2014
@@ -78,7 +78,7 @@ class UnderReplicatedBlocks implements I
   /** The queue for corrupt blocks: {@value} */
   static final int QUEUE_WITH_CORRUPT_BLOCKS = 4;
   /** the queues themselves */
-  private List<LightWeightLinkedSet<Block>> priorityQueues
+  private final List<LightWeightLinkedSet<Block>> priorityQueues
       = new ArrayList<LightWeightLinkedSet<Block>>(LEVEL);
 
   /** Create an object. */
@@ -378,7 +378,7 @@ class UnderReplicatedBlocks implements I
   class BlockIterator implements Iterator<Block> {
     private int level;
     private boolean isIteratorForLevel = false;
-    private List<Iterator<Block>> iterators = new ArrayList<Iterator<Block>>();
+    private final List<Iterator<Block>> iterators = new ArrayList<Iterator<Block>>();
 
     /**
      * Construct an iterator over all queues.

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/HdfsServerConstants.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/HdfsServerConstants.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/HdfsServerConstants.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/HdfsServerConstants.java Mon Mar 24 23:32:37 2014
@@ -196,10 +196,10 @@ public final class HdfsServerConstants {
   }
 
   // Timeouts for communicating with DataNode for streaming writes/reads
-  public static int READ_TIMEOUT = 60 * 1000;
-  public static int READ_TIMEOUT_EXTENSION = 5 * 1000;
-  public static int WRITE_TIMEOUT = 8 * 60 * 1000;
-  public static int WRITE_TIMEOUT_EXTENSION = 5 * 1000; //for write pipeline
+  public static final int READ_TIMEOUT = 60 * 1000;
+  public static final int READ_TIMEOUT_EXTENSION = 5 * 1000;
+  public static final int WRITE_TIMEOUT = 8 * 60 * 1000;
+  public static final int WRITE_TIMEOUT_EXTENSION = 5 * 1000; //for write pipeline
 
   /**
    * Defines the NameNode role.
@@ -233,7 +233,7 @@ public final class HdfsServerConstants {
     /** Temporary replica: created for replication and relocation only. */
     TEMPORARY(4);
 
-    private int value;
+    private final int value;
 
     private ReplicaState(int v) {
       value = v;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Storage.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Storage.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Storage.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Storage.java Mon Mar 24 23:32:37 2014
@@ -118,8 +118,8 @@ public abstract class Storage extends St
   protected List<StorageDirectory> storageDirs = new ArrayList<StorageDirectory>();
   
   private class DirIterator implements Iterator<StorageDirectory> {
-    StorageDirType dirType;
-    boolean includeShared;
+    final StorageDirType dirType;
+    final boolean includeShared;
     int prevIndex; // for remove()
     int nextIndex; // for next()
     

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/UpgradeStatusReport.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/UpgradeStatusReport.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/UpgradeStatusReport.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/UpgradeStatusReport.java Mon Mar 24 23:32:37 2014
@@ -27,9 +27,9 @@ import org.apache.hadoop.classification.
  */
 @InterfaceAudience.Private
 public class UpgradeStatusReport {
-  protected int version;
-  protected short upgradeStatus;
-  protected boolean finalized;
+  protected final int version;
+  protected final short upgradeStatus;
+  protected final boolean finalized;
 
   public UpgradeStatusReport(int version, short status, boolean isFinalized) {
     this.version = version;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPOfferService.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPOfferService.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPOfferService.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPOfferService.java Mon Mar 24 23:32:37 2014
@@ -78,7 +78,7 @@ class BPOfferService {
    * The list of all actors for namenodes in this nameservice, regardless
    * of their active or standby states.
    */
-  private List<BPServiceActor> bpServices =
+  private final List<BPServiceActor> bpServices =
     new CopyOnWriteArrayList<BPServiceActor>();
 
   /**

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java Mon Mar 24 23:32:37 2014
@@ -74,7 +74,7 @@ class BPServiceActor implements Runnable
   final InetSocketAddress nnAddr;
   HAServiceState state;
 
-  BPOfferService bpos;
+  final BPOfferService bpos;
   
   // lastBlockReport, lastDeletedReport and lastHeartbeat may be assigned/read
   // by testing threads (through BPServiceActor#triggerXXX), while also 
@@ -893,7 +893,7 @@ class BPServiceActor implements Runnable
   }
 
   private static class PerStoragePendingIncrementalBR {
-    private Map<Long, ReceivedDeletedBlockInfo> pendingIncrementalBR =
+    private final Map<Long, ReceivedDeletedBlockInfo> pendingIncrementalBR =
         Maps.newHashMap();
 
     /**

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockMetadataHeader.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockMetadataHeader.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockMetadataHeader.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockMetadataHeader.java Mon Mar 24 23:32:37 2014
@@ -54,7 +54,7 @@ public class BlockMetadataHeader {
    * Version is two bytes. Following it is the DataChecksum
    * that occupies 5 bytes. 
    */
-  private short version;
+  private final short version;
   private DataChecksum checksum = null;
     
   @VisibleForTesting

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolSliceScanner.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolSliceScanner.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolSliceScanner.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolSliceScanner.java Mon Mar 24 23:32:37 2014
@@ -361,7 +361,7 @@ class BlockPoolSliceScanner {
      * This simple text and easily extendable and easily parseable with a
      * regex.
      */
-    private static Pattern entryPattern = 
+    private static final Pattern entryPattern =
       Pattern.compile("\\G\\s*([^=\\p{Space}]+)=\"(.*?)\"\\s*");
     
     static String toString(long verificationTime, long genStamp, long blockId,

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java Mon Mar 24 23:32:37 2014
@@ -86,7 +86,7 @@ class BlockReceiver implements Closeable
   private int bytesPerChecksum;
   private int checksumSize;
   
-  private PacketReceiver packetReceiver =
+  private final PacketReceiver packetReceiver =
       new PacketReceiver(false);
   
   protected final String inAddr;
@@ -902,7 +902,7 @@ class BlockReceiver implements Closeable
     NON_PIPELINE, LAST_IN_PIPELINE, HAS_DOWNSTREAM_IN_PIPELINE
   }
   
-  private static Status[] MIRROR_ERROR_STATUS = {Status.SUCCESS, Status.ERROR};
+  private static final Status[] MIRROR_ERROR_STATUS = {Status.SUCCESS, Status.ERROR};
   
   /**
    * Processes responses from downstream datanodes in the pipeline

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java Mon Mar 24 23:32:37 2014
@@ -185,7 +185,7 @@ public class DataNode extends Configured
   private String clusterId = null;
 
   public final static String EMPTY_DEL_HINT = "";
-  AtomicInteger xmitsInProgress = new AtomicInteger();
+  final AtomicInteger xmitsInProgress = new AtomicInteger();
   Daemon dataXceiverServer = null;
   Daemon localDataXceiverServer = null;
   ShortCircuitRegistry shortCircuitRegistry = null;
@@ -223,11 +223,11 @@ public class DataNode extends Configured
   private SecureResources secureResources = null;
   private List<StorageLocation> dataDirs;
   private Configuration conf;
-  private String confVersion;
+  private final String confVersion;
   private final long maxNumberOfBlocksToLog;
 
   private final List<String> usersWithLocalPathAccess;
-  private boolean connectToDnViaHostname;
+  private final boolean connectToDnViaHostname;
   ReadaheadPool readaheadPool;
   private final boolean getHdfsBlockLocationsEnabled;
   private ObjectName dataNodeInfoBeanName;
@@ -1836,7 +1836,7 @@ public class DataNode extends Configured
   // Small wrapper around the DiskChecker class that provides means to mock
   // DiskChecker static methods and unittest DataNode#getDataDirsFromURIs.
   static class DataNodeDiskChecker {
-    private FsPermission expectedPermission;
+    private final FsPermission expectedPermission;
 
     public DataNodeDiskChecker(FsPermission expectedPermission) {
       this.expectedPermission = expectedPermission;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataStorage.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataStorage.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataStorage.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataStorage.java Mon Mar 24 23:32:37 2014
@@ -78,7 +78,7 @@ public class DataStorage extends Storage
   private boolean initialized = false;
   
   // Maps block pool IDs to block pool storage
-  private Map<String, BlockPoolSliceStorage> bpStorageMap
+  private final Map<String, BlockPoolSliceStorage> bpStorageMap
       = Collections.synchronizedMap(new HashMap<String, BlockPoolSliceStorage>());
 
 

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiverServer.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiverServer.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiverServer.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiverServer.java Mon Mar 24 23:32:37 2014
@@ -92,7 +92,7 @@ class DataXceiverServer implements Runna
    }
   }
 
-  BlockBalanceThrottler balanceThrottler;
+  final BlockBalanceThrottler balanceThrottler;
   
   /**
    * We need an estimate for block size to check if the disk partition has
@@ -102,7 +102,7 @@ class DataXceiverServer implements Runna
    * A better solution is to include in the header the estimated block size,
    * i.e. either the actual block size or the default block size.
    */
-  long estimateBlockSize;
+  final long estimateBlockSize;
   
   
   DataXceiverServer(PeerServer peerServer, Configuration conf,

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java Mon Mar 24 23:32:37 2014
@@ -64,8 +64,8 @@ public class DirectoryScanner implements
   private volatile boolean shouldRun = false;
   private boolean retainDiffs = false;
 
-  ScanInfoPerBlockPool diffs = new ScanInfoPerBlockPool();
-  Map<String, Stats> stats = new HashMap<String, Stats>();
+  final ScanInfoPerBlockPool diffs = new ScanInfoPerBlockPool();
+  final Map<String, Stats> stats = new HashMap<String, Stats>();
   
   /**
    * Allow retaining diffs for unit test and analysis
@@ -77,7 +77,7 @@ public class DirectoryScanner implements
 
   /** Stats tracked for reporting and testing, per blockpool */
   static class Stats {
-    String bpid;
+    final String bpid;
     long totalBlocks = 0;
     long missingMetaFile = 0;
     long missingBlockFile = 0;
@@ -570,7 +570,7 @@ public class DirectoryScanner implements
 
   private static class ReportCompiler 
   implements Callable<ScanInfoPerBlockPool> {
-    private FsVolumeSpi volume;
+    private final FsVolumeSpi volume;
 
     public ReportCompiler(FsVolumeSpi volume) {
       this.volume = volume;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/AvailableSpaceVolumeChoosingPolicy.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/AvailableSpaceVolumeChoosingPolicy.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/AvailableSpaceVolumeChoosingPolicy.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/AvailableSpaceVolumeChoosingPolicy.java Mon Mar 24 23:32:37 2014
@@ -82,11 +82,11 @@ public class AvailableSpaceVolumeChoosin
     return null;
   }
   
-  private VolumeChoosingPolicy<V> roundRobinPolicyBalanced =
+  private final VolumeChoosingPolicy<V> roundRobinPolicyBalanced =
       new RoundRobinVolumeChoosingPolicy<V>();
-  private VolumeChoosingPolicy<V> roundRobinPolicyHighAvailable =
+  private final VolumeChoosingPolicy<V> roundRobinPolicyHighAvailable =
       new RoundRobinVolumeChoosingPolicy<V>();
-  private VolumeChoosingPolicy<V> roundRobinPolicyLowAvailable =
+  private final VolumeChoosingPolicy<V> roundRobinPolicyLowAvailable =
       new RoundRobinVolumeChoosingPolicy<V>();
 
   @Override

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java Mon Mar 24 23:32:37 2014
@@ -62,7 +62,7 @@ class BlockPoolSlice {
   private final LDir finalizedDir; // directory store Finalized replica
   private final File rbwDir; // directory store RBW replica
   private final File tmpDir; // directory store Temporary replica
-  private static String DU_CACHE_FILE = "dfsUsed";
+  private static final String DU_CACHE_FILE = "dfsUsed";
   private volatile boolean dfsUsedSaved = false;
   private static final int SHUTDOWN_HOOK_PRIORITY = 30;
   

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetCache.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetCache.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetCache.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetCache.java Mon Mar 24 23:32:37 2014
@@ -145,7 +145,7 @@ public class FsDatasetCache {
   private class UsedBytesCount {
     private final AtomicLong usedBytes = new AtomicLong(0);
     
-    private PageRounder rounder = new PageRounder();
+    private final PageRounder rounder = new PageRounder();
 
     /**
      * Try to reserve more bytes.
@@ -196,11 +196,11 @@ public class FsDatasetCache {
   /**
    * Number of cache commands that could not be completed successfully
    */
-  AtomicLong numBlocksFailedToCache = new AtomicLong(0);
+  final AtomicLong numBlocksFailedToCache = new AtomicLong(0);
   /**
    * Number of uncache commands that could not be completed successfully
    */
-  AtomicLong numBlocksFailedToUncache = new AtomicLong(0);
+  final AtomicLong numBlocksFailedToUncache = new AtomicLong(0);
 
   public FsDatasetCache(FsDatasetImpl dataset) {
     this.dataset = dataset;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/ReplicaMap.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/ReplicaMap.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/ReplicaMap.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/ReplicaMap.java Mon Mar 24 23:32:37 2014
@@ -33,7 +33,7 @@ class ReplicaMap {
   private final Object mutex;
   
   // Map of block pool Id to another map of block Id to ReplicaInfo.
-  private Map<String, Map<Long, ReplicaInfo>> map = 
+  private final Map<String, Map<Long, ReplicaInfo>> map =
     new HashMap<String, Map<Long, ReplicaInfo>>();
   
   ReplicaMap(Object mutex) {

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/RollingLogsImpl.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/RollingLogsImpl.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/RollingLogsImpl.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/RollingLogsImpl.java Mon Mar 24 23:32:37 2014
@@ -46,7 +46,7 @@ class RollingLogsImpl implements Rolling
   private final File prev;
   private PrintWriter out; //require synchronized access
 
-  private Appender appender = new Appender() {
+  private final Appender appender = new Appender() {
     @Override
     public Appendable append(CharSequence csq) {
       synchronized(RollingLogsImpl.this) {

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeMetrics.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeMetrics.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeMetrics.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeMetrics.java Mon Mar 24 23:32:37 2014
@@ -78,18 +78,18 @@ public class DataNodeMetrics {
   @Metric MutableRate blockReports;
   @Metric MutableRate cacheReports;
   @Metric MutableRate packetAckRoundTripTimeNanos;
-  MutableQuantiles[] packetAckRoundTripTimeNanosQuantiles;
+  final MutableQuantiles[] packetAckRoundTripTimeNanosQuantiles;
   
   @Metric MutableRate flushNanos;
-  MutableQuantiles[] flushNanosQuantiles;
+  final MutableQuantiles[] flushNanosQuantiles;
   
   @Metric MutableRate fsyncNanos;
-  MutableQuantiles[] fsyncNanosQuantiles;
+  final MutableQuantiles[] fsyncNanosQuantiles;
   
   @Metric MutableRate sendDataPacketBlockedOnNetworkNanos;
-  MutableQuantiles[] sendDataPacketBlockedOnNetworkNanosQuantiles;
+  final MutableQuantiles[] sendDataPacketBlockedOnNetworkNanosQuantiles;
   @Metric MutableRate sendDataPacketTransferNanos;
-  MutableQuantiles[] sendDataPacketTransferNanosQuantiles;
+  final MutableQuantiles[] sendDataPacketTransferNanosQuantiles;
   
 
   final MetricsRegistry registry = new MetricsRegistry("datanode");

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/BackupImage.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/BackupImage.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/BackupImage.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/BackupImage.java Mon Mar 24 23:32:37 2014
@@ -41,7 +41,7 @@ import com.google.common.collect.Lists;
 @InterfaceAudience.Private
 public class BackupImage extends FSImage {
   /** Backup input stream for loading edits into memory */
-  private EditLogBackupInputStream backupInputStream =
+  private final EditLogBackupInputStream backupInputStream =
     new EditLogBackupInputStream("Data from remote NameNode");
   
   /**

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/CachePool.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/CachePool.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/CachePool.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/CachePool.java Mon Mar 24 23:32:37 2014
@@ -85,7 +85,7 @@ public final class CachePool {
 
   public final static class DirectiveList
       extends IntrusiveCollection<CacheDirective> {
-    private CachePool cachePool;
+    private final CachePool cachePool;
 
     private DirectiveList(CachePool cachePool) {
       this.cachePool = cachePool;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/Checkpointer.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/Checkpointer.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/Checkpointer.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/Checkpointer.java Mon Mar 24 23:32:37 2014
@@ -59,7 +59,7 @@ class Checkpointer extends Daemon {
   public static final Log LOG = 
     LogFactory.getLog(Checkpointer.class.getName());
 
-  private BackupNode backupNode;
+  private final BackupNode backupNode;
   volatile boolean shouldRun;
 
   private String infoBindAddress;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogBackupInputStream.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogBackupInputStream.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogBackupInputStream.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogBackupInputStream.java Mon Mar 24 23:32:37 2014
@@ -33,8 +33,8 @@ import com.google.common.base.Preconditi
  *  int, int, byte[])
  */
 class EditLogBackupInputStream extends EditLogInputStream {
-  String address; // sender address 
-  private ByteBufferInputStream inner;
+  final String address; // sender address
+  private final ByteBufferInputStream inner;
   private DataInputStream in;
   private FSEditLogOp.Reader reader = null;
   private FSEditLogLoader.PositionTrackingInputStream tracker = null;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogBackupOutputStream.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogBackupOutputStream.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogBackupOutputStream.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogBackupOutputStream.java Mon Mar 24 23:32:37 2014
@@ -43,8 +43,8 @@ import org.apache.hadoop.security.UserGr
  *  int, int, byte[])
  */
 class EditLogBackupOutputStream extends EditLogOutputStream {
-  private static Log LOG = LogFactory.getLog(EditLogFileOutputStream.class);
-  static int DEFAULT_BUFFER_SIZE = 256;
+  private static final Log LOG = LogFactory.getLog(EditLogFileOutputStream.class);
+  static final int DEFAULT_BUFFER_SIZE = 256;
 
   private final JournalProtocol backupNode;  // RPC proxy to backup node
   private final NamenodeRegistration bnRegistration;  // backup node registration

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogFileOutputStream.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogFileOutputStream.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogFileOutputStream.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogFileOutputStream.java Mon Mar 24 23:32:37 2014
@@ -42,14 +42,14 @@ import com.google.common.annotations.Vis
  */
 @InterfaceAudience.Private
 public class EditLogFileOutputStream extends EditLogOutputStream {
-  private static Log LOG = LogFactory.getLog(EditLogFileOutputStream.class);
+  private static final Log LOG = LogFactory.getLog(EditLogFileOutputStream.class);
   public static final int MIN_PREALLOCATION_LENGTH = 1024 * 1024;
 
   private File file;
   private FileOutputStream fp; // file stream for storing edit logs
   private FileChannel fc; // channel of the file stream for sync
   private EditsDoubleBuffer doubleBuf;
-  static ByteBuffer fill = ByteBuffer.allocateDirect(MIN_PREALLOCATION_LENGTH);
+  static final ByteBuffer fill = ByteBuffer.allocateDirect(MIN_PREALLOCATION_LENGTH);
   private boolean shouldSyncWritesAndSkipFsync = false;
 
   private static boolean shouldSkipFsyncForTests = false;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditsDoubleBuffer.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditsDoubleBuffer.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditsDoubleBuffer.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditsDoubleBuffer.java Mon Mar 24 23:32:37 2014
@@ -132,7 +132,7 @@ public class EditsDoubleBuffer {
   private static class TxnBuffer extends DataOutputBuffer {
     long firstTxId;
     int numTxns;
-    private Writer writer;
+    private final Writer writer;
     
     public TxnBuffer(int initBufferSize) {
       super(initBufferSize);

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java Mon Mar 24 23:32:37 2014
@@ -125,8 +125,8 @@ public class FSDirectory implements Clos
   private long yieldCount = 0; // keep track of lock yield count.
 
   // lock to protect the directory and BlockMap
-  private ReentrantReadWriteLock dirLock;
-  private Condition cond;
+  private final ReentrantReadWriteLock dirLock;
+  private final Condition cond;
 
   // utility methods to acquire and release read lock and write lock
   void readLock() {

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java Mon Mar 24 23:32:37 2014
@@ -172,7 +172,7 @@ public class FSEditLog implements LogsPu
   
   private final List<URI> editsDirs;
 
-  private ThreadLocal<OpInstanceCache> cache =
+  private final ThreadLocal<OpInstanceCache> cache =
       new ThreadLocal<OpInstanceCache>() {
     @Override
     protected OpInstanceCache initialValue() {

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java Mon Mar 24 23:32:37 2014
@@ -136,7 +136,7 @@ public abstract class FSEditLogOp {
   int rpcCallId = RpcConstants.INVALID_CALL_ID;
 
   final public static class OpInstanceCache {
-    private EnumMap<FSEditLogOpCodes, FSEditLogOp> inst = 
+    private final EnumMap<FSEditLogOpCodes, FSEditLogOp> inst =
         new EnumMap<FSEditLogOpCodes, FSEditLogOp>(FSEditLogOpCodes.class);
     
     public OpInstanceCache() {

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOpCodes.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOpCodes.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOpCodes.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOpCodes.java Mon Mar 24 23:32:37 2014
@@ -94,7 +94,7 @@ public enum FSEditLogOpCodes {
     return opCode;
   }
 
-  private static FSEditLogOpCodes[] VALUES;
+  private static final FSEditLogOpCodes[] VALUES;
   
   static {
     byte max = 0;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImage.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImage.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImage.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImage.java Mon Mar 24 23:32:37 2014
@@ -940,7 +940,7 @@ public class FSImage implements Closeabl
    */
   private class FSImageSaver implements Runnable {
     private final SaveNamespaceContext context;
-    private StorageDirectory sd;
+    private final StorageDirectory sd;
     private final NameNodeFile nnf;
 
     public FSImageSaver(SaveNamespaceContext context, StorageDirectory sd,

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormat.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormat.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormat.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormat.java Mon Mar 24 23:32:37 2014
@@ -903,7 +903,7 @@ public class FSImageFormat {
   }
 
   @VisibleForTesting
-  public static TreeMap<String, String> renameReservedMap =
+  public static final TreeMap<String, String> renameReservedMap =
       new TreeMap<String, String>();
 
   /**

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImagePreTransactionalStorageInspector.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImagePreTransactionalStorageInspector.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImagePreTransactionalStorageInspector.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImagePreTransactionalStorageInspector.java Mon Mar 24 23:32:37 2014
@@ -68,10 +68,10 @@ class FSImagePreTransactionalStorageInsp
   private StorageDirectory latestEditsSD = null;
 
   /** Set to determine if all of storageDirectories share the same checkpoint */
-  Set<Long> checkpointTimes = new HashSet<Long>();
+  final Set<Long> checkpointTimes = new HashSet<Long>();
 
-  private List<String> imageDirs = new ArrayList<String>();
-  private List<String> editsDirs = new ArrayList<String>();
+  private final List<String> imageDirs = new ArrayList<String>();
+  private final List<String> editsDirs = new ArrayList<String>();
   
   @Override
   void inspectDirectory(StorageDirectory sd) throws IOException {

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageTransactionalStorageInspector.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageTransactionalStorageInspector.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageTransactionalStorageInspector.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageTransactionalStorageInspector.java Mon Mar 24 23:32:37 2014
@@ -45,7 +45,7 @@ class FSImageTransactionalStorageInspect
   private boolean needToSave = false;
   private boolean isUpgradeFinalized = true;
   
-  List<FSImageFile> foundImages = new ArrayList<FSImageFile>();
+  final List<FSImageFile> foundImages = new ArrayList<FSImageFile>();
   private long maxSeenTxId = 0;
   
   private final List<Pattern> namePatterns = Lists.newArrayList();

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java Mon Mar 24 23:32:37 2014
@@ -488,7 +488,7 @@ public class FSNamesystem implements Nam
   private final long accessTimePrecision;
 
   /** Lock to protect FSNamesystem. */
-  private FSNamesystemLock fsLock;
+  private final FSNamesystemLock fsLock;
 
   /**
    * Used when this NN is in standby state to read from the shared edit log.
@@ -4653,15 +4653,15 @@ public class FSNamesystem implements Nam
   public class SafeModeInfo {
     // configuration fields
     /** Safe mode threshold condition %.*/
-    private double threshold;
+    private final double threshold;
     /** Safe mode minimum number of datanodes alive */
-    private int datanodeThreshold;
+    private final int datanodeThreshold;
     /** Safe mode extension after the threshold. */
     private int extension;
     /** Min replication required by safe mode. */
-    private int safeReplication;
+    private final int safeReplication;
     /** threshold for populating needed replication queues */
-    private double replQueueThreshold;
+    private final double replQueueThreshold;
     // internal fields
     /** Time when threshold was reached.
      * <br> -1 safe mode is off
@@ -6097,8 +6097,8 @@ public class FSNamesystem implements Nam
   }
 
   static class CorruptFileBlockInfo {
-    String path;
-    Block block;
+    final String path;
+    final Block block;
     
     public CorruptFileBlockInfo(String p, Block b) {
       path = p;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystemLock.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystemLock.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystemLock.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystemLock.java Mon Mar 24 23:32:37 2014
@@ -50,7 +50,7 @@ class FSNamesystemLock implements ReadWr
    * See HDFS-5064 for more context.
    */
   @VisibleForTesting
-  protected ReentrantLock longReadLock = new ReentrantLock(true);
+  protected final ReentrantLock longReadLock = new ReentrantLock(true);
   
   FSNamesystemLock(boolean fair) {
     this.coarseLock = new ReentrantReadWriteLock(fair);

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/HostFileManager.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/HostFileManager.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/HostFileManager.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/HostFileManager.java Mon Mar 24 23:32:37 2014
@@ -168,7 +168,7 @@ public class HostFileManager {
      * The different indexing strategies reflect the fact that we may or may
      * not have a port or IP address for each entry.
      */
-    TreeMap<String, Entry> index = new TreeMap<String, Entry>();
+    final TreeMap<String, Entry> index = new TreeMap<String, Entry>();
 
     public boolean isEmpty() {
       return index.isEmpty();

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INode.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INode.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INode.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INode.java Mon Mar 24 23:32:37 2014
@@ -750,7 +750,7 @@ public abstract class INode implements I
     /**
      * The list of blocks that need to be removed from blocksMap
      */
-    private List<Block> toDeleteList;
+    private final List<Block> toDeleteList;
     
     public BlocksMapUpdateInfo() {
       toDeleteList = new ChunkedArrayList<Block>();

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ImageServlet.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ImageServlet.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ImageServlet.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ImageServlet.java Mon Mar 24 23:32:37 2014
@@ -81,7 +81,7 @@ public class ImageServlet extends HttpSe
   private static final String LATEST_FSIMAGE_VALUE = "latest";
   private static final String IMAGE_FILE_TYPE = "imageFile";
 
-  private static Set<Long> currentlyDownloadingCheckpoints =
+  private static final Set<Long> currentlyDownloadingCheckpoints =
     Collections.<Long>synchronizedSet(new HashSet<Long>());
   
   @Override

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/JournalSet.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/JournalSet.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/JournalSet.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/JournalSet.java Mon Mar 24 23:32:37 2014
@@ -177,7 +177,7 @@ public class JournalSet implements Journ
   // COW implementation is necessary since some users (eg the web ui) call
   // getAllJournalStreams() and then iterate. Since this is rarely
   // mutated, there is no performance concern.
-  private List<JournalAndStream> journals =
+  private final List<JournalAndStream> journals =
       new CopyOnWriteArrayList<JournalSet.JournalAndStream>();
   final int minimumRedundantJournals;
   

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java Mon Mar 24 23:32:37 2014
@@ -77,15 +77,15 @@ public class LeaseManager {
   // Used for handling lock-leases
   // Mapping: leaseHolder -> Lease
   //
-  private SortedMap<String, Lease> leases = new TreeMap<String, Lease>();
+  private final SortedMap<String, Lease> leases = new TreeMap<String, Lease>();
   // Set of: Lease
-  private SortedSet<Lease> sortedLeases = new TreeSet<Lease>();
+  private final SortedSet<Lease> sortedLeases = new TreeSet<Lease>();
 
   // 
   // Map path names to leases. It is protected by the sortedLeases lock.
   // The map stores pathnames in lexicographical order.
   //
-  private SortedMap<String, Lease> sortedLeasesByPath = new TreeMap<String, Lease>();
+  private final SortedMap<String, Lease> sortedLeasesByPath = new TreeMap<String, Lease>();
 
   private Daemon lmthread;
   private volatile boolean shouldRunMonitor;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NNStorage.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NNStorage.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NNStorage.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NNStorage.java Mon Mar 24 23:32:37 2014
@@ -117,7 +117,7 @@ public class NNStorage extends Storage i
    * flag that controls if we try to restore failed storages
    */
   private boolean restoreFailedStorage = false;
-  private Object restorationLock = new Object();
+  private final Object restorationLock = new Object();
   private boolean disablePreUpgradableLayoutCheck = false;
 
 

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java Mon Mar 24 23:32:37 2014
@@ -249,11 +249,11 @@ public class NameNode implements NameNod
   
   protected FSNamesystem namesystem; 
   protected final Configuration conf;
-  protected NamenodeRole role;
+  protected final NamenodeRole role;
   private volatile HAState state;
   private final boolean haEnabled;
   private final HAContext haContext;
-  protected boolean allowStaleStandbyReads;
+  protected final boolean allowStaleStandbyReads;
 
   
   /** httpServer */

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeHttpServer.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeHttpServer.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeHttpServer.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeHttpServer.java Mon Mar 24 23:32:37 2014
@@ -52,7 +52,7 @@ public class NameNodeHttpServer {
   
   private InetSocketAddress httpAddress;
   private InetSocketAddress httpsAddress;
-  private InetSocketAddress bindAddress;
+  private final InetSocketAddress bindAddress;
   
   public static final String NAMENODE_ADDRESS_ATTRIBUTE_KEY = "name.node.address";
   public static final String FSIMAGE_ATTRIBUTE_KEY = "name.system.image";

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeResourceChecker.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeResourceChecker.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeResourceChecker.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeResourceChecker.java Mon Mar 24 23:32:37 2014
@@ -50,7 +50,7 @@ public class NameNodeResourceChecker {
   private static final Log LOG = LogFactory.getLog(NameNodeResourceChecker.class.getName());
 
   // Space (in bytes) reserved per volume.
-  private long duReserved;
+  private final long duReserved;
 
   private final Configuration conf;
   private Map<String, CheckedVolume> volumes;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java Mon Mar 24 23:32:37 2014
@@ -144,13 +144,13 @@ public class NamenodeFsck {
   // We return back N files that are corrupt; the list of files returned is
   // ordered by block id; to allow continuation support, pass in the last block
   // # from previous call
-  private String[] currentCookie = new String[] { null };
+  private final String[] currentCookie = new String[] { null };
 
   private final Configuration conf;
   private final PrintWriter out;
   private List<String> snapshottableDirs = null;
 
-  private BlockPlacementPolicy bpPolicy;
+  private final BlockPlacementPolicy bpPolicy;
 
   /**
    * Filesystem checker.
@@ -716,7 +716,7 @@ public class NamenodeFsck {
    */
   @VisibleForTesting
   static class Result {
-    List<String> missingIds = new ArrayList<String>();
+    final List<String> missingIds = new ArrayList<String>();
     long missingSize = 0L;
     long corruptFiles = 0L;
     long corruptBlocks = 0L;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SaveNamespaceContext.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SaveNamespaceContext.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SaveNamespaceContext.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SaveNamespaceContext.java Mon Mar 24 23:32:37 2014
@@ -41,7 +41,7 @@ public class SaveNamespaceContext {
     Collections.synchronizedList(new ArrayList<StorageDirectory>());
   
   private final Canceler canceller;
-  private CountDownLatch completionLatch = new CountDownLatch(1);
+  private final CountDownLatch completionLatch = new CountDownLatch(1);
 
   SaveNamespaceContext(
       FSNamesystem sourceNamesystem,

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java Mon Mar 24 23:32:37 2014
@@ -794,8 +794,8 @@ public class SecondaryNameNode implement
     private int mergeErrorCount;
     private static class CheckpointLogPurger implements LogsPurgeable {
       
-      private NNStorage storage;
-      private StoragePurger purger
+      private final NNStorage storage;
+      private final StoragePurger purger
           = new NNStorageRetentionManager.DeletionStoragePurger();
       
       public CheckpointLogPurger(NNStorage storage) {

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SerialNumberManager.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SerialNumberManager.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SerialNumberManager.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SerialNumberManager.java Mon Mar 24 23:32:37 2014
@@ -27,8 +27,8 @@ class SerialNumberManager {
   /** This is the only instance of {@link SerialNumberManager}.*/
   static final SerialNumberManager INSTANCE = new SerialNumberManager();
 
-  private SerialNumberMap<String> usermap = new SerialNumberMap<String>();
-  private SerialNumberMap<String> groupmap = new SerialNumberMap<String>();
+  private final SerialNumberMap<String> usermap = new SerialNumberMap<String>();
+  private final SerialNumberMap<String> groupmap = new SerialNumberMap<String>();
 
   private SerialNumberManager() {}
 
@@ -43,9 +43,9 @@ class SerialNumberManager {
   }
 
   private static class SerialNumberMap<T> {
-    private AtomicInteger max = new AtomicInteger(1);
-    private ConcurrentMap<T, Integer> t2i = new ConcurrentHashMap<T, Integer>();
-    private ConcurrentMap<Integer, T> i2t = new ConcurrentHashMap<Integer, T>();
+    private final AtomicInteger max = new AtomicInteger(1);
+    private final ConcurrentMap<T, Integer> t2i = new ConcurrentHashMap<T, Integer>();
+    private final ConcurrentMap<Integer, T> i2t = new ConcurrentHashMap<Integer, T>();
 
     int get(T t) {
       if (t == null) {

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/TransferFsImage.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/TransferFsImage.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/TransferFsImage.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/TransferFsImage.java Mon Mar 24 23:32:37 2014
@@ -79,8 +79,8 @@ public class TransferFsImage {
 
   @VisibleForTesting
   static int timeout = 0;
-  private static URLConnectionFactory connectionFactory;
-  private static boolean isSpnegoEnabled;
+  private static final URLConnectionFactory connectionFactory;
+  private static final boolean isSpnegoEnabled;
 
   static {
     Configuration conf = new Configuration();

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ConfiguredFailoverProxyProvider.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ConfiguredFailoverProxyProvider.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ConfiguredFailoverProxyProvider.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ConfiguredFailoverProxyProvider.java Mon Mar 24 23:32:37 2014
@@ -141,7 +141,7 @@ public class ConfiguredFailoverProxyProv
    * an NN. Note that {@link AddressRpcProxyPair#namenode} may be null.
    */
   private static class AddressRpcProxyPair<T> {
-    public InetSocketAddress address;
+    public final InetSocketAddress address;
     public T namenode;
     
     public AddressRpcProxyPair(InetSocketAddress address) {

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/EditLogTailer.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/EditLogTailer.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/EditLogTailer.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/EditLogTailer.java Mon Mar 24 23:32:37 2014
@@ -91,13 +91,13 @@ public class EditLogTailer {
    * from finalized log segments, the Standby will only be as up-to-date as how
    * often the logs are rolled.
    */
-  private long logRollPeriodMs;
+  private final long logRollPeriodMs;
 
   /**
    * How often the Standby should check if there are new finalized segment(s)
    * available to be read from.
    */
-  private long sleepTimeMs;
+  private final long sleepTimeMs;
   
   public EditLogTailer(FSNamesystem namesystem, Configuration conf) {
     this.tailerThread = new EditLogTailerThread();

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/StandbyCheckpointer.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/StandbyCheckpointer.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/StandbyCheckpointer.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/StandbyCheckpointer.java Mon Mar 24 23:32:37 2014
@@ -71,7 +71,7 @@ public class StandbyCheckpointer {
   private URL activeNNAddress;
   private URL myNNAddress;
 
-  private Object cancelLock = new Object();
+  private final Object cancelLock = new Object();
   private Canceler canceler;
   
   // Keep track of how many checkpoints were canceled.

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/metrics/NameNodeMetrics.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/metrics/NameNodeMetrics.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/metrics/NameNodeMetrics.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/metrics/NameNodeMetrics.java Mon Mar 24 23:32:37 2014
@@ -76,13 +76,13 @@ public class NameNodeMetrics {
 
   @Metric("Journal transactions") MutableRate transactions;
   @Metric("Journal syncs") MutableRate syncs;
-  MutableQuantiles[] syncsQuantiles;
+  final MutableQuantiles[] syncsQuantiles;
   @Metric("Journal transactions batched in sync")
   MutableCounterLong transactionsBatchedInSync;
   @Metric("Block report") MutableRate blockReport;
-  MutableQuantiles[] blockReportQuantiles;
+  final MutableQuantiles[] blockReportQuantiles;
   @Metric("Cache report") MutableRate cacheReport;
-  MutableQuantiles[] cacheReportQuantiles;
+  final MutableQuantiles[] cacheReportQuantiles;
 
   @Metric("Duration in SafeMode at startup in msec")
   MutableGaugeInt safeModeTime;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/startupprogress/PhaseTracking.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/startupprogress/PhaseTracking.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/startupprogress/PhaseTracking.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/startupprogress/PhaseTracking.java Mon Mar 24 23:32:37 2014
@@ -29,7 +29,7 @@ import org.apache.hadoop.classification.
 final class PhaseTracking extends AbstractTracking {
   String file;
   long size = Long.MIN_VALUE;
-  ConcurrentMap<Step, StepTracking> steps =
+  final ConcurrentMap<Step, StepTracking> steps =
     new ConcurrentHashMap<Step, StepTracking>();
 
   @Override

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/startupprogress/StartupProgress.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/startupprogress/StartupProgress.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/startupprogress/StartupProgress.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/startupprogress/StartupProgress.java Mon Mar 24 23:32:37 2014
@@ -49,7 +49,7 @@ import org.apache.hadoop.classification.
 @InterfaceAudience.Private
 public class StartupProgress {
   // package-private for access by StartupProgressView
-  Map<Phase, PhaseTracking> phases =
+  final Map<Phase, PhaseTracking> phases =
     new ConcurrentHashMap<Phase, PhaseTracking>();
 
   /**

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/BalancerBandwidthCommand.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/BalancerBandwidthCommand.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/BalancerBandwidthCommand.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/BalancerBandwidthCommand.java Mon Mar 24 23:32:37 2014
@@ -36,7 +36,7 @@ package org.apache.hadoop.hdfs.server.pr
 public class BalancerBandwidthCommand extends DatanodeCommand {
   private final static long BBC_DEFAULTBANDWIDTH = 0L;
 
-  private long bandwidth;
+  private final long bandwidth;
 
   /**
    * Balancer Bandwidth Command constructor. Sets bandwidth to 0.

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/BlockRecoveryCommand.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/BlockRecoveryCommand.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/BlockRecoveryCommand.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/BlockRecoveryCommand.java Mon Mar 24 23:32:37 2014
@@ -41,7 +41,7 @@ import com.google.common.base.Joiner;
 @InterfaceAudience.Private
 @InterfaceStability.Evolving
 public class BlockRecoveryCommand extends DatanodeCommand {
-  Collection<RecoveringBlock> recoveringBlocks;
+  final Collection<RecoveringBlock> recoveringBlocks;
 
   /**
    * This is a block with locations from which it should be recovered
@@ -53,7 +53,7 @@ public class BlockRecoveryCommand extend
   @InterfaceAudience.Private
   @InterfaceStability.Evolving
   public static class RecoveringBlock extends LocatedBlock {
-    private long newGenerationStamp;
+    private final long newGenerationStamp;
 
     /**
      * Create RecoveringBlock.

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/BlocksWithLocations.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/BlocksWithLocations.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/BlocksWithLocations.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/BlocksWithLocations.java Mon Mar 24 23:32:37 2014
@@ -78,7 +78,7 @@ public class BlocksWithLocations {
     }
   }
 
-  private BlockWithLocations[] blocks;
+  private final BlockWithLocations[] blocks;
 
   /** Constructor with one parameter */
   public BlocksWithLocations(BlockWithLocations[] blocks) {

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/CheckpointCommand.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/CheckpointCommand.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/CheckpointCommand.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/CheckpointCommand.java Mon Mar 24 23:32:37 2014
@@ -39,8 +39,8 @@ import org.apache.hadoop.hdfs.server.nam
 @InterfaceAudience.Private
 @InterfaceStability.Evolving
 public class CheckpointCommand extends NamenodeCommand {
-  private CheckpointSignature cSig;
-  private boolean needToReturnImage;
+  private final CheckpointSignature cSig;
+  private final boolean needToReturnImage;
 
   public CheckpointCommand() {
     this(null, false);

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java Mon Mar 24 23:32:37 2014
@@ -35,9 +35,9 @@ import org.apache.hadoop.hdfs.server.com
 public class DatanodeRegistration extends DatanodeID
     implements NodeRegistration {
 
-  private StorageInfo storageInfo;
+  private final StorageInfo storageInfo;
   private ExportedBlockKeys exportedKeys;
-  private String softwareVersion;
+  private final String softwareVersion;
 
   public DatanodeRegistration(DatanodeID dn, StorageInfo info,
       ExportedBlockKeys keys, String softwareVersion) {

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/HeartbeatResponse.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/HeartbeatResponse.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/HeartbeatResponse.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/HeartbeatResponse.java Mon Mar 24 23:32:37 2014
@@ -28,12 +28,12 @@ import org.apache.hadoop.hdfs.protocol.R
  */
 public class HeartbeatResponse {
   /** Commands returned from the namenode to the datanode */
-  private DatanodeCommand[] commands;
+  private final DatanodeCommand[] commands;
   
   /** Information about the current HA-related state of the NN */
-  private NNHAStatusHeartbeat haStatus;
+  private final NNHAStatusHeartbeat haStatus;
 
-  private RollingUpgradeStatus rollingUpdateStatus;
+  private final RollingUpgradeStatus rollingUpdateStatus;
   
   public HeartbeatResponse(DatanodeCommand[] cmds,
       NNHAStatusHeartbeat haStatus, RollingUpgradeStatus rollingUpdateStatus) {



Mime
View raw message