hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aengin...@apache.org
Subject hadoop git commit: HDFS-11798. Ozone: Correct description for ozone.handler.type in ozone-default.xml. Contributed by Mukul Kumar Singh.
Date Wed, 10 May 2017 21:44:11 GMT
Repository: hadoop
Updated Branches:
  refs/heads/HDFS-7240 38e269706 -> 5df9a1d2c


HDFS-11798. Ozone: Correct description for ozone.handler.type in ozone-default.xml. Contributed
by Mukul Kumar Singh.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/5df9a1d2
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/5df9a1d2
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/5df9a1d2

Branch: refs/heads/HDFS-7240
Commit: 5df9a1d2ca8e26697e35eb247bc2a760b423e7d8
Parents: 38e2697
Author: Anu Engineer <aengineer@apache.org>
Authored: Wed May 10 14:43:53 2017 -0700
Committer: Anu Engineer <aengineer@apache.org>
Committed: Wed May 10 14:43:53 2017 -0700

----------------------------------------------------------------------
 .../hdfs/server/datanode/ObjectStoreHandler.java       | 12 ++++++++----
 .../main/java/org/apache/hadoop/ozone/OzoneConsts.java |  6 ++++++
 .../hadoop-hdfs/src/main/resources/ozone-default.xml   |  2 +-
 .../org/apache/hadoop/cblock/TestLocalBlockCache.java  |  4 +++-
 .../apache/hadoop/ozone/TestContainerOperations.java   |  2 +-
 .../org/apache/hadoop/ozone/TestMiniOzoneCluster.java  |  2 +-
 .../hadoop/ozone/TestStorageContainerManager.java      |  8 ++++----
 .../common/impl/TestContainerPersistence.java          |  2 +-
 .../ozone/container/ozoneimpl/TestOzoneContainer.java  | 13 +++++++------
 .../apache/hadoop/ozone/scm/TestAllocateContainer.java |  2 +-
 .../apache/hadoop/ozone/scm/TestContainerSQLCli.java   |  2 +-
 .../hadoop/ozone/scm/TestContainerSmallFile.java       |  2 +-
 .../java/org/apache/hadoop/ozone/scm/TestSCMCli.java   |  3 ++-
 .../org/apache/hadoop/ozone/scm/TestSCMMXBean.java     |  3 ++-
 .../hadoop/ozone/web/TestOzoneRestWithMiniCluster.java |  3 ++-
 .../org/apache/hadoop/ozone/web/TestOzoneVolumes.java  |  2 +-
 .../apache/hadoop/ozone/web/TestOzoneWebAccess.java    |  2 +-
 .../apache/hadoop/ozone/web/client/TestBuckets.java    |  3 ++-
 .../org/apache/hadoop/ozone/web/client/TestKeys.java   |  3 ++-
 .../org/apache/hadoop/ozone/web/client/TestVolume.java |  2 +-
 20 files changed, 48 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/5df9a1d2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/ObjectStoreHandler.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/ObjectStoreHandler.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/ObjectStoreHandler.java
index 65d0256..cb4880d 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/ObjectStoreHandler.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/ObjectStoreHandler.java
@@ -31,6 +31,7 @@ import com.sun.jersey.api.container.ContainerFactory;
 import com.sun.jersey.api.core.ApplicationAdapter;
 
 import org.apache.hadoop.ozone.OzoneClientUtils;
