You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-commits@hadoop.apache.org by ar...@apache.org on 2014/03/25 00:52:53 UTC
svn commit: r1581144 [5/5] - in
/hadoop/common/branches/branch-2.4/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...
Modified: hadoop/common/branches/branch-2.4/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.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeRetryCacheMetrics.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeRetryCacheMetrics.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeRetryCacheMetrics.java Mon Mar 24 23:52:48 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.4/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.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNamenodeRetryCache.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNamenodeRetryCache.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNamenodeRetryCache.java Mon Mar 24 23:52:48 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;
Modified: hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestSecondaryWebUi.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestSecondaryWebUi.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestSecondaryWebUi.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestSecondaryWebUi.java Mon Mar 24 23:52:48 2014
@@ -35,7 +35,7 @@ public class TestSecondaryWebUi {
private static MiniDFSCluster cluster;
private static SecondaryNameNode snn;
- private static Configuration conf = new Configuration();
+ private static final Configuration conf = new Configuration();
@BeforeClass
public static void setUpCluster() throws IOException {
Modified: hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestSecurityTokenEditLog.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestSecurityTokenEditLog.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestSecurityTokenEditLog.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestSecurityTokenEditLog.java Mon Mar 24 23:52:48 2014
@@ -62,8 +62,8 @@ public class TestSecurityTokenEditLog {
// an object that does a bunch of transactions
//
static class Transactions implements Runnable {
- FSNamesystem namesystem;
- int numTransactions;
+ final FSNamesystem namesystem;
+ final int numTransactions;
short replication = 3;
long blockSize = 64;
Modified: hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestStreamFile.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestStreamFile.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestStreamFile.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestStreamFile.java Mon Mar 24 23:52:48 2014
@@ -80,16 +80,16 @@ class MockFSInputStream extends FSInputS
public class TestStreamFile {
- private HdfsConfiguration CONF = new HdfsConfiguration();
- private DFSClient clientMock = Mockito.mock(DFSClient.class);
- private HttpServletRequest mockHttpServletRequest =
+ private final HdfsConfiguration CONF = new HdfsConfiguration();
+ private final DFSClient clientMock = Mockito.mock(DFSClient.class);
+ private final HttpServletRequest mockHttpServletRequest =
Mockito.mock(HttpServletRequest.class);
- private HttpServletResponse mockHttpServletResponse =
+ private final HttpServletResponse mockHttpServletResponse =
Mockito.mock(HttpServletResponse.class);
private final ServletContext mockServletContext =
Mockito.mock(ServletContext.class);
- StreamFile sfile = new StreamFile() {
+ final StreamFile sfile = new StreamFile() {
private static final long serialVersionUID = -5513776238875189473L;
@Override
@@ -298,7 +298,7 @@ public class TestStreamFile {
}
public static class ServletOutputStreamExtn extends ServletOutputStream {
- private StringBuffer buffer = new StringBuffer(3);
+ private final StringBuffer buffer = new StringBuffer(3);
public String getResult() {
return buffer.toString();
Modified: hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/HAStressTestHarness.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/HAStressTestHarness.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/HAStressTestHarness.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/HAStressTestHarness.java Mon Mar 24 23:52:48 2014
@@ -38,10 +38,10 @@ import org.apache.hadoop.test.Multithrea
* processing, etc.
*/
public class HAStressTestHarness {
- Configuration conf;
+ final Configuration conf;
private MiniDFSCluster cluster;
static final int BLOCK_SIZE = 1024;
- TestContext testCtx = new TestContext();
+ final TestContext testCtx = new TestContext();
public HAStressTestHarness() {
conf = new Configuration();
Modified: hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/HATestUtil.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/HATestUtil.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/HATestUtil.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/HATestUtil.java Mon Mar 24 23:52:48 2014
@@ -49,7 +49,7 @@ import com.google.common.base.Supplier;
* Static utility functions useful for testing HA.
*/
public abstract class HATestUtil {
- private static Log LOG = LogFactory.getLog(HATestUtil.class);
+ private static final Log LOG = LogFactory.getLog(HATestUtil.class);
private static final String LOGICAL_HOSTNAME = "ha-nn-uri-%d";
Modified: hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestDelegationTokensWithHA.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestDelegationTokensWithHA.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestDelegationTokensWithHA.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestDelegationTokensWithHA.java Mon Mar 24 23:52:48 2014
@@ -72,7 +72,7 @@ import com.google.common.base.Joiner;
* See HDFS-2904 for more info.
**/
public class TestDelegationTokensWithHA {
- private static Configuration conf = new Configuration();
+ private static final Configuration conf = new Configuration();
private static final Log LOG =
LogFactory.getLog(TestDelegationTokensWithHA.class);
private static MiniDFSCluster cluster;
Modified: hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestHAConfiguration.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestHAConfiguration.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestHAConfiguration.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestHAConfiguration.java Mon Mar 24 23:52:48 2014
@@ -44,7 +44,7 @@ import org.mockito.Mockito;
*/
public class TestHAConfiguration {
- private FSNamesystem fsn = Mockito.mock(FSNamesystem.class);
+ private final FSNamesystem fsn = Mockito.mock(FSNamesystem.class);
@Test
public void testCheckpointerValidityChecks() throws Exception {
Modified: hadoop/common/branches/branch-2.4/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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestRetryCacheWithHA.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestRetryCacheWithHA.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestRetryCacheWithHA.java Mon Mar 24 23:52:48 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/branches/branch-2.4/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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/metrics/TestNNMetricFilesInGetListingOps.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/metrics/TestNNMetricFilesInGetListingOps.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/metrics/TestNNMetricFilesInGetListingOps.java Mon Mar 24 23:52:48 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/branches/branch-2.4/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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/metrics/TestNameNodeMetrics.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/metrics/TestNameNodeMetrics.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/metrics/TestNameNodeMetrics.java Mon Mar 24 23:52:48 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/branches/branch-2.4/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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestCheckpointsWithSnapshots.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestCheckpointsWithSnapshots.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestCheckpointsWithSnapshots.java Mon Mar 24 23:52:48 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/branches/branch-2.4/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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestNestedSnapshots.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestNestedSnapshots.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestNestedSnapshots.java Mon Mar 24 23:52:48 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/branches/branch-2.4/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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestOpenFilesWithSnapshot.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestOpenFilesWithSnapshot.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestOpenFilesWithSnapshot.java Mon Mar 24 23:52:48 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/branches/branch-2.4/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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestRenameWithSnapshots.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestRenameWithSnapshots.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestRenameWithSnapshots.java Mon Mar 24 23:52:48 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/branches/branch-2.4/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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshot.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshot.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshot.java Mon Mar 24 23:52:48 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/branches/branch-2.4/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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotDiffReport.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotDiffReport.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotDiffReport.java Mon Mar 24 23:52:48 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/branches/branch-2.4/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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotFileLength.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotFileLength.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotFileLength.java Mon Mar 24 23:52:48 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/branches/branch-2.4/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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotNameWithInvalidCharacters.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotNameWithInvalidCharacters.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotNameWithInvalidCharacters.java Mon Mar 24 23:52:48 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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdmin.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdmin.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdmin.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdmin.java Mon Mar 24 23:52:48 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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdminMiniCluster.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdminMiniCluster.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdminMiniCluster.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdminMiniCluster.java Mon Mar 24 23:52:48 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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/TestOfflineEditsViewer.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/TestOfflineEditsViewer.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/TestOfflineEditsViewer.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/TestOfflineEditsViewer.java Mon Mar 24 23:52:48 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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/TestDelimitedImageVisitor.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/TestDelimitedImageVisitor.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/TestDelimitedImageVisitor.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/TestDelimitedImageVisitor.java Mon Mar 24 23:52:48 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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestAtomicFileOutputStream.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestAtomicFileOutputStream.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestAtomicFileOutputStream.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestAtomicFileOutputStream.java Mon Mar 24 23:52:48 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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestDirectBufferPool.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestDirectBufferPool.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestDirectBufferPool.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestDirectBufferPool.java Mon Mar 24 23:52:48 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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestLightWeightHashSet.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestLightWeightHashSet.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestLightWeightHashSet.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestLightWeightHashSet.java Mon Mar 24 23:52:48 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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestLightWeightLinkedSet.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestLightWeightLinkedSet.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestLightWeightLinkedSet.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestLightWeightLinkedSet.java Mon Mar 24 23:52:48 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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestHftpFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestHftpFileSystem.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestHftpFileSystem.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestHftpFileSystem.java Mon Mar 24 23:52:48 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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestTokenAspect.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestTokenAspect.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestTokenAspect.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestTokenAspect.java Mon Mar 24 23:52:48 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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsTimeouts.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsTimeouts.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsTimeouts.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsTimeouts.java Mon Mar 24 23:52:48 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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/security/TestRefreshUserMappings.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/security/TestRefreshUserMappings.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/security/TestRefreshUserMappings.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/security/TestRefreshUserMappings.java Mon Mar 24 23:52:48 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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/test/HdfsTestDriver.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/test/HdfsTestDriver.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/test/HdfsTestDriver.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/test/HdfsTestDriver.java Mon Mar 24 23:52:48 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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tools/TestDelegationTokenFetcher.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tools/TestDelegationTokenFetcher.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tools/TestDelegationTokenFetcher.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tools/TestDelegationTokenFetcher.java Mon Mar 24 23:52:48 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/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tools/TestDelegationTokenRemoteFetcher.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tools/TestDelegationTokenRemoteFetcher.java?rev=1581144&r1=1581143&r2=1581144&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tools/TestDelegationTokenRemoteFetcher.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tools/TestDelegationTokenRemoteFetcher.java Mon Mar 24 23:52:48 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() ,