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 [3/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/protocol/KeyUpdateCommand.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/KeyUpdateCommand.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/KeyUpdateCommand.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/KeyUpdateCommand.java Mon Mar 24 23:32:37 2014
@@ -24,7 +24,7 @@ import org.apache.hadoop.hdfs.security.t
 @InterfaceAudience.Private
 @InterfaceStability.Evolving
 public class KeyUpdateCommand extends DatanodeCommand {
-  private ExportedBlockKeys keys;
+  private final ExportedBlockKeys keys;
 
   KeyUpdateCommand() {
     this(new ExportedBlockKeys());

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/NNHAStatusHeartbeat.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/NNHAStatusHeartbeat.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/NNHAStatusHeartbeat.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/NNHAStatusHeartbeat.java Mon Mar 24 23:32:37 2014
@@ -26,7 +26,7 @@ import org.apache.hadoop.hdfs.protocol.H
 @InterfaceStability.Evolving
 public class NNHAStatusHeartbeat {
 
-  private HAServiceState state;
+  private final HAServiceState state;
   private long txid = HdfsConstants.INVALID_TXID;
   
   public NNHAStatusHeartbeat(HAServiceState state, long txid) {

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/NamenodeRegistration.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/NamenodeRegistration.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/NamenodeRegistration.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/NamenodeRegistration.java Mon Mar 24 23:32:37 2014
@@ -32,9 +32,9 @@ import org.apache.hadoop.hdfs.server.com
 @InterfaceStability.Evolving
 public class NamenodeRegistration extends StorageInfo
 implements NodeRegistration {
-  String rpcAddress;          // RPC address of the node
-  String httpAddress;         // HTTP address of the node
-  NamenodeRole role;          // node role
+  final String rpcAddress;          // RPC address of the node
+  final String httpAddress;         // HTTP address of the node
+  final NamenodeRole role;          // node role
 
   public NamenodeRegistration(String address,
                               String httpAddress,

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/NamespaceInfo.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/NamespaceInfo.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/NamespaceInfo.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/NamespaceInfo.java Mon Mar 24 23:32:37 2014
@@ -37,7 +37,7 @@ import org.apache.hadoop.util.VersionInf
 @InterfaceAudience.Private
 @InterfaceStability.Evolving
 public class NamespaceInfo extends StorageInfo {
-  String  buildVersion;
+  final String  buildVersion;
   String blockPoolID = "";    // id of the block pool
   String softwareVersion;
 

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/ReplicaRecoveryInfo.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/ReplicaRecoveryInfo.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/ReplicaRecoveryInfo.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/ReplicaRecoveryInfo.java Mon Mar 24 23:32:37 2014
@@ -29,7 +29,7 @@ import org.apache.hadoop.hdfs.server.com
 @InterfaceAudience.Private
 @InterfaceStability.Evolving
 public class ReplicaRecoveryInfo extends Block {
-  private ReplicaState originalState;
+  private final ReplicaState originalState;
 
   public ReplicaRecoveryInfo(long blockId, long diskLen, long gs, ReplicaState rState) {
     set(blockId, diskLen, gs);

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/ServerCommand.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/ServerCommand.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/ServerCommand.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/ServerCommand.java Mon Mar 24 23:32:37 2014
@@ -31,7 +31,7 @@ import org.apache.hadoop.classification.
 @InterfaceAudience.Private
 @InterfaceStability.Evolving
 public abstract class ServerCommand {
-  private int action;
+  private final int action;
 
   /**
    * Create a command for the specified action.

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/StorageReceivedDeletedBlocks.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/StorageReceivedDeletedBlocks.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/StorageReceivedDeletedBlocks.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/StorageReceivedDeletedBlocks.java Mon Mar 24 23:32:37 2014
@@ -23,7 +23,7 @@ package org.apache.hadoop.hdfs.server.pr
  * storage.
  */
 public class StorageReceivedDeletedBlocks {
-  DatanodeStorage storage;
+  final DatanodeStorage storage;
   private final ReceivedDeletedBlockInfo[] blocks;
 
   @Deprecated

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/CacheAdmin.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/CacheAdmin.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/CacheAdmin.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/CacheAdmin.java Mon Mar 24 23:32:37 2014
@@ -1032,7 +1032,7 @@ public class CacheAdmin extends Configur
     }
   }
 
-  private static Command[] COMMANDS = {
+  private static final Command[] COMMANDS = {
     new AddCacheDirectiveInfoCommand(),
     new ModifyCacheDirectiveInfoCommand(),
     new ListCacheDirectiveInfoCommand(),

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSZKFailoverController.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSZKFailoverController.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSZKFailoverController.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSZKFailoverController.java Mon Mar 24 23:32:37 2014
@@ -53,7 +53,7 @@ public class DFSZKFailoverController ext
 
   private static final Log LOG =
     LogFactory.getLog(DFSZKFailoverController.class);
-  private AccessControlList adminAcl;
+  private final AccessControlList adminAcl;
   /* the same as superclass's localTarget, but with the more specfic NN type */
   private final NNHAServiceTarget localNNTarget;
 

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/GetConf.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/GetConf.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/GetConf.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/GetConf.java Mon Mar 24 23:32:37 2014
@@ -76,7 +76,7 @@ public class GetConf extends Configured 
     NNRPCADDRESSES("-nnRpcAddresses", "gets the namenode rpc addresses"),
     CONFKEY("-confKey [key]", "gets a specific key from the configuration");
 
-    private static Map<String, CommandHandler> map;
+    private static final Map<String, CommandHandler> map;
     static  {
       map = new HashMap<String, CommandHandler>();
       map.put(NAMENODE.getName().toLowerCase(), 

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/TableListing.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/TableListing.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/TableListing.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/TableListing.java Mon Mar 24 23:32:37 2014
@@ -191,8 +191,8 @@ public class TableListing {
   private final Column columns[];
 
   private int numRows;
-  private boolean showHeader;
-  private int wrapWidth;
+  private final boolean showHeader;
+  private final int wrapWidth;
 
   TableListing(Column columns[], boolean showHeader, int wrapWidth) {
     this.columns = columns;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/OfflineEditsBinaryLoader.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/OfflineEditsBinaryLoader.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/OfflineEditsBinaryLoader.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/OfflineEditsBinaryLoader.java Mon Mar 24 23:32:37 2014
@@ -35,8 +35,8 @@ import org.apache.hadoop.io.IOUtils;
 @InterfaceAudience.Private
 @InterfaceStability.Unstable
 class OfflineEditsBinaryLoader implements OfflineEditsLoader {
-  private OfflineEditsVisitor visitor;
-  private EditLogInputStream inputStream;
+  private final OfflineEditsVisitor visitor;
+  private final EditLogInputStream inputStream;
   private final boolean fixTxIds;
   private final boolean recoveryMode;
   private long nextTxId;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/TeeOutputStream.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/TeeOutputStream.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/TeeOutputStream.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/TeeOutputStream.java Mon Mar 24 23:32:37 2014
@@ -24,7 +24,7 @@ import java.io.OutputStream;
  * A TeeOutputStream writes its output to multiple output streams.
  */
 public class TeeOutputStream extends OutputStream {
-  private OutputStream outs[];
+  private final OutputStream[] outs;
 
   public TeeOutputStream(OutputStream outs[]) {
     this.outs = outs;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/XmlEditsVisitor.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/XmlEditsVisitor.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/XmlEditsVisitor.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/XmlEditsVisitor.java Mon Mar 24 23:32:37 2014
@@ -39,7 +39,7 @@ import com.sun.org.apache.xml.internal.s
 @InterfaceAudience.Private
 @InterfaceStability.Unstable
 public class XmlEditsVisitor implements OfflineEditsVisitor {
-  private OutputStream out;
+  private final OutputStream out;
   private ContentHandler contentHandler;
 
   /**

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/FileDistributionCalculator.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/FileDistributionCalculator.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/FileDistributionCalculator.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/FileDistributionCalculator.java Mon Mar 24 23:32:37 2014
@@ -69,7 +69,7 @@ final class FileDistributionCalculator {
   private final int steps;
   private final PrintWriter out;
 
-  private int[] distribution;
+  private final int[] distribution;
   private int totalFiles;
   private int totalDirectories;
   private int totalBlocks;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/ImageLoaderCurrent.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/ImageLoaderCurrent.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/ImageLoaderCurrent.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/ImageLoaderCurrent.java Mon Mar 24 23:32:37 2014
@@ -125,7 +125,7 @@ import org.apache.hadoop.security.token.
 class ImageLoaderCurrent implements ImageLoader {
   protected final DateFormat dateFormat = 
                                       new SimpleDateFormat("yyyy-MM-dd HH:mm");
-  private static int[] versions = { -16, -17, -18, -19, -20, -21, -22, -23,
+  private static final int[] versions = { -16, -17, -18, -19, -20, -21, -22, -23,
       -24, -25, -26, -27, -28, -30, -31, -32, -33, -34, -35, -36, -37, -38, -39,
       -40, -41, -42, -43, -44, -45, -46, -47, -48, -49, -50, -51, -52 };
   private int imageVersion = 0;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/LsrPBImage.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/LsrPBImage.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/LsrPBImage.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/LsrPBImage.java Mon Mar 24 23:32:37 2014
@@ -71,9 +71,9 @@ final class LsrPBImage {
   private final Configuration conf;
   private final PrintWriter out;
   private String[] stringTable;
-  private HashMap<Long, INodeSection.INode> inodes = Maps.newHashMap();
-  private HashMap<Long, long[]> dirmap = Maps.newHashMap();
-  private ArrayList<INodeReferenceSection.INodeReference> refList = Lists.newArrayList();
+  private final HashMap<Long, INodeSection.INode> inodes = Maps.newHashMap();
+  private final HashMap<Long, long[]> dirmap = Maps.newHashMap();
+  private final ArrayList<INodeReferenceSection.INodeReference> refList = Lists.newArrayList();
 
   public LsrPBImage(Configuration conf, PrintWriter out) {
     this.conf = conf;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/NameDistributionVisitor.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/NameDistributionVisitor.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/NameDistributionVisitor.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/NameDistributionVisitor.java Mon Mar 24 23:32:37 2014
@@ -34,7 +34,7 @@ import org.apache.hadoop.classification.
  */
 @InterfaceAudience.Private
 public class NameDistributionVisitor extends TextWriterImageVisitor {
-  HashMap<String, Integer> counts = new HashMap<String, Integer>();
+  final HashMap<String, Integer> counts = new HashMap<String, Integer>();
 
   public NameDistributionVisitor(String filename, boolean printToScreen)
       throws IOException {

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/BestEffortLongFile.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/BestEffortLongFile.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/BestEffortLongFile.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/BestEffortLongFile.java Mon Mar 24 23:32:37 2014
@@ -53,7 +53,7 @@ public class BestEffortLongFile implemen
   
   private FileChannel ch = null;
   
-  private ByteBuffer buf = ByteBuffer.allocate(Long.SIZE/8);
+  private final ByteBuffer buf = ByteBuffer.allocate(Long.SIZE/8);
   
   public BestEffortLongFile(File file, long defaultVal) {
     this.file = file;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/DataTransferThrottler.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/DataTransferThrottler.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/DataTransferThrottler.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/DataTransferThrottler.java Mon Mar 24 23:32:37 2014
@@ -26,8 +26,8 @@ import static org.apache.hadoop.util.Tim
  * threads.
  */
 public class DataTransferThrottler {
-  private long period;          // period over which bw is imposed
-  private long periodExtension; // Max period over which bw accumulates.
+  private final long period;          // period over which bw is imposed
+  private final long periodExtension; // Max period over which bw accumulates.
   private long bytesPerPeriod;  // total number of bytes can be sent in each period
   private long curPeriodStart;  // current period starting time
   private long curReserve;      // remaining bytes can be sent in the period

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/DirectBufferPool.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/DirectBufferPool.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/DirectBufferPool.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/DirectBufferPool.java Mon Mar 24 23:32:37 2014
@@ -44,7 +44,7 @@ import com.google.common.annotations.Vis
 public class DirectBufferPool {
 
   // Essentially implement a multimap with weak values.
-  ConcurrentMap<Integer, Queue<WeakReference<ByteBuffer>>> buffersBySize =
+  final ConcurrentMap<Integer, Queue<WeakReference<ByteBuffer>>> buffersBySize =
     new ConcurrentHashMap<Integer, Queue<WeakReference<ByteBuffer>>>();
  
   /**

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/LightWeightHashSet.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/LightWeightHashSet.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/LightWeightHashSet.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/LightWeightHashSet.java Mon Mar 24 23:32:37 2014
@@ -91,7 +91,7 @@ public class LightWeightHashSet<T> imple
 
   private float maxLoadFactor;
   private float minLoadFactor;
-  private int expandMultiplier = 2;
+  private final int expandMultiplier = 2;
 
   private int expandThreshold;
   private int shrinkThreshold;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/XMLUtils.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/XMLUtils.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/XMLUtils.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/XMLUtils.java Mon Mar 24 23:32:37 2014
@@ -88,7 +88,7 @@ public class XMLUtils {
     return false;
   }
 
-  private static int NUM_SLASH_POSITIONS = 4;
+  private static final int NUM_SLASH_POSITIONS = 4;
 
   private static String mangleCodePoint(int cp) {
     return String.format("\\%0" + NUM_SLASH_POSITIONS + "x;", cp);
@@ -200,7 +200,7 @@ public class XMLUtils {
    * file.
    */
   static public class Stanza {
-    private TreeMap<String, LinkedList <Stanza > > subtrees;
+    private final TreeMap<String, LinkedList <Stanza > > subtrees;
 
     /** The unmangled value of this stanza. */
     private String value;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/ByteRangeInputStream.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/ByteRangeInputStream.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/ByteRangeInputStream.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/ByteRangeInputStream.java Mon Mar 24 23:32:37 2014
@@ -69,8 +69,8 @@ public abstract class ByteRangeInputStre
     NORMAL, SEEK, CLOSED
   }
   protected InputStream in;
-  protected URLOpener originalURL;
-  protected URLOpener resolvedURL;
+  protected final URLOpener originalURL;
+  protected final URLOpener resolvedURL;
   protected long startPos = 0;
   protected long currentPos = 0;
   protected Long fileLength = null;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/HftpFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/HftpFileSystem.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/HftpFileSystem.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/HftpFileSystem.java Mon Mar 24 23:32:37 2014
@@ -411,7 +411,7 @@ public class HftpFileSystem extends File
   /** Class to parse and store a listing reply from the server. */
   class LsParser extends DefaultHandler {
 
-    ArrayList<FileStatus> fslist = new ArrayList<FileStatus>();
+    final ArrayList<FileStatus> fslist = new ArrayList<FileStatus>();
 
     @Override
     public void startElement(String ns, String localname, String qname,

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/resources/AclPermissionParam.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/resources/AclPermissionParam.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/resources/AclPermissionParam.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/resources/AclPermissionParam.java Mon Mar 24 23:32:37 2014
@@ -32,7 +32,7 @@ public class AclPermissionParam extends 
   /** Default parameter value. */
   public static final String DEFAULT = "";
 
-  private static Domain DOMAIN = new Domain(NAME,
+  private static final Domain DOMAIN = new Domain(NAME,
       Pattern.compile(DFS_WEBHDFS_ACL_PERMISSION_PATTERN_DEFAULT));
 
   /**

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestEnhancedByteBufferAccess.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestEnhancedByteBufferAccess.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestEnhancedByteBufferAccess.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestEnhancedByteBufferAccess.java Mon Mar 24 23:32:37 2014
@@ -117,7 +117,7 @@ public class TestEnhancedByteBufferAcces
     return resultArray;
   }
   
-  private static int BLOCK_SIZE = 4096;
+  private static final int BLOCK_SIZE = 4096;
   
   public static HdfsConfiguration initZeroCopyTest() {
     Assume.assumeTrue(NativeIO.isAvailable());

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestFcHdfsSetUMask.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestFcHdfsSetUMask.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestFcHdfsSetUMask.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestFcHdfsSetUMask.java Mon Mar 24 23:32:37 2014
@@ -42,7 +42,7 @@ import org.junit.Test;
 
 public class TestFcHdfsSetUMask {
   
-  private static FileContextTestHelper fileContextTestHelper =
+  private static final FileContextTestHelper fileContextTestHelper =
       new FileContextTestHelper();
   private static MiniDFSCluster cluster;
   private static Path defaultWorkingDirectory;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestGlobPaths.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestGlobPaths.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestGlobPaths.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestGlobPaths.java Mon Mar 24 23:32:37 2014
@@ -60,7 +60,7 @@ public class TestGlobPaths {
   static private FileContext unprivilegedFc;
   static final private int NUM_OF_PATHS = 4;
   static private String USER_DIR;
-  private Path[] path = new Path[NUM_OF_PATHS];
+  private final Path[] path = new Path[NUM_OF_PATHS];
 
   @BeforeClass
   public static void setUp() throws Exception {

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java Mon Mar 24 23:32:37 2014
@@ -45,7 +45,7 @@ public class TestHDFSFileContextMainOper
     FileContextMainOperationsBaseTest {
   private static MiniDFSCluster cluster;
   private static Path defaultWorkingDirectory;
-  private static HdfsConfiguration CONF = new HdfsConfiguration();
+  private static final HdfsConfiguration CONF = new HdfsConfiguration();
   
   @Override
   protected FileContextTestHelper createFileContextHelper() {

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestResolveHdfsSymlink.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestResolveHdfsSymlink.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestResolveHdfsSymlink.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestResolveHdfsSymlink.java Mon Mar 24 23:32:37 2014
@@ -50,7 +50,7 @@ import org.junit.Test;
  * underlying file system as Hdfs.
  */
 public class TestResolveHdfsSymlink {
-  private static FileContextTestHelper helper = new FileContextTestHelper();
+  private static final FileContextTestHelper helper = new FileContextTestHelper();
   private static MiniDFSCluster cluster = null;
 
   @BeforeClass

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestUrlStreamHandler.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestUrlStreamHandler.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestUrlStreamHandler.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestUrlStreamHandler.java Mon Mar 24 23:32:37 2014
@@ -39,7 +39,7 @@ import org.junit.Test;
  */
 public class TestUrlStreamHandler {
 
-  private static File TEST_ROOT_DIR = PathUtils.getTestDir(TestUrlStreamHandler.class);
+  private static final File TEST_ROOT_DIR = PathUtils.getTestDir(TestUrlStreamHandler.class);
     
   /**
    * Test opening and reading from an InputStream through a hdfs:// URL.

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/permission/TestStickyBit.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/permission/TestStickyBit.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/permission/TestStickyBit.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/permission/TestStickyBit.java Mon Mar 24 23:32:37 2014
@@ -49,9 +49,9 @@ import org.junit.Test;
 
 public class TestStickyBit {
 
-  static UserGroupInformation user1 = 
+  static final UserGroupInformation user1 =
     UserGroupInformation.createUserForTesting("theDoctor", new String[] {"tardis"});
-  static UserGroupInformation user2 = 
+  static final UserGroupInformation user2 =
     UserGroupInformation.createUserForTesting("rose", new String[] {"powellestates"});
 
   private static MiniDFSCluster cluster;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemAtHdfsRoot.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemAtHdfsRoot.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemAtHdfsRoot.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemAtHdfsRoot.java Mon Mar 24 23:32:37 2014
@@ -40,7 +40,7 @@ import org.junit.BeforeClass;
 public class TestViewFileSystemAtHdfsRoot extends ViewFileSystemBaseTest {
 
   private static MiniDFSCluster cluster;
-  private static Configuration CONF = new Configuration();
+  private static final Configuration CONF = new Configuration();
   private static FileSystem fHdfs;
   
   @Override

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemHdfs.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemHdfs.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemHdfs.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemHdfs.java Mon Mar 24 23:32:37 2014
@@ -44,7 +44,7 @@ public class TestViewFileSystemHdfs exte
   private static MiniDFSCluster cluster;
   private static Path defaultWorkingDirectory;
   private static Path defaultWorkingDirectory2;
-  private static Configuration CONF = new Configuration();
+  private static final Configuration CONF = new Configuration();
   private static FileSystem fHdfs;
   private static FileSystem fHdfs2;
   private FileSystem fsTarget2;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsAtHdfsRoot.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsAtHdfsRoot.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsAtHdfsRoot.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsAtHdfsRoot.java Mon Mar 24 23:32:37 2014
@@ -41,7 +41,7 @@ import org.junit.BeforeClass;
 public class TestViewFsAtHdfsRoot extends ViewFsBaseTest {
   
   private static MiniDFSCluster cluster;
-  private static HdfsConfiguration CONF = new HdfsConfiguration();
+  private static final HdfsConfiguration CONF = new HdfsConfiguration();
   private static FileContext fc;
   
   @Override

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsDefaultValue.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsDefaultValue.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsDefaultValue.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsDefaultValue.java Mon Mar 24 23:32:37 2014
@@ -62,7 +62,7 @@ public class TestViewFsDefaultValue {
   static final String testFileName = testFileDir + "testFileStatusSerialziation";
   private static MiniDFSCluster cluster;
   private static final FileSystemTestHelper fileSystemTestHelper = new FileSystemTestHelper(); 
-  private static Configuration CONF = new Configuration();
+  private static final Configuration CONF = new Configuration();
   private static FileSystem fHdfs;
   private static FileSystem vfs;
   private static Path testFilePath;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsFileStatusHdfs.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsFileStatusHdfs.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsFileStatusHdfs.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsFileStatusHdfs.java Mon Mar 24 23:32:37 2014
@@ -55,7 +55,7 @@ public class TestViewFsFileStatusHdfs {
   private static final FileSystemTestHelper fileSystemTestHelper = new FileSystemTestHelper();
   private static MiniDFSCluster cluster;
   private static Path defaultWorkingDirectory;
-  private static Configuration CONF = new Configuration();
+  private static final Configuration CONF = new Configuration();
   private static FileSystem fHdfs;
   private static FileSystem vfs;
   

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsHdfs.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsHdfs.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsHdfs.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsHdfs.java Mon Mar 24 23:32:37 2014
@@ -37,7 +37,7 @@ import org.junit.BeforeClass;
 public class TestViewFsHdfs extends ViewFsBaseTest {
 
   private static MiniDFSCluster cluster;
-  private static HdfsConfiguration CONF = new HdfsConfiguration();
+  private static final HdfsConfiguration CONF = new HdfsConfiguration();
   private static FileContext fc;
   
   @Override

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java Mon Mar 24 23:32:37 2014
@@ -86,8 +86,8 @@ public class DFSTestUtil {
 
   private static final Log LOG = LogFactory.getLog(DFSTestUtil.class);
   
-  private static Random gen = new Random();
-  private static String[] dirNames = {
+  private static final Random gen = new Random();
+  private static final String[] dirNames = {
     "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"
   };
   
@@ -161,8 +161,8 @@ public class DFSTestUtil {
   private class MyFile {
     
     private String name = "";
-    private int size;
-    private long seed;
+    private final int size;
+    private final long seed;
     
     MyFile() {
       int nLevels = gen.nextInt(maxLevels);
@@ -1173,7 +1173,7 @@ public class DFSTestUtil {
     private final String testName;
     private final TemporarySocketDirectory sockDir;
     private boolean closed = false;
-    private boolean formerTcpReadsDisabled;
+    private final boolean formerTcpReadsDisabled;
     
     public ShortCircuitTestContext(String testName) {
       this.testName = testName;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java Mon Mar 24 23:32:37 2014
@@ -395,11 +395,11 @@ public class MiniDFSCluster {
   }
   
   public class DataNodeProperties {
-    DataNode datanode;
-    Configuration conf;
+    final DataNode datanode;
+    final Configuration conf;
     String[] dnArgs;
-    SecureResources secureResources;
-    int ipcPort;
+    final SecureResources secureResources;
+    final int ipcPort;
 
     DataNodeProperties(DataNode node, Configuration conf, String[] args,
                        SecureResources secureResources, int ipcPort) {
@@ -418,7 +418,7 @@ public class MiniDFSCluster {
   private Configuration conf;
   private NameNodeInfo[] nameNodes;
   protected int numDataNodes;
-  protected List<DataNodeProperties> dataNodes = 
+  protected final List<DataNodeProperties> dataNodes =
                          new ArrayList<DataNodeProperties>();
   private File base_dir;
   private File data_dir;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSNNTopology.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSNNTopology.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSNNTopology.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSNNTopology.java Mon Mar 24 23:32:37 2014
@@ -208,7 +208,7 @@ public class MiniDFSNNTopology {
   }
   
   public static class NNConf {
-    private String nnId;
+    private final String nnId;
     private int httpPort;
     private int ipcPort;
     

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestClientReportBadBlock.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestClientReportBadBlock.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestClientReportBadBlock.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestClientReportBadBlock.java Mon Mar 24 23:32:37 2014
@@ -64,7 +64,7 @@ public class TestClientReportBadBlock {
   private static int buffersize;
   private static MiniDFSCluster cluster;
   private static DistributedFileSystem dfs;
-  private static int numDataNodes = 3;
+  private static final int numDataNodes = 3;
   private static final Configuration conf = new HdfsConfiguration();
 
   Random rand = new Random();

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSClientFailover.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSClientFailover.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSClientFailover.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSClientFailover.java Mon Mar 24 23:32:37 2014
@@ -66,7 +66,7 @@ public class TestDFSClientFailover {
   private static final Path TEST_FILE = new Path("/tmp/failover-test-file");
   private static final int FILE_LENGTH_TO_VERIFY = 100;
   
-  private Configuration conf = new Configuration();
+  private final Configuration conf = new Configuration();
   private MiniDFSCluster cluster;
   
   @Before
@@ -136,7 +136,7 @@ public class TestDFSClientFailover {
   
   private static class InjectingSocketFactory extends StandardSocketFactory {
 
-    static SocketFactory defaultFactory = SocketFactory.getDefault();
+    static final SocketFactory defaultFactory = SocketFactory.getDefault();
 
     static int portToInjectOn;
     

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSClientRetries.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSClientRetries.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSClientRetries.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSClientRetries.java Mon Mar 24 23:32:37 2014
@@ -457,7 +457,7 @@ public class TestDFSClientRetries {
    */
   private static class FailNTimesAnswer implements Answer<LocatedBlocks> {
     private int failuresLeft;
-    private NamenodeProtocols realNN;
+    private final NamenodeProtocols realNN;
 
     public FailNTimesAnswer(NamenodeProtocols preSpyNN, int timesToFail) {
       failuresLeft = timesToFail;
@@ -675,13 +675,13 @@ public class TestDFSClientRetries {
   class DFSClientReader implements Runnable {
     
     DFSClient client;
-    Configuration conf;
-    byte[] expected_sha;
+    final Configuration conf;
+    final byte[] expected_sha;
     FileSystem  fs;
-    Path filePath;
-    MiniDFSCluster cluster;
-    int len;
-    Counter counter;
+    final Path filePath;
+    final MiniDFSCluster cluster;
+    final int len;
+    final Counter counter;
 
     DFSClientReader(Path file, MiniDFSCluster cluster, byte[] hash_sha, int fileLen, Counter cnt) {
       filePath = file;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSMkdirs.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSMkdirs.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSMkdirs.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSMkdirs.java Mon Mar 24 23:32:37 2014
@@ -37,7 +37,7 @@ import org.junit.Test;
  * directories, and generally behaves as expected.
  */
 public class TestDFSMkdirs {
-  private Configuration conf = new HdfsConfiguration();
+  private final Configuration conf = new HdfsConfiguration();
 
   private static final String[] NON_CANONICAL_PATHS = new String[] {
       "//test1",

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSPermission.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSPermission.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSPermission.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSPermission.java Mon Mar 24 23:32:37 2014
@@ -56,10 +56,10 @@ public class TestDFSPermission {
   final private static String USER2_NAME = "user2";
   final private static String USER3_NAME = "user3";
 
-  private static UserGroupInformation SUPERUSER;
-  private static UserGroupInformation USER1;
-  private static UserGroupInformation USER2;
-  private static UserGroupInformation USER3;
+  private static final UserGroupInformation SUPERUSER;
+  private static final UserGroupInformation USER1;
+  private static final UserGroupInformation USER2;
+  private static final UserGroupInformation USER3;
 
   final private static short MAX_PERMISSION = 511;
   final private static short DEFAULT_UMASK = 022;
@@ -75,7 +75,7 @@ public class TestDFSPermission {
 
   private FileSystem fs;
   private MiniDFSCluster cluster;
-  private static Random r;
+  private static final Random r;
 
   static {
     try {
@@ -472,8 +472,8 @@ public class TestDFSPermission {
    * value is generated only once.
    */
   static private class PermissionGenerator {
-    private Random r;
-    private short permissions[] = new short[MAX_PERMISSION + 1];
+    private final Random r;
+    private final short[] permissions = new short[MAX_PERMISSION + 1];
     private int numLeft = MAX_PERMISSION + 1;
 
     PermissionGenerator(Random r) {
@@ -642,7 +642,7 @@ public class TestDFSPermission {
     }
   }
 
-  private CreatePermissionVerifier createVerifier =
+  private final CreatePermissionVerifier createVerifier =
     new CreatePermissionVerifier();
   /* test if the permission checking of create/mkdir is correct */
   private void testCreateMkdirs(UserGroupInformation ugi, Path path,
@@ -672,7 +672,7 @@ public class TestDFSPermission {
     }
   }
 
-  private OpenPermissionVerifier openVerifier = new OpenPermissionVerifier();
+  private final OpenPermissionVerifier openVerifier = new OpenPermissionVerifier();
   /* test if the permission checking of open is correct */
   private void testOpen(UserGroupInformation ugi, Path path,
       short ancestorPermission, short parentPermission, short filePermission)
@@ -697,7 +697,7 @@ public class TestDFSPermission {
     }
   }
 
-  private SetReplicationPermissionVerifier replicatorVerifier =
+  private final SetReplicationPermissionVerifier replicatorVerifier =
     new SetReplicationPermissionVerifier();
   /* test if the permission checking of setReplication is correct */
   private void testSetReplication(UserGroupInformation ugi, Path path,
@@ -725,7 +725,7 @@ public class TestDFSPermission {
     }
   }
 
-  private SetTimesPermissionVerifier timesVerifier =
+  private final SetTimesPermissionVerifier timesVerifier =
     new SetTimesPermissionVerifier();
   /* test if the permission checking of setReplication is correct */
   private void testSetTimes(UserGroupInformation ugi, Path path,
@@ -780,7 +780,7 @@ public class TestDFSPermission {
     }
   }
 
-  private StatsPermissionVerifier statsVerifier = new StatsPermissionVerifier();
+  private final StatsPermissionVerifier statsVerifier = new StatsPermissionVerifier();
   /* test if the permission checking of isDirectory, exist,
    * getFileInfo, getContentSummary is correct */
   private void testStats(UserGroupInformation ugi, Path path,
@@ -840,7 +840,7 @@ public class TestDFSPermission {
     }
   }
 
-  ListPermissionVerifier listVerifier = new ListPermissionVerifier();
+  final ListPermissionVerifier listVerifier = new ListPermissionVerifier();
   /* test if the permission checking of list is correct */
   private void testList(UserGroupInformation ugi, Path file, Path dir,
       short ancestorPermission, short parentPermission, short filePermission)
@@ -896,7 +896,7 @@ public class TestDFSPermission {
     }
   }
 
-  RenamePermissionVerifier renameVerifier = new RenamePermissionVerifier();
+  final RenamePermissionVerifier renameVerifier = new RenamePermissionVerifier();
   /* test if the permission checking of rename is correct */
   private void testRename(UserGroupInformation ugi, Path src, Path dst,
       short srcAncestorPermission, short srcParentPermission,
@@ -958,7 +958,7 @@ public class TestDFSPermission {
     }
   }
 
-  DeletePermissionVerifier fileDeletionVerifier =
+  final DeletePermissionVerifier fileDeletionVerifier =
     new DeletePermissionVerifier();
 
   /* test if the permission checking of file deletion is correct */
@@ -968,7 +968,7 @@ public class TestDFSPermission {
     fileDeletionVerifier.verifyPermission(ugi);
   }
 
-  DeleteDirPermissionVerifier dirDeletionVerifier =
+  final DeleteDirPermissionVerifier dirDeletionVerifier =
     new DeleteDirPermissionVerifier();
 
   /* test if the permission checking of directory deletion is correct */

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java Mon Mar 24 23:32:37 2014
@@ -63,7 +63,7 @@ import static org.junit.Assert.*;
  */
 public class TestDFSShell {
   private static final Log LOG = LogFactory.getLog(TestDFSShell.class);
-  private static AtomicInteger counter = new AtomicInteger();
+  private static final AtomicInteger counter = new AtomicInteger();
   private final int SUCCESS = 0;
   private final int ERROR = 1;
 
@@ -1475,7 +1475,7 @@ public class TestDFSShell {
 
     TestGetRunner runner = new TestGetRunner() {
     	private int count = 0;
-    	private FsShell shell = new FsShell(conf);
+    	private final FsShell shell = new FsShell(conf);
 
     	public String run(int exitcode, String... options) throws IOException {
     	  String dst = TEST_ROOT_DIR + "/" + fname+ ++count;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSStorageStateRecovery.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSStorageStateRecovery.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSStorageStateRecovery.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSStorageStateRecovery.java Mon Mar 24 23:32:37 2014
@@ -77,7 +77,7 @@ public class TestDFSStorageStateRecovery
    *  5) current directory should exist after recovery but before startup
    *  6) previous directory should exist after recovery but before startup
    */
-  static boolean[][] testCases = new boolean[][] {
+  static final boolean[][] testCases = new boolean[][] {
     new boolean[] {true,  false, false, false, true,  true,  false}, // 1
     new boolean[] {true,  true,  false, false, true,  true,  true }, // 2
     new boolean[] {true,  false, true,  false, true,  true,  true }, // 3

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSUpgradeFromImage.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSUpgradeFromImage.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSUpgradeFromImage.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSUpgradeFromImage.java Mon Mar 24 23:32:37 2014
@@ -65,7 +65,7 @@ public class TestDFSUpgradeFromImage {
   
   private static final Log LOG = LogFactory
       .getLog(TestDFSUpgradeFromImage.class);
-  private static File TEST_ROOT_DIR =
+  private static final File TEST_ROOT_DIR =
                       new File(MiniDFSCluster.getBaseDirectory());
   private static final String HADOOP_DFS_DIR_TXT = "hadoop-dfs-dir.txt";
   private static final String HADOOP22_IMAGE = "hadoop-22-dfs-dir.tgz";
@@ -87,7 +87,7 @@ public class TestDFSUpgradeFromImage {
     }
   }
   
-  LinkedList<ReferenceFileInfo> refList = new LinkedList<ReferenceFileInfo>();
+  final LinkedList<ReferenceFileInfo> refList = new LinkedList<ReferenceFileInfo>();
   Iterator<ReferenceFileInfo> refIter;
   
   boolean printChecksum = false;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDataTransferKeepalive.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDataTransferKeepalive.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDataTransferKeepalive.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDataTransferKeepalive.java Mon Mar 24 23:32:37 2014
@@ -50,10 +50,10 @@ import org.junit.Test;
 import com.google.common.io.NullOutputStream;
 
 public class TestDataTransferKeepalive {
-  Configuration conf = new HdfsConfiguration();
+  final Configuration conf = new HdfsConfiguration();
   private MiniDFSCluster cluster;
   private DataNode dn;
-  private static Path TEST_FILE = new Path("/test");
+  private static final Path TEST_FILE = new Path("/test");
   
   private static final int KEEPALIVE_TIMEOUT = 1000;
   private static final int WRITE_TIMEOUT = 3000;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDataTransferProtocol.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDataTransferProtocol.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDataTransferProtocol.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDataTransferProtocol.java Mon Mar 24 23:32:37 2014
@@ -79,11 +79,11 @@ public class TestDataTransferProtocol {
   
   DatanodeID datanode;
   InetSocketAddress dnAddr;
-  ByteArrayOutputStream sendBuf = new ByteArrayOutputStream(128);
+  final ByteArrayOutputStream sendBuf = new ByteArrayOutputStream(128);
   final DataOutputStream sendOut = new DataOutputStream(sendBuf);
   final Sender sender = new Sender(sendOut);
-  ByteArrayOutputStream recvBuf = new ByteArrayOutputStream(128);
-  DataOutputStream recvOut = new DataOutputStream(recvBuf);
+  final ByteArrayOutputStream recvBuf = new ByteArrayOutputStream(128);
+  final DataOutputStream recvOut = new DataOutputStream(recvBuf);
 
   private void sendRecvData(String testDescription,
                             boolean eofExpected) throws IOException {

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeBlockScanner.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeBlockScanner.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeBlockScanner.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeBlockScanner.java Mon Mar 24 23:32:37 2014
@@ -61,10 +61,10 @@ public class TestDatanodeBlockScanner {
   
   private static final long TIMEOUT = 20000; // 20 sec.
   
-  private static Pattern pattern = 
+  private static final Pattern pattern =
              Pattern.compile(".*?(blk_[-]*\\d+).*?scan time\\s*:\\s*(\\d+)");
   
-  private static Pattern pattern_blockVerify = 
+  private static final Pattern pattern_blockVerify =
              Pattern.compile(".*?(SCAN_PERIOD)\\s*:\\s*(\\d+.*?)");
   
   static {

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeDeath.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeDeath.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeDeath.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeDeath.java Mon Mar 24 23:32:37 2014
@@ -60,18 +60,18 @@ public class TestDatanodeDeath {
   static final int numDatanodes = 15;
   static final short replication = 3;
 
-  int numberOfFiles = 3;
-  int numThreads = 5;
+  final int numberOfFiles = 3;
+  final int numThreads = 5;
   Workload[] workload = null;
 
   //
   // an object that does a bunch of transactions
   //
   static class Workload extends Thread {
-    private short replication;
-    private int numberOfFiles;
-    private int id;
-    private FileSystem fs;
+    private final short replication;
+    private final int numberOfFiles;
+    private final int id;
+    private final FileSystem fs;
     private long stamp;
     private final long myseed;
 
@@ -220,8 +220,8 @@ public class TestDatanodeDeath {
    */
   class Modify extends Thread {
     volatile boolean running;
-    MiniDFSCluster cluster;
-    Configuration conf;
+    final MiniDFSCluster cluster;
+    final Configuration conf;
 
     Modify(Configuration conf, MiniDFSCluster cluster) {
       running = true;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDecommission.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDecommission.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDecommission.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDecommission.java Mon Mar 24 23:32:37 2014
@@ -65,7 +65,7 @@ public class TestDecommission {
   static final int BLOCKREPORT_INTERVAL_MSEC = 1000; //block report in msec
   static final int NAMENODE_REPLICATION_INTERVAL = 1; //replication interval
 
-  Random myrand = new Random();
+  final Random myrand = new Random();
   Path hostsFile;
   Path excludeFile;
   FileSystem localFileSys;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFSInputChecker.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFSInputChecker.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFSInputChecker.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFSInputChecker.java Mon Mar 24 23:32:37 2014
@@ -52,10 +52,10 @@ public class TestFSInputChecker {
   static final int HALF_CHUNK_SIZE = BYTES_PER_SUM/2;
   static final int FILE_SIZE = 2*BLOCK_SIZE-1;
   static final short NUM_OF_DATANODES = 2;
-  byte[] expected = new byte[FILE_SIZE];
+  final byte[] expected = new byte[FILE_SIZE];
   byte[] actual;
   FSDataInputStream stm;
-  Random rand = new Random(seed);
+  final Random rand = new Random(seed);
 
   /* create a file */
   private void writeFile(FileSystem fileSys, Path name) throws IOException {

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFSOutputSummer.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFSOutputSummer.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFSOutputSummer.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFSOutputSummer.java Mon Mar 24 23:32:37 2014
@@ -41,8 +41,8 @@ public class TestFSOutputSummer {
   private static final int HALF_CHUNK_SIZE = BYTES_PER_CHECKSUM/2;
   private static final int FILE_SIZE = 2*BLOCK_SIZE-1;
   private static final short NUM_OF_DATANODES = 2;
-  private byte[] expected = new byte[FILE_SIZE];
-  private byte[] actual = new byte[FILE_SIZE];
+  private final byte[] expected = new byte[FILE_SIZE];
+  private final byte[] actual = new byte[FILE_SIZE];
   private FileSystem fileSys;
 
   /* create a file, write all data at once */

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFetchImage.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFetchImage.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFetchImage.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFetchImage.java Mon Mar 24 23:32:37 2014
@@ -35,7 +35,7 @@ import org.junit.Test;
 
 public class TestFetchImage {
   
-  private static File FETCHED_IMAGE_FILE = new File(
+  private static final File FETCHED_IMAGE_FILE = new File(
       System.getProperty("build.test.dir"), "fetched-image-dir");
   // Shamelessly stolen from NNStorage.
   private static final Pattern IMAGE_REGEX = Pattern.compile("fsimage_(\\d+)");

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileAppend.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileAppend.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileAppend.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileAppend.java Mon Mar 24 23:32:37 2014
@@ -48,7 +48,7 @@ import org.junit.Test;
  * support HDFS appends.
  */
 public class TestFileAppend{
-  boolean simulatedStorage = false;
+  final boolean simulatedStorage = false;
 
   private static byte[] fileContents = null;
 

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileAppend2.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileAppend2.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileAppend2.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileAppend2.java Mon Mar 24 23:32:37 2014
@@ -59,14 +59,14 @@ public class TestFileAppend2 {
   }
 
   static final int numBlocks = 5;
-  boolean simulatedStorage = false;
+  final boolean simulatedStorage = false;
 
   private byte[] fileContents = null;
 
-  int numDatanodes = 6;
-  int numberOfFiles = 50;
-  int numThreads = 10;
-  int numAppendsPerThread = 20;
+  final int numDatanodes = 6;
+  final int numberOfFiles = 50;
+  final int numThreads = 10;
+  final int numAppendsPerThread = 20;
 /***
   int numberOfFiles = 1;
   int numThreads = 1;
@@ -233,8 +233,8 @@ public class TestFileAppend2 {
   // an object that does a bunch of appends to files
   //
   class Workload extends Thread {
-    private int id;
-    private MiniDFSCluster cluster;
+    private final int id;
+    private final MiniDFSCluster cluster;
 
     Workload(MiniDFSCluster cluster, int threadIndex) {
       id = threadIndex;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileAppend4.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileAppend4.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileAppend4.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileAppend4.java Mon Mar 24 23:32:37 2014
@@ -64,7 +64,7 @@ public class TestFileAppend4 {
   MiniDFSCluster cluster;
   Path file1;
   FSDataOutputStream stm;
-  boolean simulatedStorage = false;
+  final boolean simulatedStorage = false;
 
   {
     ((Log4JLogger)NameNode.stateChangeLog).getLogger().setLevel(Level.ALL);

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestHdfsAdmin.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestHdfsAdmin.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestHdfsAdmin.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestHdfsAdmin.java Mon Mar 24 23:32:37 2014
@@ -35,7 +35,7 @@ import org.junit.Test;
 public class TestHdfsAdmin {
   
   private static final Path TEST_PATH = new Path("/test");
-  private Configuration conf = new Configuration();
+  private final Configuration conf = new Configuration();
   private MiniDFSCluster cluster;
   
   @Before

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestInjectionForSimulatedStorage.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestInjectionForSimulatedStorage.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestInjectionForSimulatedStorage.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestInjectionForSimulatedStorage.java Mon Mar 24 23:32:37 2014
@@ -45,11 +45,11 @@ import org.junit.Test;
  * This class tests the replication and injection of blocks of a DFS file for simulated storage.
  */
 public class TestInjectionForSimulatedStorage {
-  private int checksumSize = 16;
-  private int blockSize = checksumSize*2;
-  private int numBlocks = 4;
-  private int filesize = blockSize*numBlocks;
-  private int numDataNodes = 4;
+  private final int checksumSize = 16;
+  private final int blockSize = checksumSize*2;
+  private final int numBlocks = 4;
+  private final int filesize = blockSize*numBlocks;
+  private final int numDataNodes = 4;
   private static final Log LOG = LogFactory.getLog(
       "org.apache.hadoop.hdfs.TestInjectionForSimulatedStorage");
 

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestIsMethodSupported.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestIsMethodSupported.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestIsMethodSupported.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestIsMethodSupported.java Mon Mar 24 23:32:37 2014
@@ -53,7 +53,7 @@ import org.junit.Test;
  */
 public class TestIsMethodSupported {
   private static MiniDFSCluster cluster = null;
-  private static HdfsConfiguration conf = new HdfsConfiguration();
+  private static final HdfsConfiguration conf = new HdfsConfiguration();
   private static InetSocketAddress nnAddress = null;
   private static InetSocketAddress dnAddress = null;
   

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLease.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLease.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLease.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLease.java Mon Mar 24 23:32:37 2014
@@ -67,7 +67,7 @@ public class TestLease {
   static final String dirString = "/test/lease";
   final Path dir = new Path(dirString);
   static final Log LOG = LogFactory.getLog(TestLease.class);
-  Configuration conf = new HdfsConfiguration();
+  final Configuration conf = new HdfsConfiguration();
 
   @Test
   public void testLeaseAbort() throws Exception {

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java Mon Mar 24 23:32:37 2014
@@ -67,10 +67,10 @@ public class TestLeaseRecovery2 {
   static final private long BLOCK_SIZE = 1024;
   static final private int FILE_SIZE = (int)BLOCK_SIZE*2;
   static final short REPLICATION_NUM = (short)3;
-  static byte[] buffer = new byte[FILE_SIZE];
+  static final byte[] buffer = new byte[FILE_SIZE];
   
-  static private String fakeUsername = "fakeUser1";
-  static private String fakeGroup = "supergroup";
+  static private final String fakeUsername = "fakeUser1";
+  static private final String fakeGroup = "supergroup";
 
   static private MiniDFSCluster cluster;
   static private DistributedFileSystem dfs;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRenewer.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRenewer.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRenewer.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRenewer.java Mon Mar 24 23:32:37 2014
@@ -35,11 +35,11 @@ import org.mockito.stubbing.Answer;
 import com.google.common.base.Supplier;
 
 public class TestLeaseRenewer {
-  private String FAKE_AUTHORITY="hdfs://nn1/";
-  private UserGroupInformation FAKE_UGI_A =
+  private final String FAKE_AUTHORITY="hdfs://nn1/";
+  private final UserGroupInformation FAKE_UGI_A =
     UserGroupInformation.createUserForTesting(
       "myuser", new String[]{"group1"});
-  private UserGroupInformation FAKE_UGI_B =
+  private final UserGroupInformation FAKE_UGI_B =
     UserGroupInformation.createUserForTesting(
       "myuser", new String[]{"group1"});
 

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestListPathServlet.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestListPathServlet.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestListPathServlet.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestListPathServlet.java Mon Mar 24 23:32:37 2014
@@ -50,8 +50,8 @@ public class TestListPathServlet {
   private static FileSystem fs;
   private static URI hftpURI;
   private static HftpFileSystem hftpFs;
-  private Random r = new Random();
-  private List<String> filelist = new ArrayList<String>();
+  private final Random r = new Random();
+  private final List<String> filelist = new ArrayList<String>();
 
   @BeforeClass
   public static void setup() throws Exception {

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestPeerCache.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestPeerCache.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestPeerCache.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestPeerCache.java Mon Mar 24 23:32:37 2014
@@ -42,7 +42,7 @@ public class TestPeerCache {
     private boolean closed = false;
     private final boolean hasDomain;
 
-    private DatanodeID dnId;
+    private final DatanodeID dnId;
 
     public FakePeer(DatanodeID dnId, boolean hasDomain) {
       this.dnId = dnId;

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestPipelines.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestPipelines.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestPipelines.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestPipelines.java Mon Mar 24 23:32:37 2014
@@ -46,14 +46,14 @@ import org.junit.Test;
 public class TestPipelines {
   public static final Log LOG = LogFactory.getLog(TestPipelines.class);
 
-  private static short REPL_FACTOR = 3;
+  private static final short REPL_FACTOR = 3;
   private static final int RAND_LIMIT = 2000;
   private static final int FILE_SIZE = 10000;
 
   private MiniDFSCluster cluster;
   private DistributedFileSystem fs;
   private static Configuration conf;
-  static Random rand = new Random(RAND_LIMIT);
+  static final Random rand = new Random(RAND_LIMIT);
 
   static {
     initLoggers();

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestShortCircuitCache.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestShortCircuitCache.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestShortCircuitCache.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestShortCircuitCache.java Mon Mar 24 23:32:37 2014
@@ -69,8 +69,8 @@ public class TestShortCircuitCache {
   static final Log LOG = LogFactory.getLog(TestShortCircuitCache.class);
   
   private static class TestFileDescriptorPair {
-    TemporarySocketDirectory dir = new TemporarySocketDirectory();
-    FileInputStream fis[];
+    final TemporarySocketDirectory dir = new TemporarySocketDirectory();
+    final FileInputStream[] fis;
 
     public TestFileDescriptorPair() throws IOException {
       fis = new FileInputStream[2];

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestShortCircuitLocalRead.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestShortCircuitLocalRead.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestShortCircuitLocalRead.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestShortCircuitLocalRead.java Mon Mar 24 23:32:37 2014
@@ -88,7 +88,7 @@ public class TestShortCircuitLocalRead {
   
   static final long seed = 0xDEADBEEFL;
   static final int blockSize = 5120;
-  boolean simulatedStorage = false;
+  final boolean simulatedStorage = false;
   
   // creates a file but does not close it
   static FSDataOutputStream createFile(FileSystem fileSys, Path name, int repl)

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestWriteRead.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestWriteRead.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestWriteRead.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestWriteRead.java Mon Mar 24 23:32:37 2014
@@ -62,7 +62,7 @@ public class TestWriteRead {
   private boolean verboseOption = true;
   private boolean positionReadOption = false;
   private boolean truncateOption = false;
-  private boolean abortTestOnFailure = true; 
+  private final boolean abortTestOnFailure = true;
 
   static private Log LOG = LogFactory.getLog(TestWriteRead.class);
 

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/UpgradeUtilities.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/UpgradeUtilities.java?rev=1581124&r1=1581123&r2=1581124&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/UpgradeUtilities.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/UpgradeUtilities.java Mon Mar 24 23:32:37 2014
@@ -67,10 +67,10 @@ import com.google.common.primitives.Byte
 public class UpgradeUtilities {
 
   // Root scratch directory on local filesystem 
-  private static File TEST_ROOT_DIR = 
+  private static final File TEST_ROOT_DIR =
                       new File(MiniDFSCluster.getBaseDirectory());
   // The singleton master storage directory for Namenode
-  private static File namenodeStorage = new File(TEST_ROOT_DIR, "namenodeMaster");
+  private static final File namenodeStorage = new File(TEST_ROOT_DIR, "namenodeMaster");
   // A checksum of the contents in namenodeStorage directory
   private static long namenodeStorageChecksum;
   // The namespaceId of the namenodeStorage directory
@@ -82,7 +82,7 @@ public class UpgradeUtilities {
   // The fsscTime of the namenodeStorage directory
   private static long namenodeStorageFsscTime;
   // The singleton master storage directory for Datanode
-  private static File datanodeStorage = new File(TEST_ROOT_DIR, "datanodeMaster");
+  private static final File datanodeStorage = new File(TEST_ROOT_DIR, "datanodeMaster");
   // A checksum of the contents in datanodeStorage directory
   private static long datanodeStorageChecksum;
   // A checksum of the contents in blockpool storage directory



Mime
View raw message