hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1581137 [4/5] - in /hadoop/common/branches/branch-2/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/h...
Date Mon, 24 Mar 2014 23:46:00 GMT
Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLease.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLease.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLease.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLease.java Mon Mar 24 23:45:55 2014
@@ -66,7 +66,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/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java Mon Mar 24 23:45:55 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/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRenewer.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRenewer.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRenewer.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRenewer.java Mon Mar 24 23:45:55 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/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestListPathServlet.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestListPathServlet.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestListPathServlet.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestListPathServlet.java Mon Mar 24 23:45:55 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/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestPeerCache.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestPeerCache.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestPeerCache.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestPeerCache.java Mon Mar 24 23:45:55 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/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestPipelines.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestPipelines.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestPipelines.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestPipelines.java Mon Mar 24 23:45:55 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/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestShortCircuitCache.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestShortCircuitCache.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestShortCircuitCache.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestShortCircuitCache.java Mon Mar 24 23:45:55 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/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestShortCircuitLocalRead.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestShortCircuitLocalRead.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestShortCircuitLocalRead.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestShortCircuitLocalRead.java Mon Mar 24 23:45:55 2014
@@ -89,7 +89,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/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestWriteRead.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestWriteRead.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestWriteRead.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestWriteRead.java Mon Mar 24 23:45:55 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/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/UpgradeUtilities.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/UpgradeUtilities.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/UpgradeUtilities.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/UpgradeUtilities.java Mon Mar 24 23:45:55 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

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/datatransfer/TestPacketReceiver.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/datatransfer/TestPacketReceiver.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/datatransfer/TestPacketReceiver.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/datatransfer/TestPacketReceiver.java Mon Mar 24 23:45:55 2014
@@ -31,8 +31,8 @@ import static org.junit.Assert.*;
 
 public class TestPacketReceiver {
 
-  private static long OFFSET_IN_BLOCK = 12345L;
-  private static int SEQNO = 54321;
+  private static final long OFFSET_IN_BLOCK = 12345L;
+  private static final int SEQNO = 54321;
 
   private byte[] prepareFakePacket(byte[] data, byte[] sums) throws IOException {
     ByteArrayOutputStream baos = new ByteArrayOutputStream();

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/MiniJournalCluster.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/MiniJournalCluster.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/MiniJournalCluster.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/MiniJournalCluster.java Mon Mar 24 23:45:55 2014
@@ -41,7 +41,7 @@ public class MiniJournalCluster {
     private String baseDir;
     private int numJournalNodes = 3;
     private boolean format = true;
-    private Configuration conf;
+    private final Configuration conf;
     
     public Builder(Configuration conf) {
       this.conf = conf;
@@ -69,8 +69,8 @@ public class MiniJournalCluster {
 
   private static final class JNInfo {
     private JournalNode node;
-    private InetSocketAddress ipcAddr;
-    private String httpServerURI;
+    private final InetSocketAddress ipcAddr;
+    private final String httpServerURI;
 
     private JNInfo(JournalNode node) {
       this.node = node;
@@ -80,8 +80,8 @@ public class MiniJournalCluster {
   }
 
   private static final Log LOG = LogFactory.getLog(MiniJournalCluster.class);
-  private File baseDir;
-  private JNInfo nodes[];
+  private final File baseDir;
+  private final JNInfo[] nodes;
   
   private MiniJournalCluster(Builder b) throws IOException {
     LOG.info("Starting MiniJournalCluster with " +

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/MiniQJMHACluster.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/MiniQJMHACluster.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/MiniQJMHACluster.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/MiniQJMHACluster.java Mon Mar 24 23:45:55 2014
@@ -38,7 +38,7 @@ public class MiniQJMHACluster {
   private MiniJournalCluster journalCluster;
   private final Configuration conf;
   
-  public static String NAMESERVICE = "ns1";
+  public static final String NAMESERVICE = "ns1";
   private static final String NN1 = "nn1";
   private static final String NN2 = "nn2";
   private static final int NN1_IPC_PORT = 10000;

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/TestNNWithQJM.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/TestNNWithQJM.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/TestNNWithQJM.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/TestNNWithQJM.java Mon Mar 24 23:45:55 2014
@@ -42,10 +42,10 @@ import org.junit.Before;
 import org.junit.Test;
 
 public class TestNNWithQJM {
-  Configuration conf = new HdfsConfiguration();
+  final Configuration conf = new HdfsConfiguration();
   private MiniJournalCluster mjc = null;
-  private Path TEST_PATH = new Path("/test-dir");
-  private Path TEST_PATH_2 = new Path("/test-dir");
+  private final Path TEST_PATH = new Path("/test-dir");
+  private final Path TEST_PATH_2 = new Path("/test-dir");
 
   @Before
   public void resetSystemExit() {

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestEpochsAreUnique.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestEpochsAreUnique.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestEpochsAreUnique.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestEpochsAreUnique.java Mon Mar 24 23:45:55 2014
@@ -45,7 +45,7 @@ public class TestEpochsAreUnique {
   private static final String JID = "testEpochsAreUnique-jid";
   private static final NamespaceInfo FAKE_NSINFO = new NamespaceInfo(
       12345, "mycluster", "my-bp", 0L);
-  private Random r = new Random();
+  private final Random r = new Random();
   
   @Test
   public void testSingleThreaded() throws IOException {
@@ -121,7 +121,7 @@ public class TestEpochsAreUnique {
   }
 
   private class SometimesFaulty<T> implements Answer<ListenableFuture<T>> {
-    private float faultProbability;
+    private final float faultProbability;
 
     public SometimesFaulty(float faultProbability) {
       this.faultProbability = faultProbability;

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestIPCLoggerChannel.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestIPCLoggerChannel.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestIPCLoggerChannel.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestIPCLoggerChannel.java Mon Mar 24 23:45:55 2014
@@ -46,7 +46,7 @@ public class TestIPCLoggerChannel {
   private static final Log LOG = LogFactory.getLog(
       TestIPCLoggerChannel.class);
   
-  private Configuration conf = new Configuration();
+  private final Configuration conf = new Configuration();
   private static final NamespaceInfo FAKE_NSINFO = new NamespaceInfo(
       12345, "mycluster", "my-bp", 0L);
   private static final String JID = "test-journalid";
@@ -54,7 +54,7 @@ public class TestIPCLoggerChannel {
       new InetSocketAddress(0);
   private static final byte[] FAKE_DATA = new byte[4096];
   
-  private QJournalProtocol mockProxy = Mockito.mock(QJournalProtocol.class);
+  private final QJournalProtocol mockProxy = Mockito.mock(QJournalProtocol.class);
   private IPCLoggerChannel ch;
   
   private static final int LIMIT_QUEUE_SIZE_MB = 1;

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestQJMWithFaults.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestQJMWithFaults.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestQJMWithFaults.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestQJMWithFaults.java Mon Mar 24 23:45:55 2014
@@ -75,7 +75,7 @@ public class TestQJMWithFaults {
   private static final int NUM_WRITER_ITERS = 500;
   private static final int SEGMENTS_PER_WRITER = 2;
 
-  private static Configuration conf = new Configuration();
+  private static final Configuration conf = new Configuration();
 
 
   static {
@@ -87,7 +87,7 @@ public class TestQJMWithFaults {
   }
 
   // Set up fault injection mock.
-  private static JournalFaultInjector faultInjector =
+  private static final JournalFaultInjector faultInjector =
       JournalFaultInjector.instance = Mockito.mock(JournalFaultInjector.class); 
 
   /**
@@ -335,7 +335,7 @@ public class TestQJMWithFaults {
   
   private static class RandomFaultyChannel extends IPCLoggerChannel {
     private final Random random;
-    private float injectionProbability = 0.1f;
+    private final float injectionProbability = 0.1f;
     private boolean isUp = true;
     
     public RandomFaultyChannel(Configuration conf, NamespaceInfo nsInfo,
@@ -389,7 +389,7 @@ public class TestQJMWithFaults {
 
   private static class InvocationCountingChannel extends IPCLoggerChannel {
     private int rpcCount = 0;
-    private Map<Integer, Callable<Void>> injections = Maps.newHashMap();
+    private final Map<Integer, Callable<Void>> injections = Maps.newHashMap();
     
     public InvocationCountingChannel(Configuration conf, NamespaceInfo nsInfo,
         String journalId, InetSocketAddress addr) {

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestQuorumJournalManager.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestQuorumJournalManager.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestQuorumJournalManager.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestQuorumJournalManager.java Mon Mar 24 23:45:55 2014
@@ -81,7 +81,7 @@ public class TestQuorumJournalManager {
   private QuorumJournalManager qjm;
   private List<AsyncLogger> spies;
 
-  private List<QuorumJournalManager> toClose = Lists.newLinkedList();
+  private final List<QuorumJournalManager> toClose = Lists.newLinkedList();
   
   static {
     ((Log4JLogger)ProtobufRpcEngine.LOG).getLogger().setLevel(Level.ALL);

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestQuorumJournalManagerUnit.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestQuorumJournalManagerUnit.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestQuorumJournalManagerUnit.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestQuorumJournalManagerUnit.java Mon Mar 24 23:45:55 2014
@@ -61,7 +61,7 @@ public class TestQuorumJournalManagerUni
   private static final NamespaceInfo FAKE_NSINFO = new NamespaceInfo(
       12345, "mycluster", "my-bp", 0L);
 
-  private Configuration conf = new Configuration();
+  private final Configuration conf = new Configuration();
   private List<AsyncLogger> spyLoggers;
   private QuorumJournalManager qjm;
   

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/server/TestJournal.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/server/TestJournal.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/server/TestJournal.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/server/TestJournal.java Mon Mar 24 23:45:55 2014
@@ -59,7 +59,7 @@ public class TestJournal {
   private static final File TEST_LOG_DIR = new File(
       new File(MiniDFSCluster.getBaseDirectory()), "TestJournal");
 
-  private StorageErrorReporter mockErrorReporter = Mockito.mock(
+  private final StorageErrorReporter mockErrorReporter = Mockito.mock(
       StorageErrorReporter.class);
 
   private Configuration conf;

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/server/TestJournalNode.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/server/TestJournalNode.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/server/TestJournalNode.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/server/TestJournalNode.java Mon Mar 24 23:45:55 2014
@@ -62,11 +62,11 @@ public class TestJournalNode {
   private static final NamespaceInfo FAKE_NSINFO = new NamespaceInfo(
       12345, "mycluster", "my-bp", 0L);
 
-  private static File TEST_BUILD_DATA = PathUtils.getTestDir(TestJournalNode.class);
+  private static final File TEST_BUILD_DATA = PathUtils.getTestDir(TestJournalNode.class);
 
   private JournalNode jn;
   private Journal journal; 
-  private Configuration conf = new Configuration();
+  private final Configuration conf = new Configuration();
   private IPCLoggerChannel ch;
   private String journalId;
 

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/security/TestClientProtocolWithDelegationToken.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/security/TestClientProtocolWithDelegationToken.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/security/TestClientProtocolWithDelegationToken.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/security/TestClientProtocolWithDelegationToken.java Mon Mar 24 23:45:55 2014
@@ -54,7 +54,7 @@ public class TestClientProtocolWithDeleg
   public static final Log LOG = LogFactory
       .getLog(TestClientProtocolWithDelegationToken.class);
 
-  private static Configuration conf;
+  private static final Configuration conf;
   static {
     conf = new Configuration();
     conf.set(HADOOP_SECURITY_AUTHENTICATION, "kerberos");

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/security/token/block/TestBlockToken.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/security/token/block/TestBlockToken.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/security/token/block/TestBlockToken.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/security/token/block/TestBlockToken.java Mon Mar 24 23:45:55 2014
@@ -97,13 +97,13 @@ public class TestBlockToken {
   }
 
   /** Directory where we can count our open file descriptors under Linux */
-  static File FD_DIR = new File("/proc/self/fd/");
+  static final File FD_DIR = new File("/proc/self/fd/");
 
-  long blockKeyUpdateInterval = 10 * 60 * 1000; // 10 mins
-  long blockTokenLifetime = 2 * 60 * 1000; // 2 mins
-  ExtendedBlock block1 = new ExtendedBlock("0", 0L);
-  ExtendedBlock block2 = new ExtendedBlock("10", 10L);
-  ExtendedBlock block3 = new ExtendedBlock("-10", -108L);
+  final long blockKeyUpdateInterval = 10 * 60 * 1000; // 10 mins
+  final long blockTokenLifetime = 2 * 60 * 1000; // 2 mins
+  final ExtendedBlock block1 = new ExtendedBlock("0", 0L);
+  final ExtendedBlock block2 = new ExtendedBlock("10", 10L);
+  final ExtendedBlock block3 = new ExtendedBlock("-10", -108L);
   
   @Before
   public void disableKerberos() {
@@ -114,8 +114,8 @@ public class TestBlockToken {
 
   private static class GetLengthAnswer implements
       Answer<GetReplicaVisibleLengthResponseProto> {
-    BlockTokenSecretManager sm;
-    BlockTokenIdentifier ident;
+    final BlockTokenSecretManager sm;
+    final BlockTokenIdentifier ident;
 
     public GetLengthAnswer(BlockTokenSecretManager sm,
         BlockTokenIdentifier ident) {

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancerWithEncryptedTransfer.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancerWithEncryptedTransfer.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancerWithEncryptedTransfer.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancerWithEncryptedTransfer.java Mon Mar 24 23:45:55 2014
@@ -25,7 +25,7 @@ import org.junit.Test;
 
 public class TestBalancerWithEncryptedTransfer {
   
-  private Configuration conf = new HdfsConfiguration();
+  private final Configuration conf = new HdfsConfiguration();
   
   @Before
   public void setUpConf() {

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestCorruptReplicaInfo.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestCorruptReplicaInfo.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestCorruptReplicaInfo.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestCorruptReplicaInfo.java Mon Mar 24 23:45:55 2014
@@ -47,7 +47,7 @@ public class TestCorruptReplicaInfo {
   private static final Log LOG = 
                            LogFactory.getLog(TestCorruptReplicaInfo.class);
   
-  private Map<Long, Block> block_map =
+  private final Map<Long, Block> block_map =
     new HashMap<Long, Block>();  
     
   // Allow easy block creation by block id

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestHost2NodesMap.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestHost2NodesMap.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestHost2NodesMap.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestHost2NodesMap.java Mon Mar 24 23:45:55 2014
@@ -28,7 +28,7 @@ import org.junit.Before;
 import org.junit.Test;
 
 public class TestHost2NodesMap {
-  private Host2NodesMap map = new Host2NodesMap();
+  private final Host2NodesMap map = new Host2NodesMap();
   private DatanodeDescriptor dataNodes[];
   
   @Before

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestPendingDataNodeMessages.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestPendingDataNodeMessages.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestPendingDataNodeMessages.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestPendingDataNodeMessages.java Mon Mar 24 23:45:55 2014
@@ -32,7 +32,7 @@ import com.google.common.base.Joiner;
 
 
 public class TestPendingDataNodeMessages {
-  PendingDataNodeMessages msgs = new PendingDataNodeMessages();
+  final PendingDataNodeMessages msgs = new PendingDataNodeMessages();
   
   private final Block block1Gs1 = new Block(1, 0, 1);
   private final Block block1Gs2 = new Block(1, 0, 2);

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestRBWBlockInvalidation.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestRBWBlockInvalidation.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestRBWBlockInvalidation.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestRBWBlockInvalidation.java Mon Mar 24 23:45:55 2014
@@ -54,7 +54,7 @@ import com.google.common.collect.Lists;
  * and then the under replicated block gets replicated to the datanode.
  */
 public class TestRBWBlockInvalidation {
-  private static Log LOG = LogFactory.getLog(TestRBWBlockInvalidation.class);
+  private static final Log LOG = LogFactory.getLog(TestRBWBlockInvalidation.class);
   
   private static NumberReplicas countReplicas(final FSNamesystem namesystem,
       ExtendedBlock block) {

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestReplicationPolicy.java Mon Mar 24 23:45:55 2014
@@ -69,7 +69,7 @@ public class TestReplicationPolicy {
     ((Log4JLogger)BlockPlacementPolicy.LOG).getLogger().setLevel(Level.ALL);
   }
 
-  private Random random = DFSUtil.getRandom();
+  private final Random random = DFSUtil.getRandom();
   private static final int BLOCK_SIZE = 1024;
   private static final int NUM_OF_DATANODES = 6;
   private static NetworkTopology cluster;
@@ -79,7 +79,7 @@ public class TestReplicationPolicy {
   private static DatanodeDescriptor dataNodes[];
   private static DatanodeStorageInfo[] storages;
   // The interval for marking a datanode as stale,
-  private static long staleInterval = 
+  private static final long staleInterval =
       DFSConfigKeys.DFS_NAMENODE_STALE_DATANODE_INTERVAL_DEFAULT;
 
   @Rule

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/common/TestJspHelper.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/common/TestJspHelper.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/common/TestJspHelper.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/common/TestJspHelper.java Mon Mar 24 23:45:55 2014
@@ -73,7 +73,7 @@ import org.xml.sax.SAXException;
 
 public class TestJspHelper {
 
-  private Configuration conf = new HdfsConfiguration();
+  private final Configuration conf = new HdfsConfiguration();
   private String jspWriterOutput = "";
 
   public static class DummySecretManager extends

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/BlockReportTestBase.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/BlockReportTestBase.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/BlockReportTestBase.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/BlockReportTestBase.java Mon Mar 24 23:45:55 2014
@@ -93,7 +93,7 @@ public abstract class BlockReportTestBas
   protected MiniDFSCluster cluster;
   private DistributedFileSystem fs;
 
-  private static Random rand = new Random(RAND_LIMIT);
+  private static final Random rand = new Random(RAND_LIMIT);
 
   private static Configuration conf;
 
@@ -832,7 +832,7 @@ public abstract class BlockReportTestBas
   }
 
   private class BlockChecker extends Thread {
-    Path filePath;
+    final Path filePath;
 
     public BlockChecker(final Path filePath) {
       this.filePath = filePath;

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java Mon Mar 24 23:45:55 2014
@@ -117,7 +117,7 @@ public class SimulatedFSDataset implemen
 
   // information about a single block
   private class BInfo implements ReplicaInPipelineInterface {
-    Block theBlock;
+    final Block theBlock;
     private boolean finalized = false; // if not finalized => ongoing creation
     SimulatedOutputStream oStream = null;
     private long bytesAcked;
@@ -329,7 +329,7 @@ public class SimulatedFSDataset implemen
    * to {@link FSVolumeSet}
    */
   private static class SimulatedStorage {
-    private Map<String, SimulatedBPStorage> map = 
+    private final Map<String, SimulatedBPStorage> map =
       new HashMap<String, SimulatedBPStorage>();
 
     private final long capacity;  // in bytes
@@ -827,7 +827,7 @@ public class SimulatedFSDataset implemen
     
 
     byte theRepeatedData = 7;
-    long length; // bytes
+    final long length; // bytes
     int currentPos = 0;
     byte[] data = null;
     

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBPOfferService.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBPOfferService.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBPOfferService.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBPOfferService.java Mon Mar 24 23:45:55 2014
@@ -81,8 +81,8 @@ public class TestBPOfferService {
 
   private DatanodeProtocolClientSideTranslatorPB mockNN1;
   private DatanodeProtocolClientSideTranslatorPB mockNN2;
-  private NNHAStatusHeartbeat[] mockHaStatuses = new NNHAStatusHeartbeat[2];
-  private int heartbeatCounts[] = new int[2];
+  private final NNHAStatusHeartbeat[] mockHaStatuses = new NNHAStatusHeartbeat[2];
+  private final int[] heartbeatCounts = new int[2];
   private DataNode mockDn;
   private FsDatasetSpi<?> mockFSDataset;
   

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockHasMultipleReplicasOnSameDN.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockHasMultipleReplicasOnSameDN.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockHasMultipleReplicasOnSameDN.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockHasMultipleReplicasOnSameDN.java Mon Mar 24 23:45:55 2014
@@ -49,7 +49,7 @@ import static org.junit.Assert.assertTha
 public class TestBlockHasMultipleReplicasOnSameDN {
   public static final Log LOG = LogFactory.getLog(TestBlockHasMultipleReplicasOnSameDN.class);
 
-  private static short NUM_DATANODES = 2;
+  private static final short NUM_DATANODES = 2;
   private static final int BLOCK_SIZE = 1024;
   private static final long NUM_BLOCKS = 5;
   private static final long seed = 0x1BADF00DL;

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockPoolManager.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockPoolManager.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockPoolManager.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockPoolManager.java Mon Mar 24 23:45:55 2014
@@ -37,10 +37,10 @@ import org.mockito.stubbing.Answer;
 
 
 public class TestBlockPoolManager {
-  private Log LOG = LogFactory.getLog(TestBlockPoolManager.class);
-  private DataNode mockDN = Mockito.mock(DataNode.class);
+  private final Log LOG = LogFactory.getLog(TestBlockPoolManager.class);
+  private final DataNode mockDN = Mockito.mock(DataNode.class);
   private BlockPoolManager bpm;
-  private StringBuilder log = new StringBuilder();
+  private final StringBuilder log = new StringBuilder();
   private int mockIdx = 1;
   
   @Before

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockPoolSliceStorage.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockPoolSliceStorage.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockPoolSliceStorage.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockPoolSliceStorage.java Mon Mar 24 23:45:55 2014
@@ -36,7 +36,7 @@ import static org.junit.Assert.assertTha
 public class TestBlockPoolSliceStorage {
   public static final Log LOG = LogFactory.getLog(TestBlockPoolSliceStorage.class);
 
-  Random rand = new Random();
+  final Random rand = new Random();
   BlockPoolSliceStorage storage;
 
   /**

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestCachingStrategy.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestCachingStrategy.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestCachingStrategy.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestCachingStrategy.java Mon Mar 24 23:45:55 2014
@@ -45,8 +45,8 @@ import org.junit.Test;
 
 public class TestCachingStrategy {
   private static final Log LOG = LogFactory.getLog(TestCachingStrategy.class);
-  private static int MAX_TEST_FILE_LEN = 1024 * 1024;
-  private static int WRITE_PACKET_SIZE = DFSConfigKeys.DFS_CLIENT_WRITE_PACKET_SIZE_DEFAULT;
+  private static final int MAX_TEST_FILE_LEN = 1024 * 1024;
+  private static final int WRITE_PACKET_SIZE = DFSConfigKeys.DFS_CLIENT_WRITE_PACKET_SIZE_DEFAULT;
   
   private final static TestRecordingCacheTracker tracker =
       new TestRecordingCacheTracker();

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeExit.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeExit.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeExit.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeExit.java Mon Mar 24 23:45:55 2014
@@ -37,7 +37,7 @@ import org.junit.Test;
  * Tests if DataNode process exits if all Block Pool services exit. 
  */
 public class TestDataNodeExit {
-  private static long WAIT_TIME_IN_MILLIS = 10;
+  private static final long WAIT_TIME_IN_MILLIS = 10;
   Configuration conf;
   MiniDFSCluster cluster = null;
   

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java Mon Mar 24 23:45:55 2014
@@ -70,9 +70,9 @@ public class TestDataNodeVolumeFailure {
   final private int block_size = 512;
   MiniDFSCluster cluster = null;
   private Configuration conf;
-  int dn_num = 2;
-  int blocks_num = 30;
-  short repl=2;
+  final int dn_num = 2;
+  final int blocks_num = 30;
+  final short repl=2;
   File dataDir = null;
   File data_fail = null;
   File failedDir = null;
@@ -83,7 +83,7 @@ public class TestDataNodeVolumeFailure {
     public int num_locs = 0;
   }
   // block id to BlockLocs
-  Map<String, BlockLocs> block_map = new HashMap<String, BlockLocs> ();
+  final Map<String, BlockLocs> block_map = new HashMap<String, BlockLocs> ();
 
   @Before
   public void setUp() throws Exception {

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDirectoryScanner.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDirectoryScanner.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDirectoryScanner.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDirectoryScanner.java Mon Mar 24 23:45:55 2014
@@ -61,8 +61,8 @@ public class TestDirectoryScanner {
   private String bpid;
   private FsDatasetSpi<? extends FsVolumeSpi> fds = null;
   private DirectoryScanner scanner = null;
-  private Random rand = new Random();
-  private Random r = new Random();
+  private final Random rand = new Random();
+  private final Random r = new Random();
 
   static {
     CONF.setLong(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, 100);

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestFsDatasetCache.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestFsDatasetCache.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestFsDatasetCache.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestFsDatasetCache.java Mon Mar 24 23:45:55 2014
@@ -104,7 +104,7 @@ public class TestFsDatasetCache {
   private static DataNode dn;
   private static FsDatasetSpi<?> fsd;
   private static DatanodeProtocolClientSideTranslatorPB spyNN;
-  private static PageRounder rounder = new PageRounder();
+  private static final PageRounder rounder = new PageRounder();
   private static CacheManipulator prevCacheManipulator;
 
   static {

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestIncrementalBrVariations.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestIncrementalBrVariations.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestIncrementalBrVariations.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestIncrementalBrVariations.java Mon Mar 24 23:45:55 2014
@@ -63,7 +63,7 @@ import org.junit.Test;
 public class TestIncrementalBrVariations {
   public static final Log LOG = LogFactory.getLog(TestIncrementalBrVariations.class);
 
-  private static short NUM_DATANODES = 1;
+  private static final short NUM_DATANODES = 1;
   static final int BLOCK_SIZE = 1024;
   static final int NUM_BLOCKS = 10;
   private static final long seed = 0xFACEFEEDL;

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestMultipleNNDataBlockScanner.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestMultipleNNDataBlockScanner.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestMultipleNNDataBlockScanner.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestMultipleNNDataBlockScanner.java Mon Mar 24 23:45:55 2014
@@ -44,8 +44,8 @@ public class TestMultipleNNDataBlockScan
     LogFactory.getLog(TestMultipleNNDataBlockScanner.class);
   Configuration conf;
   MiniDFSCluster cluster = null;
-  String bpids[] = new String[3];
-  FileSystem fs[] = new FileSystem[3];
+  final String[] bpids = new String[3];
+  final FileSystem[] fs = new FileSystem[3];
   
   public void setUp() throws IOException {
     conf = new HdfsConfiguration();

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestReadOnlySharedStorage.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestReadOnlySharedStorage.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestReadOnlySharedStorage.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestReadOnlySharedStorage.java Mon Mar 24 23:45:55 2014
@@ -62,8 +62,8 @@ public class TestReadOnlySharedStorage {
 
   public static final Log LOG = LogFactory.getLog(TestReadOnlySharedStorage.class);
 
-  private static short NUM_DATANODES = 3;
-  private static int RO_NODE_INDEX = 0;
+  private static final short NUM_DATANODES = 3;
+  private static final int RO_NODE_INDEX = 0;
   private static final int BLOCK_SIZE = 1024;
   private static final long seed = 0x1BADF00DL;
   private static final Path PATH = new Path("/" + TestReadOnlySharedStorage.class.getName() + ".dat");

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestRefreshNamenodes.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestRefreshNamenodes.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestRefreshNamenodes.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestRefreshNamenodes.java Mon Mar 24 23:45:55 2014
@@ -39,10 +39,10 @@ import com.google.common.collect.Sets;
  * Tests datanode refresh namenode list functionality.
  */
 public class TestRefreshNamenodes {
-  private int nnPort1 = 2221;
-  private int nnPort2 = 2224;
-  private int nnPort3 = 2227;
-  private int nnPort4 = 2230;
+  private final int nnPort1 = 2221;
+  private final int nnPort2 = 2224;
+  private final int nnPort3 = 2227;
+  private final int nnPort4 = 2230;
 
   @Test
   public void testRefreshNamenodes() throws IOException {

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestStorageReport.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestStorageReport.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestStorageReport.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestStorageReport.java Mon Mar 24 23:45:55 2014
@@ -45,7 +45,7 @@ import static org.mockito.Matchers.anyLo
 public class TestStorageReport {
   public static final Log LOG = LogFactory.getLog(TestStorageReport.class);
 
-  private static short REPL_FACTOR = 1;
+  private static final short REPL_FACTOR = 1;
   private static final StorageType storageType = StorageType.SSD; // pick non-default.
 
   private static Configuration conf;

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestInterDatanodeProtocol.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestInterDatanodeProtocol.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestInterDatanodeProtocol.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestInterDatanodeProtocol.java Mon Mar 24 23:45:55 2014
@@ -69,7 +69,7 @@ public class TestInterDatanodeProtocol {
   private static final String ADDRESS = "0.0.0.0";
   final static private int PING_INTERVAL = 1000;
   final static private int MIN_SLEEP_TIME = 1000;
-  private static Configuration conf = new HdfsConfiguration();
+  private static final Configuration conf = new HdfsConfiguration();
 
 
   private static class TestServer extends Server {

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/CreateEditsLog.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/CreateEditsLog.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/CreateEditsLog.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/CreateEditsLog.java Mon Mar 24 23:45:55 2014
@@ -114,7 +114,7 @@ public class CreateEditsLog {
         startingBlockId + " to " + (currentBlockId-1));
   }
   
-  static String usage = "Usage: createditlogs " +
+  static final String usage = "Usage: createditlogs " +
   " -f  numFiles startingBlockIds NumBlocksPerFile  [-r replicafactor] " + 
   		"[-d editsLogDirectory]\n" + 
   		"      Default replication factor is 1\n" +

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/FileNameGenerator.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/FileNameGenerator.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/FileNameGenerator.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/FileNameGenerator.java Mon Mar 24 23:45:55 2014
@@ -32,10 +32,10 @@ import java.util.Arrays;
 public class FileNameGenerator {
   private static final int DEFAULT_FILES_PER_DIRECTORY = 32;
   
-  private int[] pathIndecies = new int[20]; // this will support up to 32**20 = 2**100 = 10**30 files
-  private String baseDir;
+  private final int[] pathIndecies = new int[20]; // this will support up to 32**20 = 2**100 = 10**30 files
+  private final String baseDir;
   private String currentDir;
-  private int filesPerDirectory;
+  private final int filesPerDirectory;
   private long fileCount;
 
   FileNameGenerator(String baseDir) {

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java Mon Mar 24 23:45:55 2014
@@ -162,7 +162,7 @@ public class NNThroughputBenchmark imple
     protected static final String OP_ALL_NAME = "all";
     protected static final String OP_ALL_USAGE = "-op all <other ops options>";
 
-    protected String baseDir;
+    protected final String baseDir;
     protected short replication;
     protected int  numThreads = 0;        // number of threads
     protected int  numOpsRequired = 0;    // number of operations requested
@@ -380,12 +380,12 @@ public class NNThroughputBenchmark imple
    * One of the threads that perform stats operations.
    */
   private class StatsDaemon extends Thread {
-    private int daemonId;
+    private final int daemonId;
     private int opsPerThread;
     private String arg1;      // argument passed to executeOp()
     private volatile int  localNumOpsExecuted = 0;
     private volatile long localCumulativeTime = 0;
-    private OperationStatsBase statsOp;
+    private final OperationStatsBase statsOp;
 
     StatsDaemon(int daemonId, int nrOps, OperationStatsBase op) {
       this.daemonId = daemonId;
@@ -890,10 +890,10 @@ public class NNThroughputBenchmark imple
     NamespaceInfo nsInfo;
     DatanodeRegistration dnRegistration;
     DatanodeStorage storage; //only one storage 
-    ArrayList<Block> blocks;
+    final ArrayList<Block> blocks;
     int nrBlocks; // actual number of blocks
     long[] blockReportList;
-    int dnIdx;
+    final int dnIdx;
 
     /**
      * Return a a 6 digit integer port.
@@ -1222,7 +1222,7 @@ public class NNThroughputBenchmark imple
       "-op replication [-datanodes T] [-nodesToDecommission D] " +
       "[-nodeReplicationLimit C] [-totalBlocks B] [-replication R]";
 
-    private BlockReportStats blockReportObject;
+    private final BlockReportStats blockReportObject;
     private int numDatanodes;
     private int nodesToDecommission;
     private int nodeReplicationLimit;

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/OfflineEditsViewerHelper.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/OfflineEditsViewerHelper.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/OfflineEditsViewerHelper.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/OfflineEditsViewerHelper.java Mon Mar 24 23:45:55 2014
@@ -48,9 +48,9 @@ public class OfflineEditsViewerHelper {
   private static final Log LOG = 
     LogFactory.getLog(OfflineEditsViewerHelper.class);
 
-    long           blockSize = 512;
+    final long           blockSize = 512;
     MiniDFSCluster cluster   = null;
-    Configuration  config    = new Configuration();
+    final Configuration  config    = new Configuration();
 
   /**
    * Generates edits with all op codes and returns the edits filename

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestAuditLogs.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestAuditLogs.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestAuditLogs.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestAuditLogs.java Mon Mar 24 23:45:55 2014
@@ -68,7 +68,7 @@ import org.junit.runners.Parameterized.P
 @RunWith(Parameterized.class)
 public class TestAuditLogs {
   static final String auditLogFile = PathUtils.getTestDirName(TestAuditLogs.class) + "/TestAuditLogs-audit.log";
-  boolean useAsyncLog;
+  final boolean useAsyncLog;
   
   @Parameters
   public static Collection<Object[]> data() {

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java Mon Mar 24 23:45:55 2014
@@ -121,7 +121,7 @@ public class TestCheckpoint {
   static final int numDatanodes = 3;
   short replication = 3;
 
-  static FilenameFilter tmpEditsFilter = new FilenameFilter() {
+  static final FilenameFilter tmpEditsFilter = new FilenameFilter() {
     @Override
     public boolean accept(File dir, String name) {
       return name.startsWith(NameNodeFile.EDITS_TMP.getName());

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestDecommissioningStatus.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestDecommissioningStatus.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestDecommissioningStatus.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestDecommissioningStatus.java Mon Mar 24 23:45:55 2014
@@ -59,7 +59,7 @@ public class TestDecommissioningStatus {
   private static Configuration conf;
   private static Path dir;
 
-  ArrayList<String> decommissionedNodes = new ArrayList<String>(numDatanodes);
+  final ArrayList<String> decommissionedNodes = new ArrayList<String>(numDatanodes);
   
   @BeforeClass
   public static void setUp() throws Exception {

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestEditLog.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestEditLog.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestEditLog.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestEditLog.java Mon Mar 24 23:45:55 2014
@@ -173,11 +173,11 @@ public class TestEditLog {
   // an object that does a bunch of transactions
   //
   static class Transactions implements Runnable {
-    FSNamesystem namesystem;
-    int numTransactions;
-    short replication = 3;
-    long blockSize = 64;
-    int startIndex;
+    final FSNamesystem namesystem;
+    final int numTransactions;
+    final short replication = 3;
+    final long blockSize = 64;
+    final int startIndex;
 
     Transactions(FSNamesystem ns, int numTx, int startIdx) {
       namesystem = ns;
@@ -848,8 +848,8 @@ public class TestEditLog {
 
   
   private static class EditLogByteInputStream extends EditLogInputStream {
-    private InputStream input;
-    private long len;
+    private final InputStream input;
+    private final long len;
     private int version;
     private FSEditLogOp.Reader reader = null;
     private FSEditLogLoader.PositionTrackingInputStream tracker = null;

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestEditLogRace.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestEditLogRace.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestEditLogRace.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestEditLogRace.java Mon Mar 24 23:45:55 2014
@@ -82,7 +82,7 @@ public class TestEditLogRace {
    */
   static final int NUM_SAVE_IMAGE = 30;
 
-  private List<Transactions> workers = new ArrayList<Transactions>();
+  private final List<Transactions> workers = new ArrayList<Transactions>();
 
   private static final int NUM_DATA_NODES = 1;
 
@@ -99,12 +99,12 @@ public class TestEditLogRace {
   // an object that does a bunch of transactions
   //
   static class Transactions implements Runnable {
-    FSNamesystem namesystem;
+    final FSNamesystem namesystem;
     short replication = 3;
     long blockSize = 64;
     volatile boolean stopped = false;
     volatile Thread thr;
-    AtomicReference<Throwable> caught;
+    final AtomicReference<Throwable> caught;
 
     Transactions(FSNamesystem ns, AtomicReference<Throwable> caught) {
       namesystem = ns;

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFSImageWithSnapshot.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFSImageWithSnapshot.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFSImageWithSnapshot.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFSImageWithSnapshot.java Mon Mar 24 23:45:55 2014
@@ -68,7 +68,7 @@ public class TestFSImageWithSnapshot {
   static final long txid = 1;
 
   private final Path dir = new Path("/TestSnapshot");
-  private static String testDir =
+  private static final String testDir =
       System.getProperty("test.build.data", "build/test/data");
   
   Configuration conf;

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFsLimits.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFsLimits.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFsLimits.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFsLimits.java Mon Mar 24 23:45:55 2014
@@ -49,7 +49,7 @@ public class TestFsLimits {
   static FSDirectory fs;
   static boolean fsIsReady;
   
-  static PermissionStatus perms
+  static final PermissionStatus perms
     = new PermissionStatus("admin", "admin", FsPermission.getDefault());
 
   static private FSImage getMockFSImage() {

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestHDFSConcat.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestHDFSConcat.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestHDFSConcat.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestHDFSConcat.java Mon Mar 24 23:45:55 2014
@@ -55,10 +55,10 @@ public class TestHDFSConcat {
   private NamenodeProtocols nn;
   private DistributedFileSystem dfs;
 
-  private static long blockSize = 512;
+  private static final long blockSize = 512;
 
   
-  private static Configuration conf;
+  private static final Configuration conf;
 
   static {
     conf = new Configuration();

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestLeaseManager.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestLeaseManager.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestLeaseManager.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestLeaseManager.java Mon Mar 24 23:45:55 2014
@@ -28,7 +28,7 @@ import org.mockito.Mockito;
 
 
 public class TestLeaseManager {
-  Configuration conf = new HdfsConfiguration();
+  final Configuration conf = new HdfsConfiguration();
   
   @Test
   public void testRemoveLeaseWithPrefixPath() throws Exception {

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestListCorruptFileBlocks.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestListCorruptFileBlocks.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestListCorruptFileBlocks.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestListCorruptFileBlocks.java Mon Mar 24 23:45:55 2014
@@ -52,7 +52,7 @@ import org.junit.Test;
  * blocks/files are also returned.
  */
 public class TestListCorruptFileBlocks {
-  static Log LOG = NameNode.stateChangeLog;
+  static final Log LOG = NameNode.stateChangeLog;
 
   /** check if nn.getCorruptFiles() returns a file that has corrupted blocks */
   @Test (timeout=300000)

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNNStorageRetentionFunctional.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNNStorageRetentionFunctional.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNNStorageRetentionFunctional.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNNStorageRetentionFunctional.java Mon Mar 24 23:45:55 2014
@@ -47,9 +47,9 @@ import com.google.common.base.Joiner;
  */
 public class TestNNStorageRetentionFunctional {
 
-  private static File TEST_ROOT_DIR =
+  private static final File TEST_ROOT_DIR =
     new File(MiniDFSCluster.getBaseDirectory());
-  private static Log LOG = LogFactory.getLog(
+  private static final Log LOG = LogFactory.getLog(
       TestNNStorageRetentionFunctional.class);
 
  /**

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNNStorageRetentionManager.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNNStorageRetentionManager.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNNStorageRetentionManager.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNNStorageRetentionManager.java Mon Mar 24 23:45:55 2014
@@ -51,7 +51,7 @@ import com.google.common.collect.Sets;
 
 
 public class TestNNStorageRetentionManager {
-  Configuration conf = new Configuration();
+  final Configuration conf = new Configuration();
 
   /**
    * For the purpose of this test, purge as many edits as we can 
@@ -268,13 +268,13 @@ public class TestNNStorageRetentionManag
   }
   
   private class TestCaseDescription {
-    private Map<File, FakeRoot> dirRoots = Maps.newLinkedHashMap();
-    private Set<File> expectedPurgedLogs = Sets.newLinkedHashSet();
-    private Set<File> expectedPurgedImages = Sets.newLinkedHashSet();
+    private final Map<File, FakeRoot> dirRoots = Maps.newLinkedHashMap();
+    private final Set<File> expectedPurgedLogs = Sets.newLinkedHashSet();
+    private final Set<File> expectedPurgedImages = Sets.newLinkedHashSet();
     
     private class FakeRoot {
-      NameNodeDirType type;
-      List<File> files;
+      final NameNodeDirType type;
+      final List<File> files;
       
       FakeRoot(NameNodeDirType type) {
         this.type = type;

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameEditsConfigs.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameEditsConfigs.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameEditsConfigs.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameEditsConfigs.java Mon Mar 24 23:45:55 2014
@@ -62,7 +62,7 @@ public class TestNameEditsConfigs {
   static final String FILE_EDITS = "current/edits";
 
   short replication = 3;
-  private File base_dir = new File(
+  private final File base_dir = new File(
       PathUtils.getTestDir(TestNameEditsConfigs.class), "dfs");
 
   @Before

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeJspHelper.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeJspHelper.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeJspHelper.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeJspHelper.java Mon Mar 24 23:45:55 2014
@@ -272,7 +272,7 @@ public class TestNameNodeJspHelper {
     LIVE("[Live Datanodes(| +):(| +)]\\d"), 
     DEAD("[Dead Datanodes(| +):(| +)]\\d");
 
-    private Pattern pattern;
+    private final Pattern pattern;
 
     public Pattern getPattern() {
       return pattern;

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeRecovery.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeRecovery.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeRecovery.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeRecovery.java Mon Mar 24 23:45:55 2014
@@ -57,7 +57,7 @@ import com.google.common.collect.Sets;
  */
 public class TestNameNodeRecovery {
   private static final Log LOG = LogFactory.getLog(TestNameNodeRecovery.class);
-  private static StartupOption recoverStartOpt = StartupOption.RECOVER;
+  private static final StartupOption recoverStartOpt = StartupOption.RECOVER;
   private static final File TEST_DIR = PathUtils.getTestDir(TestNameNodeRecovery.class);
 
   static {
@@ -205,7 +205,7 @@ public class TestNameNodeRecovery {
    * throwing an exception.
    */
   private static class EltsTestEmptyLog extends EditLogTestSetup {
-    private int paddingLength;
+    private final int paddingLength;
 
     public EltsTestEmptyLog(int paddingLength) {
       this.paddingLength = paddingLength;
@@ -289,7 +289,7 @@ public class TestNameNodeRecovery {
    * with recovery mode.
    */
   private static class EltsTestOpcodesAfterPadding extends EditLogTestSetup {
-    private int paddingLength;
+    private final int paddingLength;
 
     public EltsTestOpcodesAfterPadding(int paddingLength) {
       this.paddingLength = paddingLength;
@@ -448,7 +448,7 @@ public class TestNameNodeRecovery {
   }
 
   static class SafePaddingCorruptor implements Corruptor {
-    private byte padByte;
+    private final byte padByte;
 
     public SafePaddingCorruptor(byte padByte) {
       this.padByte = padByte;

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeRetryCacheMetrics.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeRetryCacheMetrics.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeRetryCacheMetrics.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeRetryCacheMetrics.java Mon Mar 24 23:45:55 2014
@@ -49,7 +49,7 @@ public class TestNameNodeRetryCacheMetri
   private MiniDFSCluster cluster;
   private FSNamesystem namesystem;
   private DistributedFileSystem filesystem;
-  private int namenodeId = 0;
+  private final int namenodeId = 0;
   private Configuration conf;
   private RetryCacheMetrics metrics;
 

Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNamenodeRetryCache.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNamenodeRetryCache.java?rev=1581137&r1=1581136&r2=1581137&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNamenodeRetryCache.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNamenodeRetryCache.java Mon Mar 24 23:45:55 2014
@@ -78,7 +78,7 @@ public class TestNamenodeRetryCache {
   private static final byte[] CLIENT_ID = ClientId.getClientId();
   private static MiniDFSCluster cluster;
   private static FSNamesystem namesystem;
-  private static PermissionStatus perm = new PermissionStatus(
+  private static final PermissionStatus perm = new PermissionStatus(
       "TestNamenodeRetryCache", null, FsPermission.getDefault());
   private static DistributedFileSystem filesystem;
   private static int callId = 100;



Mime
View raw message