Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestRetryCacheWithHA.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestRetryCacheWithHA.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestRetryCacheWithHA.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestRetryCacheWithHA.java Mon Mar 24 23:32:37 2014 @@ -92,7 +92,7 @@ public class TestRetryCacheWithHA { private MiniDFSCluster cluster; private DistributedFileSystem dfs; - private Configuration conf = new HdfsConfiguration(); + private final Configuration conf = new HdfsConfiguration(); /** * A dummy invocation handler extending RetryInvocationHandler. We can use @@ -100,7 +100,7 @@ public class TestRetryCacheWithHA { */ private static class DummyRetryInvocationHandler extends RetryInvocationHandler<ClientProtocol> { - static AtomicBoolean block = new AtomicBoolean(false); + static final AtomicBoolean block = new AtomicBoolean(false); DummyRetryInvocationHandler( FailoverProxyProvider<ClientProtocol> proxyProvider, @@ -226,8 +226,8 @@ public class TestRetryCacheWithHA { /** createSnapshot operaiton */ class CreateSnapshotOp extends AtMostOnceOp { private String snapshotPath; - private String dir; - private String snapshotName; + private final String dir; + private final String snapshotName; CreateSnapshotOp(DFSClient client, String dir, String snapshotName) { super("createSnapshot", client); @@ -269,8 +269,8 @@ public class TestRetryCacheWithHA { /** deleteSnapshot */ class DeleteSnapshotOp extends AtMostOnceOp { - private String dir; - private String snapshotName; + private final String dir; + private final String snapshotName; DeleteSnapshotOp(DFSClient client, String dir, String snapshotName) { super("deleteSnapshot", client); @@ -317,9 +317,9 @@ public class TestRetryCacheWithHA { /** renameSnapshot */ class RenameSnapshotOp extends AtMostOnceOp { - private String dir; - private String oldName; - private String newName; + private final String dir; + private final String oldName; + private final String newName; RenameSnapshotOp(DFSClient client, String dir, String oldName, String newName) { @@ -368,7 +368,7 @@ public class TestRetryCacheWithHA { /** create file operation (without OverWrite) */ class CreateOp extends AtMostOnceOp { - private String fileName; + private final String fileName; private HdfsFileStatus status; CreateOp(DFSClient client, String fileName) { @@ -416,7 +416,7 @@ public class TestRetryCacheWithHA { /** append operation */ class AppendOp extends AtMostOnceOp { - private String fileName; + private final String fileName; private LocatedBlock lbk; AppendOp(DFSClient client, String fileName) { @@ -460,8 +460,8 @@ public class TestRetryCacheWithHA { /** rename */ class RenameOp extends AtMostOnceOp { - private String oldName; - private String newName; + private final String oldName; + private final String newName; private boolean renamed; RenameOp(DFSClient client, String oldName, String newName) { @@ -503,8 +503,8 @@ public class TestRetryCacheWithHA { /** rename2 */ class Rename2Op extends AtMostOnceOp { - private String oldName; - private String newName; + private final String oldName; + private final String newName; Rename2Op(DFSClient client, String oldName, String newName) { super("rename2", client); @@ -544,9 +544,9 @@ public class TestRetryCacheWithHA { /** concat */ class ConcatOp extends AtMostOnceOp { - private String target; - private String[] srcs; - private Path[] srcPaths; + private final String target; + private final String[] srcs; + private final Path[] srcPaths; ConcatOp(DFSClient client, Path target, int numSrc) { super("concat", client); @@ -596,7 +596,7 @@ public class TestRetryCacheWithHA { /** delete */ class DeleteOp extends AtMostOnceOp { - private String target; + private final String target; private boolean deleted; DeleteOp(DFSClient client, String target) { @@ -636,8 +636,8 @@ public class TestRetryCacheWithHA { /** createSymlink */ class CreateSymlinkOp extends AtMostOnceOp { - private String target; - private String link; + private final String target; + private final String link; public CreateSymlinkOp(DFSClient client, String target, String link) { super("createSymlink", client); @@ -681,7 +681,7 @@ public class TestRetryCacheWithHA { /** updatePipeline */ class UpdatePipelineOp extends AtMostOnceOp { - private String file; + private final String file; private ExtendedBlock oldBlock; private ExtendedBlock newBlock; private DatanodeInfo[] nodes; @@ -750,7 +750,7 @@ public class TestRetryCacheWithHA { /** addCacheDirective */ class AddCacheDirectiveInfoOp extends AtMostOnceOp { - private CacheDirectiveInfo directive; + private final CacheDirectiveInfo directive; private Long result; AddCacheDirectiveInfoOp(DFSClient client, @@ -849,7 +849,7 @@ public class TestRetryCacheWithHA { /** removeCacheDirective */ class RemoveCacheDirectiveInfoOp extends AtMostOnceOp { - private CacheDirectiveInfo directive; + private final CacheDirectiveInfo directive; private long id; RemoveCacheDirectiveInfoOp(DFSClient client, String pool, @@ -897,7 +897,7 @@ public class TestRetryCacheWithHA { /** addCachePool */ class AddCachePoolOp extends AtMostOnceOp { - private String pool; + private final String pool; AddCachePoolOp(DFSClient client, String pool) { super("addCachePool", client); @@ -933,7 +933,7 @@ public class TestRetryCacheWithHA { /** modifyCachePool */ class ModifyCachePoolOp extends AtMostOnceOp { - String pool; + final String pool; ModifyCachePoolOp(DFSClient client, String pool) { super("modifyCachePool", client); @@ -970,7 +970,7 @@ public class TestRetryCacheWithHA { /** removeCachePool */ class RemoveCachePoolOp extends AtMostOnceOp { - private String pool; + private final String pool; RemoveCachePoolOp(DFSClient client, String pool) { super("removeCachePool", client);
Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/metrics/TestNNMetricFilesInGetListingOps.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/metrics/TestNNMetricFilesInGetListingOps.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/metrics/TestNNMetricFilesInGetListingOps.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/metrics/TestNNMetricFilesInGetListingOps.java Mon Mar 24 23:32:37 2014 @@ -50,7 +50,7 @@ public class TestNNMetricFilesInGetListi private MiniDFSCluster cluster; private DistributedFileSystem fs; - private Random rand = new Random(); + private final Random rand = new Random(); @Before public void setUp() throws Exception { Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/metrics/TestNameNodeMetrics.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/metrics/TestNameNodeMetrics.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/metrics/TestNameNodeMetrics.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/metrics/TestNameNodeMetrics.java Mon Mar 24 23:32:37 2014 @@ -91,7 +91,7 @@ public class TestNameNodeMetrics { private MiniDFSCluster cluster; private DistributedFileSystem fs; - private Random rand = new Random(); + private final Random rand = new Random(); private FSNamesystem namesystem; private BlockManager bm; Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestCheckpointsWithSnapshots.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestCheckpointsWithSnapshots.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestCheckpointsWithSnapshots.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestCheckpointsWithSnapshots.java Mon Mar 24 23:32:37 2014 @@ -38,7 +38,7 @@ import org.junit.Test; public class TestCheckpointsWithSnapshots { private static final Path TEST_PATH = new Path("/foo"); - private static Configuration conf = new HdfsConfiguration(); + private static final Configuration conf = new HdfsConfiguration(); static { conf.set(DFSConfigKeys.DFS_NAMENODE_SECONDARY_HTTP_ADDRESS_KEY, "0.0.0.0:0"); } Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestNestedSnapshots.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestNestedSnapshots.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestNestedSnapshots.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestNestedSnapshots.java Mon Mar 24 23:32:37 2014 @@ -59,12 +59,12 @@ public class TestNestedSnapshots { } private static final long SEED = 0; - private static Random RANDOM = new Random(SEED); + private static final Random RANDOM = new Random(SEED); private static final short REPLICATION = 3; private static final long BLOCKSIZE = 1024; - private static Configuration conf = new Configuration(); + private static final Configuration conf = new Configuration(); private static MiniDFSCluster cluster; private static DistributedFileSystem hdfs; Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestOpenFilesWithSnapshot.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestOpenFilesWithSnapshot.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestOpenFilesWithSnapshot.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestOpenFilesWithSnapshot.java Mon Mar 24 23:32:37 2014 @@ -38,7 +38,7 @@ import org.junit.Before; import org.junit.Test; public class TestOpenFilesWithSnapshot { - private Configuration conf = new Configuration(); + private final Configuration conf = new Configuration(); MiniDFSCluster cluster = null; DistributedFileSystem fs = null; Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestRenameWithSnapshots.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestRenameWithSnapshots.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestRenameWithSnapshots.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestRenameWithSnapshots.java Mon Mar 24 23:32:37 2014 @@ -87,12 +87,12 @@ public class TestRenameWithSnapshots { private static final short REPL_2 = 1; private static final long BLOCKSIZE = 1024; - private static Configuration conf = new Configuration(); + private static final Configuration conf = new Configuration(); private static MiniDFSCluster cluster; private static FSNamesystem fsn; private static FSDirectory fsdir; private static DistributedFileSystem hdfs; - private static String testDir = + private static final String testDir = System.getProperty("test.build.data", "build/test/data"); static private final Path dir = new Path("/testRenameWithSnapshots"); static private final Path sub1 = new Path(dir, "sub1"); Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshot.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshot.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshot.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshot.java Mon Mar 24 23:32:37 2014 @@ -98,7 +98,7 @@ public class TestSnapshot { protected static FSDirectory fsdir; protected DistributedFileSystem hdfs; - private static String testDir = + private static final String testDir = System.getProperty("test.build.data", "build/test/data"); @Rule @@ -108,7 +108,7 @@ public class TestSnapshot { * The list recording all previous snapshots. Each element in the array * records a snapshot root. */ - protected static ArrayList<Path> snapshotList = new ArrayList<Path>(); + protected static final ArrayList<Path> snapshotList = new ArrayList<Path>(); /** * Check {@link SnapshotTestHelper.TestDirectoryTree} */ Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotDiffReport.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotDiffReport.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotDiffReport.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotDiffReport.java Mon Mar 24 23:32:37 2014 @@ -55,7 +55,7 @@ public class TestSnapshotDiffReport { protected MiniDFSCluster cluster; protected DistributedFileSystem hdfs; - private HashMap<Path, Integer> snapshotNumberMap = new HashMap<Path, Integer>(); + private final HashMap<Path, Integer> snapshotNumberMap = new HashMap<Path, Integer>(); @Before public void setUp() throws Exception { Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotFileLength.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotFileLength.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotFileLength.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotFileLength.java Mon Mar 24 23:32:37 2014 @@ -44,7 +44,7 @@ public class TestSnapshotFileLength { private static final short REPLICATION = 1; private static final int BLOCKSIZE = 1024; - private static Configuration conf = new Configuration(); + private static final Configuration conf = new Configuration(); private static MiniDFSCluster cluster; private static DistributedFileSystem hdfs; Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotNameWithInvalidCharacters.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotNameWithInvalidCharacters.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotNameWithInvalidCharacters.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotNameWithInvalidCharacters.java Mon Mar 24 23:32:37 2014 @@ -33,7 +33,7 @@ public class TestSnapshotNameWithInvalid private static final short REPLICATION = 1; private static final int BLOCKSIZE = 1024; - private static Configuration conf = new Configuration(); + private static final Configuration conf = new Configuration(); private static MiniDFSCluster cluster; private static DistributedFileSystem hdfs; Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdmin.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdmin.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdmin.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdmin.java Mon Mar 24 23:32:37 2014 @@ -55,8 +55,8 @@ public class TestDFSHAAdmin { private static final Log LOG = LogFactory.getLog(TestDFSHAAdmin.class); private DFSHAAdmin tool; - private ByteArrayOutputStream errOutBytes = new ByteArrayOutputStream(); - private ByteArrayOutputStream outBytes = new ByteArrayOutputStream(); + private final ByteArrayOutputStream errOutBytes = new ByteArrayOutputStream(); + private final ByteArrayOutputStream outBytes = new ByteArrayOutputStream(); private String errOutput; private String output; private HAServiceProtocol mockProtocol; @@ -68,22 +68,22 @@ public class TestDFSHAAdmin { new HAServiceStatus(HAServiceState.STANDBY) .setReadyToBecomeActive(); - private ArgumentCaptor<StateChangeRequestInfo> reqInfoCaptor = + private final ArgumentCaptor<StateChangeRequestInfo> reqInfoCaptor = ArgumentCaptor.forClass(StateChangeRequestInfo.class); - private static String HOST_A = "1.2.3.1"; - private static String HOST_B = "1.2.3.2"; + private static final String HOST_A = "1.2.3.1"; + private static final String HOST_B = "1.2.3.2"; // Fencer shell commands that always return true and false respectively // on Unix. - private static String FENCER_TRUE_COMMAND_UNIX = "shell(true)"; - private static String FENCER_FALSE_COMMAND_UNIX = "shell(false)"; + private static final String FENCER_TRUE_COMMAND_UNIX = "shell(true)"; + private static final String FENCER_FALSE_COMMAND_UNIX = "shell(false)"; // Fencer shell commands that always return true and false respectively // on Windows. Lacking POSIX 'true' and 'false' commands we use the DOS // commands 'rem' and 'help.exe'. - private static String FENCER_TRUE_COMMAND_WINDOWS = "shell(rem)"; - private static String FENCER_FALSE_COMMAND_WINDOWS = "shell(help.exe /? >NUL)"; + private static final String FENCER_TRUE_COMMAND_WINDOWS = "shell(rem)"; + private static final String FENCER_FALSE_COMMAND_WINDOWS = "shell(help.exe /? >NUL)"; private HdfsConfiguration getHAConf() { HdfsConfiguration conf = new HdfsConfiguration(); Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdminMiniCluster.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdminMiniCluster.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdminMiniCluster.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdminMiniCluster.java Mon Mar 24 23:32:37 2014 @@ -59,7 +59,7 @@ public class TestDFSHAAdminMiniCluster { private MiniDFSCluster cluster; private Configuration conf; private DFSHAAdmin tool; - private ByteArrayOutputStream errOutBytes = new ByteArrayOutputStream(); + private final ByteArrayOutputStream errOutBytes = new ByteArrayOutputStream(); private String errOutput; Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/TestOfflineEditsViewer.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/TestOfflineEditsViewer.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/TestOfflineEditsViewer.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/TestOfflineEditsViewer.java Mon Mar 24 23:32:37 2014 @@ -45,7 +45,7 @@ public class TestOfflineEditsViewer { private static final Log LOG = LogFactory .getLog(TestOfflineEditsViewer.class); - private static String buildDir = PathUtils + private static final String buildDir = PathUtils .getTestDirName(TestOfflineEditsViewer.class); // to create edits and get edits filename Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/TestDelimitedImageVisitor.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/TestDelimitedImageVisitor.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/TestDelimitedImageVisitor.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/TestDelimitedImageVisitor.java Mon Mar 24 23:32:37 2014 @@ -35,7 +35,7 @@ import org.junit.Test; * on predetermined inputs */ public class TestDelimitedImageVisitor { - private static String ROOT = PathUtils.getTestDirName(TestDelimitedImageVisitor.class); + private static final String ROOT = PathUtils.getTestDirName(TestDelimitedImageVisitor.class); private static final String delim = "--"; // Record an element in the visitor and build the expected line in the output Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestAtomicFileOutputStream.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestAtomicFileOutputStream.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestAtomicFileOutputStream.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestAtomicFileOutputStream.java Mon Mar 24 23:32:37 2014 @@ -41,9 +41,9 @@ public class TestAtomicFileOutputStream private static final String TEST_STRING = "hello world"; private static final String TEST_STRING_2 = "goodbye world"; - private static File TEST_DIR = PathUtils.getTestDir(TestAtomicFileOutputStream.class); + private static final File TEST_DIR = PathUtils.getTestDir(TestAtomicFileOutputStream.class); - private static File DST_FILE = new File(TEST_DIR, "test.txt"); + private static final File DST_FILE = new File(TEST_DIR, "test.txt"); @Before public void cleanupTestDir() throws IOException { Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestDirectBufferPool.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestDirectBufferPool.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestDirectBufferPool.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestDirectBufferPool.java Mon Mar 24 23:32:37 2014 @@ -29,7 +29,7 @@ import org.junit.Test; import com.google.common.collect.Lists; public class TestDirectBufferPool { - DirectBufferPool pool = new DirectBufferPool(); + final DirectBufferPool pool = new DirectBufferPool(); @Test public void testBasics() { Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestLightWeightHashSet.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestLightWeightHashSet.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestLightWeightHashSet.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestLightWeightHashSet.java Mon Mar 24 23:32:37 2014 @@ -40,7 +40,7 @@ public class TestLightWeightHashSet{ private static final Log LOG = LogFactory .getLog("org.apache.hadoop.hdfs.TestLightWeightHashSet"); - private ArrayList<Integer> list = new ArrayList<Integer>(); + private final ArrayList<Integer> list = new ArrayList<Integer>(); private final int NUM = 100; private LightWeightHashSet<Integer> set; private Random rand; Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestLightWeightLinkedSet.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestLightWeightLinkedSet.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestLightWeightLinkedSet.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestLightWeightLinkedSet.java Mon Mar 24 23:32:37 2014 @@ -37,7 +37,7 @@ public class TestLightWeightLinkedSet { private static final Log LOG = LogFactory .getLog("org.apache.hadoop.hdfs.TestLightWeightLinkedSet"); - private ArrayList<Integer> list = new ArrayList<Integer>(); + private final ArrayList<Integer> list = new ArrayList<Integer>(); private final int NUM = 100; private LightWeightLinkedSet<Integer> set; private Random rand; Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestHftpFileSystem.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestHftpFileSystem.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestHftpFileSystem.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestHftpFileSystem.java Mon Mar 24 23:32:37 2014 @@ -64,7 +64,7 @@ public class TestHftpFileSystem { private FileSystem hdfs = null; private HftpFileSystem hftpFs = null; - private static Path[] TEST_PATHS = new Path[] { + private static final Path[] TEST_PATHS = new Path[] { // URI does not encode, Request#getPathInfo returns /foo new Path("/foo;bar"), Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestTokenAspect.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestTokenAspect.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestTokenAspect.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestTokenAspect.java Mon Mar 24 23:32:37 2014 @@ -66,7 +66,7 @@ public class TestTokenAspect { private static final Text TOKEN_KIND = new Text("DummyFS Token"); private boolean emulateSecurityEnabled; private TokenAspect<DummyFs> tokenAspect; - private UserGroupInformation ugi = UserGroupInformation + private final UserGroupInformation ugi = UserGroupInformation .createUserForTesting("foo", new String[] { "bar" }); private URI uri; Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsTimeouts.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsTimeouts.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsTimeouts.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsTimeouts.java Mon Mar 24 23:32:37 2014 @@ -68,7 +68,7 @@ public class TestWebHdfsTimeouts { private InetSocketAddress nnHttpAddress; private ServerSocket serverSocket; private Thread serverThread; - private URLConnectionFactory connectionFactory = new URLConnectionFactory(new ConnectionConfigurator() { + private final URLConnectionFactory connectionFactory = new URLConnectionFactory(new ConnectionConfigurator() { @Override public HttpURLConnection configure(HttpURLConnection conn) throws IOException { conn.setReadTimeout(SHORT_SOCKET_TIMEOUT); Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/security/TestRefreshUserMappings.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/security/TestRefreshUserMappings.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/security/TestRefreshUserMappings.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/security/TestRefreshUserMappings.java Mon Mar 24 23:32:37 2014 @@ -50,7 +50,7 @@ import org.junit.Test; public class TestRefreshUserMappings { private MiniDFSCluster cluster; Configuration config; - private static long groupRefreshTimeoutSec = 1; + private static final long groupRefreshTimeoutSec = 1; private String tempResource = null; public static class MockUnixGroupsMapping implements GroupMappingServiceProvider { Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/test/HdfsTestDriver.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/test/HdfsTestDriver.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/test/HdfsTestDriver.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/test/HdfsTestDriver.java Mon Mar 24 23:32:37 2014 @@ -26,7 +26,7 @@ import org.apache.hadoop.util.ProgramDri */ public class HdfsTestDriver { - private ProgramDriver pgd; + private final ProgramDriver pgd; public HdfsTestDriver() { this(new ProgramDriver()); Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tools/TestDelegationTokenFetcher.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tools/TestDelegationTokenFetcher.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tools/TestDelegationTokenFetcher.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tools/TestDelegationTokenFetcher.java Mon Mar 24 23:32:37 2014 @@ -48,7 +48,7 @@ public class TestDelegationTokenFetcher private Configuration conf; private URI uri; private static final String SERVICE_VALUE = "localhost:2005"; - private static String tokenFile = "file.dta"; + private static final String tokenFile = "file.dta"; @Before public void init() throws URISyntaxException, IOException { Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tools/TestDelegationTokenRemoteFetcher.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tools/TestDelegationTokenRemoteFetcher.java?rev=1581124&r1=1581123&r2=1581124&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tools/TestDelegationTokenRemoteFetcher.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tools/TestDelegationTokenRemoteFetcher.java Mon Mar 24 23:32:37 2014 @@ -294,7 +294,7 @@ public class TestDelegationTokenRemoteFe private final Token<DelegationTokenIdentifier> token; private final String serviceUrl; - private ImmutableMap<String, Handler> routes = ImmutableMap.of( + private final ImmutableMap<String, Handler> routes = ImmutableMap.of( "/exception", new ExceptionHandler(), "/cancelDelegationToken", new CancelHandler(), "/getDelegationToken", new FetchHandler() ,