+import org.apache.hadoop.ozone.OzoneConsts;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -80,7 +81,7 @@ public final class ObjectStoreHandler implements Closeable {
     final StorageHandler storageHandler;
 
     // Initialize Jersey container for object store web application.
-    if ("distributed".equalsIgnoreCase(shType)) {
+    if (OzoneConsts.OZONE_HANDLER_DISTRIBUTED.equalsIgnoreCase(shType)) {
       RPC.setProtocolEngine(conf, StorageContainerLocationProtocolPB.class,
           ProtobufRpcEngine.class);
       long version =
@@ -95,13 +96,16 @@ public final class ObjectStoreHandler implements Closeable {
       storageHandler = new DistributedStorageHandler(new OzoneConfiguration(),
           this.storageContainerLocationClient);
     } else {
-      if ("local".equalsIgnoreCase(shType)) {
+      if (OzoneConsts.OZONE_HANDLER_LOCAL.equalsIgnoreCase(shType)) {
         storageHandler = new LocalStorageHandler(conf);
         this.storageContainerLocationClient = null;
       } else {
         throw new IllegalArgumentException(
-            String.format("Unrecognized value for %s: %s",
-                OZONE_HANDLER_TYPE_KEY, shType));
+            String.format("Unrecognized value for %s: %s,"
+                + " Allowed values are %s,%s",
+                OZONE_HANDLER_TYPE_KEY, shType,
+                OzoneConsts.OZONE_HANDLER_DISTRIBUTED,
+                OzoneConsts.OZONE_HANDLER_LOCAL));
       }
     }
     ApplicationAdapter aa =

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5df9a1d2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/OzoneConsts.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/OzoneConsts.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/OzoneConsts.java
index d37a28b..e10a3e2 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/OzoneConsts.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/OzoneConsts.java
@@ -86,6 +86,12 @@ public final class OzoneConsts {
    */
   public enum Versioning {NOT_DEFINED, ENABLED, DISABLED}
 
+  /**
+   * Ozone handler types
+   */
+  public static final String OZONE_HANDLER_DISTRIBUTED = "distributed";
+  public static final String OZONE_HANDLER_LOCAL = "local";
+
   private OzoneConsts() {
     // Never Constructed
   }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5df9a1d2/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/ozone-default.xml
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/ozone-default.xml b/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/ozone-default.xml
index 212c68a..5bfe76d 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/ozone-default.xml
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/ozone-default.xml
@@ -39,7 +39,7 @@
     <description>
       The second key dfs.storage.handler.type tells ozone which storage
       handler to use. The possible values are:
-      ozone - The Ozone distributed storage handler.
+      distributed - The Ozone distributed storage handler.
       local - Local Storage handler strictly for testing.
     </description>
   </property>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5df9a1d2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/cblock/TestLocalBlockCache.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/cblock/TestLocalBlockCache.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/cblock/TestLocalBlockCache.java
index e578b6e..f15a5ed 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/cblock/TestLocalBlockCache.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/cblock/TestLocalBlockCache.java
@@ -28,6 +28,7 @@ import org.apache.hadoop.cblock.jscsiHelper.cache.impl.CBlockLocalCache;
 import org.apache.hadoop.io.IOUtils;
 import org.apache.hadoop.ozone.MiniOzoneCluster;
 import org.apache.hadoop.ozone.OzoneConfiguration;
+import org.apache.hadoop.ozone.OzoneConsts;
 import org.apache.hadoop.ozone.container.ozoneimpl.TestOzoneContainer;
 import org.apache.hadoop.scm.XceiverClientManager;
 import org.apache.hadoop.scm.XceiverClientSpi;
@@ -90,7 +91,8 @@ public class TestLocalBlockCache {
     config.setBoolean(DFS_CBLOCK_TRACE_IO, true);
     config.setBoolean(DFS_CBLOCK_ENABLE_SHORT_CIRCUIT_IO, true);
     cluster = new MiniOzoneCluster.Builder(config)
-        .numDataNodes(1).setHandlerType("distributed").build();
+        .numDataNodes(1)
+        .setHandlerType(OzoneConsts.OZONE_HANDLER_DISTRIBUTED).build();
     storageContainerLocationClient = cluster
         .createStorageContainerLocationClient();
     xceiverClientManager = new XceiverClientManager(config);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5df9a1d2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/TestContainerOperations.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/TestContainerOperations.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/TestContainerOperations.java
index e81fc0e..873aba5 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/TestContainerOperations.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/TestContainerOperations.java
@@ -55,7 +55,7 @@ public class TestContainerOperations {
         SCMContainerPlacementCapacity.class, ContainerPlacementPolicy.class);
     cluster = new MiniOzoneCluster.Builder(ozoneConf).numDataNodes(1)
         .storageCapacities(new long[] {datanodeCapacities, datanodeCapacities})
-        .setHandlerType("distributed").build();
+        .setHandlerType(OzoneConsts.OZONE_HANDLER_DISTRIBUTED).build();
     StorageContainerLocationProtocolClientSideTranslatorPB client =
         cluster.createStorageContainerLocationClient();
     RPC.setProtocolEngine(ozoneConf, StorageContainerLocationProtocolPB.class,

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5df9a1d2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/TestMiniOzoneCluster.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/TestMiniOzoneCluster.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/TestMiniOzoneCluster.java
index 085cb86..90b8066 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/TestMiniOzoneCluster.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/TestMiniOzoneCluster.java
@@ -78,7 +78,7 @@ public class TestMiniOzoneCluster {
   public void testStartMultipleDatanodes() throws Exception {
     final int numberOfNodes = 3;
     cluster = new MiniOzoneCluster.Builder(conf).numDataNodes(numberOfNodes)
-        .setHandlerType("distributed").build();
+        .setHandlerType(OzoneConsts.OZONE_HANDLER_DISTRIBUTED).build();
 
     // make sure datanode.id file is correct
     File idPath = new File(

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5df9a1d2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManager.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManager.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManager.java
index e8ca6b1..1411ffb 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManager.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManager.java
@@ -69,7 +69,7 @@ public class TestStorageContainerManager {
   //@Test
   public void testLocationsForSingleKey() throws Exception {
     cluster = new MiniOzoneCluster.Builder(conf).numDataNodes(1)
-        .setHandlerType("distributed").build();
+        .setHandlerType(OzoneConsts.OZONE_HANDLER_DISTRIBUTED).build();
     storageContainerLocationClient =
         cluster.createStorageContainerLocationClient();
     Set<LocatedContainer> containers =
@@ -85,7 +85,7 @@ public class TestStorageContainerManager {
   //@Test
   public void testLocationsForMultipleKeys() throws Exception {
     cluster = new MiniOzoneCluster.Builder(conf).numDataNodes(1)
-        .setHandlerType("distributed").build();
+        .setHandlerType(OzoneConsts.OZONE_HANDLER_DISTRIBUTED).build();
     storageContainerLocationClient =
         cluster.createStorageContainerLocationClient();
     Set<LocatedContainer> containers =
@@ -102,7 +102,7 @@ public class TestStorageContainerManager {
   //@Test
   public void testNoDataNodes() throws Exception {
     cluster = new MiniOzoneCluster.Builder(conf).numDataNodes(0)
-        .setHandlerType("distributed")
+        .setHandlerType(OzoneConsts.OZONE_HANDLER_DISTRIBUTED)
         .doNotwaitTobeOutofChillMode()
         .build();
     storageContainerLocationClient =
@@ -118,7 +118,7 @@ public class TestStorageContainerManager {
   //@Test
   public void testMultipleDataNodes() throws Exception {
     cluster = new MiniOzoneCluster.Builder(conf).numDataNodes(3)
-        .setHandlerType("distributed").build();
+        .setHandlerType(OzoneConsts.OZONE_HANDLER_DISTRIBUTED).build();
     storageContainerLocationClient =
         cluster.createStorageContainerLocationClient();
     Set<LocatedContainer> containers =

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5df9a1d2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/container/common/impl/TestContainerPersistence.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/container/common/impl/TestContainerPersistence.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/container/common/impl/TestContainerPersistence.java
index 2b6972b..e01e7f0 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/container/common/impl/TestContainerPersistence.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/container/common/impl/TestContainerPersistence.java
@@ -106,7 +106,7 @@ public class TestContainerPersistence {
     Assert.assertTrue(containerDir.mkdirs());
 
     cluster = new MiniOzoneCluster.Builder(conf)
-        .setHandlerType("distributed").build();
+        .setHandlerType(OzoneConsts.OZONE_HANDLER_DISTRIBUTED).build();
     containerManager = new ContainerManagerImpl();
     chunkManager = new ChunkManagerImpl(containerManager);
     containerManager.setChunkManager(chunkManager);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5df9a1d2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestOzoneContainer.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestOzoneContainer.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestOzoneContainer.java
index 2de77f6..8d33feb 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestOzoneContainer.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestOzoneContainer.java
@@ -22,6 +22,7 @@ import org.apache.hadoop.hdfs.ozone.protocol.proto.ContainerProtos;
 import org.apache.hadoop.ozone.MiniOzoneCluster;
 import org.apache.hadoop.ozone.OzoneConfigKeys;
 import org.apache.hadoop.ozone.OzoneConfiguration;
+import org.apache.hadoop.ozone.OzoneConsts;
 import org.apache.hadoop.ozone.container.ContainerTestHelper;
 import org.apache.hadoop.ozone.web.utils.OzoneUtils;
 import org.apache.hadoop.scm.XceiverClient;
@@ -64,7 +65,7 @@ public class TestOzoneContainer {
     try {
       cluster = new MiniOzoneCluster.Builder(conf)
           .setRandomContainerPort(false)
-          .setHandlerType("distributed").build();
+          .setHandlerType(OzoneConsts.OZONE_HANDLER_DISTRIBUTED).build();
       // We don't start Ozone Container via data node, we will do it
       // independently in our test path.
       Pipeline pipeline = ContainerTestHelper.createSingleNodePipeline(
@@ -116,7 +117,7 @@ public class TestOzoneContainer {
     ContainerTestHelper.initRatisConf(rpc, pipeline, conf);
 
     final MiniOzoneCluster cluster = new MiniOzoneCluster.Builder(conf)
-        .setHandlerType("local")
+        .setHandlerType(OzoneConsts.OZONE_HANDLER_LOCAL)
         .numDataNodes(pipeline.getMachines().size())
         .build();
     cluster.waitOzoneReady();
@@ -165,7 +166,7 @@ public class TestOzoneContainer {
 
       cluster = new MiniOzoneCluster.Builder(conf)
           .setRandomContainerPort(false)
-          .setHandlerType("distributed").build();
+          .setHandlerType(OzoneConsts.OZONE_HANDLER_DISTRIBUTED).build();
 
       // This client talks to ozone container via datanode.
       XceiverClient client = new XceiverClient(pipeline, conf);
@@ -271,7 +272,7 @@ public class TestOzoneContainer {
       client = createClientForTesting(conf);
       cluster = new MiniOzoneCluster.Builder(conf)
           .setRandomContainerPort(false)
-          .setHandlerType("distributed").build();
+          .setHandlerType(OzoneConsts.OZONE_HANDLER_DISTRIBUTED).build();
       client.connect();
 
       String containerName = client.getPipeline().getContainerName();
@@ -316,7 +317,7 @@ public class TestOzoneContainer {
       client = createClientForTesting(conf);
       cluster = new MiniOzoneCluster.Builder(conf)
           .setRandomContainerPort(false)
-          .setHandlerType("distributed").build();
+          .setHandlerType(OzoneConsts.OZONE_HANDLER_DISTRIBUTED).build();
       client.connect();
 
       String containerName = client.getPipeline().getContainerName();
@@ -404,7 +405,7 @@ public class TestOzoneContainer {
       client = createClientForTesting(conf);
       cluster = new MiniOzoneCluster.Builder(conf)
           .setRandomContainerPort(false)
-          .setHandlerType("distributed").build();
+          .setHandlerType(OzoneConsts.OZONE_HANDLER_DISTRIBUTED).build();
       client.connect();
 
       String containerName = client.getPipeline().getContainerName();

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5df9a1d2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestAllocateContainer.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestAllocateContainer.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestAllocateContainer.java
index 5a2dd2d..97dd3a3 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestAllocateContainer.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestAllocateContainer.java
@@ -51,7 +51,7 @@ public class TestAllocateContainer {
     conf = new OzoneConfiguration();
     cluster = new MiniOzoneCluster.Builder(conf).numDataNodes(1)
         .storageCapacities(new long[] {datanodeCapacities, datanodeCapacities})
-        .setHandlerType("distributed").build();
+        .setHandlerType(OzoneConsts.OZONE_HANDLER_DISTRIBUTED).build();
     storageContainerLocationClient =
         cluster.createStorageContainerLocationClient();
     cluster.waitForHeartbeatProcessed();

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5df9a1d2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestContainerSQLCli.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestContainerSQLCli.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestContainerSQLCli.java
index 89da38f..e3c24f9 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestContainerSQLCli.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestContainerSQLCli.java
@@ -80,7 +80,7 @@ public class TestContainerSQLCli {
     conf.setInt(ScmConfigKeys.OZONE_SCM_CONTAINER_PROVISION_BATCH_SIZE, 2);
     cluster = new MiniOzoneCluster.Builder(conf).numDataNodes(1)
         .storageCapacities(new long[] {datanodeCapacities, datanodeCapacities})
-        .setHandlerType("distributed").build();
+        .setHandlerType(OzoneConsts.OZONE_HANDLER_DISTRIBUTED).build();
     storageContainerLocationClient =
         cluster.createStorageContainerLocationClient();
     cluster.waitForHeartbeatProcessed();

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5df9a1d2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestContainerSmallFile.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestContainerSmallFile.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestContainerSmallFile.java
index a30707c..b657636 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestContainerSmallFile.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestContainerSmallFile.java
@@ -62,7 +62,7 @@ public class TestContainerSmallFile {
         SCMContainerPlacementCapacity.class, ContainerPlacementPolicy.class);
     cluster = new MiniOzoneCluster.Builder(ozoneConfig).numDataNodes(1)
         .storageCapacities(new long[] {datanodeCapacities, datanodeCapacities})
-        .setHandlerType("distributed").build();
+        .setHandlerType(OzoneConsts.OZONE_HANDLER_DISTRIBUTED).build();
     storageContainerLocationClient = cluster
         .createStorageContainerLocationClient();
     xceiverClientManager = new XceiverClientManager(ozoneConfig);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5df9a1d2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestSCMCli.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestSCMCli.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestSCMCli.java
index b5a6205..77865e9 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestSCMCli.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestSCMCli.java
@@ -21,6 +21,7 @@ import org.apache.hadoop.hdfs.protocol.DatanodeID;
 import org.apache.hadoop.io.IOUtils;
 import org.apache.hadoop.ozone.MiniOzoneCluster;
 import org.apache.hadoop.ozone.OzoneConfiguration;
+import org.apache.hadoop.ozone.OzoneConsts;
 import org.apache.hadoop.ozone.container.common.helpers.ContainerData;
 import org.apache.hadoop.ozone.container.common.helpers.KeyUtils;
 import org.apache.hadoop.ozone.container.common.interfaces.ContainerManager;
@@ -76,7 +77,7 @@ public class TestSCMCli {
   public static void setup() throws Exception {
     conf = new OzoneConfiguration();
     cluster = new MiniOzoneCluster.Builder(conf).numDataNodes(1)
-        .setHandlerType("distributed").build();
+        .setHandlerType(OzoneConsts.OZONE_HANDLER_DISTRIBUTED).build();
     storageContainerLocationClient =
         cluster.createStorageContainerLocationClient();
     ScmClient client = new ContainerOperationClient(

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5df9a1d2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestSCMMXBean.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestSCMMXBean.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestSCMMXBean.java
index c42edec..16f2e3c 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestSCMMXBean.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestSCMMXBean.java
@@ -23,6 +23,7 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.io.IOUtils;
 import org.apache.hadoop.ozone.MiniOzoneCluster;
 import org.apache.hadoop.ozone.OzoneConfiguration;
+import org.apache.hadoop.ozone.OzoneConsts;
 import org.apache.hadoop.ozone.scm.node.NodeManager;
 import org.junit.BeforeClass;
 import org.junit.AfterClass;
@@ -56,7 +57,7 @@ public class TestSCMMXBean {
     conf = new OzoneConfiguration();
     cluster = new MiniOzoneCluster.Builder(conf)
         .numDataNodes(numOfDatanodes)
-        .setHandlerType("distributed")
+        .setHandlerType(OzoneConsts.OZONE_HANDLER_DISTRIBUTED)
         .build();
     scm = cluster.getStorageContainerManager();
     mbs = ManagementFactory.getPlatformMBeanServer();

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5df9a1d2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/TestOzoneRestWithMiniCluster.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/TestOzoneRestWithMiniCluster.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/TestOzoneRestWithMiniCluster.java
index 1f39467..a3e5e2e 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/TestOzoneRestWithMiniCluster.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/TestOzoneRestWithMiniCluster.java
@@ -24,6 +24,7 @@ import static org.apache.hadoop.ozone.OzoneConsts.CHUNK_SIZE;
 import static org.junit.Assert.*;
 
 import org.apache.commons.lang.RandomStringUtils;
+import org.apache.hadoop.ozone.OzoneConsts;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Rule;
@@ -60,7 +61,7 @@ public class TestOzoneRestWithMiniCluster {
   public static void init() throws Exception {
     conf = new OzoneConfiguration();
     cluster = new MiniOzoneCluster.Builder(conf).numDataNodes(1)
-        .setHandlerType("distributed").build();
+        .setHandlerType(OzoneConsts.OZONE_HANDLER_DISTRIBUTED).build();
     ozoneClient = cluster.createOzoneClient();
   }
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5df9a1d2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/TestOzoneVolumes.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/TestOzoneVolumes.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/TestOzoneVolumes.java
index 56db6fb..c339279 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/TestOzoneVolumes.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/TestOzoneVolumes.java
@@ -82,7 +82,7 @@ public class TestOzoneVolumes {
     Logger.getLogger("log4j.logger.org.apache.http").setLevel(Level.DEBUG);
 
     cluster = new MiniOzoneCluster.Builder(conf)
-        .setHandlerType("local").build();
+        .setHandlerType(OzoneConsts.OZONE_HANDLER_LOCAL).build();
     DataNode dataNode = cluster.getDataNodes().get(0);
     port = dataNode.getInfoPort();
   }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5df9a1d2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/TestOzoneWebAccess.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/TestOzoneWebAccess.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/TestOzoneWebAccess.java
index ac5b3e4..b734c86 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/TestOzoneWebAccess.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/TestOzoneWebAccess.java
@@ -74,7 +74,7 @@ public class TestOzoneWebAccess {
     conf.set(OzoneConfigKeys.OZONE_LOCALSTORAGE_ROOT, path);
 
     cluster = new MiniOzoneCluster.Builder(conf)
-        .setHandlerType("local").build();
+        .setHandlerType(OzoneConsts.OZONE_HANDLER_LOCAL).build();
     DataNode dataNode = cluster.getDataNodes().get(0);
     port = dataNode.getInfoPort();
   }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5df9a1d2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/client/TestBuckets.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/client/TestBuckets.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/client/TestBuckets.java
index 21d28cd..c115052 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/client/TestBuckets.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/client/TestBuckets.java
@@ -22,6 +22,7 @@ import org.apache.hadoop.hdfs.server.datanode.DataNode;
 import org.apache.hadoop.ozone.MiniOzoneCluster;
 import org.apache.hadoop.ozone.OzoneConfigKeys;
 import org.apache.hadoop.ozone.OzoneConfiguration;
+import org.apache.hadoop.ozone.OzoneConsts;
 import org.apache.hadoop.ozone.web.exceptions.OzoneException;
 import org.apache.hadoop.ozone.web.request.OzoneQuota;
 import org.apache.hadoop.ozone.web.utils.OzoneUtils;
@@ -71,7 +72,7 @@ public class TestBuckets {
 
     conf.set(OzoneConfigKeys.OZONE_LOCALSTORAGE_ROOT, path);
     cluster = new MiniOzoneCluster.Builder(conf)
-        .setHandlerType("local").build();
+        .setHandlerType(OzoneConsts.OZONE_HANDLER_LOCAL).build();
     DataNode dataNode = cluster.getDataNodes().get(0);
     final int port = dataNode.getInfoPort();
     client = new OzoneClient(String.format("http://localhost:%d", port));

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5df9a1d2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/client/TestKeys.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/client/TestKeys.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/client/TestKeys.java
index c753a29..cd61cb8 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/client/TestKeys.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/client/TestKeys.java
@@ -23,6 +23,7 @@ import org.apache.hadoop.hdfs.server.datanode.DataNode;
 import org.apache.hadoop.ozone.MiniOzoneCluster;
 import org.apache.hadoop.ozone.OzoneConfigKeys;
 import org.apache.hadoop.ozone.OzoneConfiguration;
+import org.apache.hadoop.ozone.OzoneConsts;
 import org.apache.hadoop.ozone.web.exceptions.ErrorTable;
 import org.apache.hadoop.ozone.web.exceptions.OzoneException;
 import org.apache.hadoop.ozone.web.utils.OzoneUtils;
@@ -81,7 +82,7 @@ public class TestKeys {
     Logger.getLogger("log4j.logger.org.apache.http").setLevel(Level.DEBUG);
 
     cluster = new MiniOzoneCluster.Builder(conf)
-        .setHandlerType("local").build();
+        .setHandlerType(OzoneConsts.OZONE_HANDLER_LOCAL).build();
     DataNode dataNode = cluster.getDataNodes().get(0);
     final int port = dataNode.getInfoPort();
     client = new OzoneClient(String.format("http://localhost:%d", port));

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5df9a1d2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/client/TestVolume.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/client/TestVolume.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/client/TestVolume.java
index 92031d3..79dc693 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/client/TestVolume.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/web/client/TestVolume.java
@@ -73,7 +73,7 @@ public class TestVolume {
     Logger.getLogger("log4j.logger.org.apache.http").setLevel(Level.DEBUG);
 
     cluster = new MiniOzoneCluster.Builder(conf)
-        .setHandlerType("local").build();
+        .setHandlerType(OzoneConsts.OZONE_HANDLER_LOCAL).build();
     DataNode dataNode = cluster.getDataNodes().get(0);
     final int port = dataNode.getInfoPort();
 


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message