diff --git a/hadoop-cblock/server/src/main/java/org/apache/hadoop/cblock/CBlockManager.java b/hadoop-cblock/server/src/main/java/org/apache/hadoop/cblock/CBlockManager.java index 788d01e27ba..12b505a90c5 100644 --- a/hadoop-cblock/server/src/main/java/org/apache/hadoop/cblock/CBlockManager.java +++ b/hadoop-cblock/server/src/main/java/org/apache/hadoop/cblock/CBlockManager.java @@ -54,7 +54,7 @@ import org.apache.hadoop.utils.LevelDBStore; import static org.apache.hadoop.cblock.CblockUtils.getCblockServerRpcAddr; import static org.apache.hadoop.cblock.CblockUtils.getCblockServiceRpcAddr; -import static org.apache.hadoop.ozone.web.util.ServerUtils +import static org.apache.hadoop.hdsl.server.ServerUtils .updateRPCListenAddress; import org.iq80.leveldb.DBIterator; import org.slf4j.Logger; diff --git a/hadoop-hdsl/container-service/src/main/java/org/apache/hadoop/ozone/scm/HdslServerUtil.java b/hadoop-hdsl/container-service/src/main/java/org/apache/hadoop/ozone/scm/HdslServerUtil.java index 11e6d56ca56..21123eba96c 100644 --- a/hadoop-hdsl/container-service/src/main/java/org/apache/hadoop/ozone/scm/HdslServerUtil.java +++ b/hadoop-hdsl/container-service/src/main/java/org/apache/hadoop/ozone/scm/HdslServerUtil.java @@ -31,7 +31,7 @@ import java.util.Map; import java.util.concurrent.TimeUnit; import static org.apache.hadoop.hdsl.HdslUtils.*; -import static org.apache.hadoop.ozone.web.util.ServerUtils.sanitizeUserArgs; +import static org.apache.hadoop.hdsl.server.ServerUtils.sanitizeUserArgs; import static org.apache.hadoop.scm.ScmConfigKeys.*; /** diff --git a/hadoop-hdsl/framework/README.md b/hadoop-hdsl/framework/README.md new file mode 100644 index 00000000000..1f4d217556f --- /dev/null +++ b/hadoop-hdsl/framework/README.md @@ -0,0 +1,24 @@ + + +# Server framework for HDSL/Ozone + +This project contains generic utilities and resources for all the HDSL/Ozone +server-side components. + +The project is shared between the server/service projects but not with the +client packages. \ No newline at end of file diff --git a/hadoop-hdsl/framework/src/main/java/org/apache/hadoop/ozone/web/OzoneHttpServer.java b/hadoop-hdsl/framework/src/main/java/org/apache/hadoop/hdsl/server/BaseHttpServer.java similarity index 96% rename from hadoop-hdsl/framework/src/main/java/org/apache/hadoop/ozone/web/OzoneHttpServer.java rename to hadoop-hdsl/framework/src/main/java/org/apache/hadoop/hdsl/server/BaseHttpServer.java index 27ca3ecc006..f9c3991886a 100644 --- a/hadoop-hdsl/framework/src/main/java/org/apache/hadoop/ozone/web/OzoneHttpServer.java +++ b/hadoop-hdsl/framework/src/main/java/org/apache/hadoop/hdsl/server/BaseHttpServer.java @@ -15,7 +15,7 @@ * the License. */ -package org.apache.hadoop.ozone.web; +package org.apache.hadoop.hdsl.server; import com.google.common.base.Optional; import org.apache.hadoop.conf.Configuration; @@ -38,10 +38,10 @@ import static org.apache.hadoop.hdsl.HdslUtils.getPortNumberFromConfigKeys; /** * Base class for HTTP server of the Ozone related components. */ -public abstract class OzoneHttpServer { +public abstract class BaseHttpServer { private static final Logger LOG = - LoggerFactory.getLogger(OzoneHttpServer.class); + LoggerFactory.getLogger(BaseHttpServer.class); private HttpServer2 httpServer; private final Configuration conf; @@ -53,7 +53,7 @@ public abstract class OzoneHttpServer { private String name; - public OzoneHttpServer(Configuration conf, String name) throws IOException { + public BaseHttpServer(Configuration conf, String name) throws IOException { this.name = name; this.conf = conf; if (isEnabled()) { @@ -85,7 +85,7 @@ public abstract class OzoneHttpServer { } /** - * Add a servlet to OzoneHttpServer. + * Add a servlet to BaseHttpServer. * @param servletName The name of the servlet * @param pathSpec The path spec for the servlet * @param clazz The servlet class diff --git a/hadoop-hdsl/framework/src/main/java/org/apache/hadoop/ozone/web/util/ServerUtils.java b/hadoop-hdsl/framework/src/main/java/org/apache/hadoop/hdsl/server/ServerUtils.java similarity index 99% rename from hadoop-hdsl/framework/src/main/java/org/apache/hadoop/ozone/web/util/ServerUtils.java rename to hadoop-hdsl/framework/src/main/java/org/apache/hadoop/hdsl/server/ServerUtils.java index 016d0f5048e..f315ecb11e9 100644 --- a/hadoop-hdsl/framework/src/main/java/org/apache/hadoop/ozone/web/util/ServerUtils.java +++ b/hadoop-hdsl/framework/src/main/java/org/apache/hadoop/hdsl/server/ServerUtils.java @@ -15,7 +15,7 @@ * the License. */ -package org.apache.hadoop.ozone.web.util; +package org.apache.hadoop.hdsl.server; import java.io.File; import java.net.InetSocketAddress; diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/jmx/ServiceRuntimeInfo.java b/hadoop-hdsl/framework/src/main/java/org/apache/hadoop/hdsl/server/ServiceRuntimeInfo.java similarity index 98% rename from hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/jmx/ServiceRuntimeInfo.java rename to hadoop-hdsl/framework/src/main/java/org/apache/hadoop/hdsl/server/ServiceRuntimeInfo.java index 085872b8d60..f9c57ea72db 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/jmx/ServiceRuntimeInfo.java +++ b/hadoop-hdsl/framework/src/main/java/org/apache/hadoop/hdsl/server/ServiceRuntimeInfo.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.hadoop.jmx; +package org.apache.hadoop.hdsl.server; /** * Common runtime information for any service components. diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/jmx/ServiceRuntimeInfoImpl.java b/hadoop-hdsl/framework/src/main/java/org/apache/hadoop/hdsl/server/ServiceRuntimeInfoImpl.java similarity index 97% rename from hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/jmx/ServiceRuntimeInfoImpl.java rename to hadoop-hdsl/framework/src/main/java/org/apache/hadoop/hdsl/server/ServiceRuntimeInfoImpl.java index 5061494d649..92f00b1c5b6 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/jmx/ServiceRuntimeInfoImpl.java +++ b/hadoop-hdsl/framework/src/main/java/org/apache/hadoop/hdsl/server/ServiceRuntimeInfoImpl.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.hadoop.jmx; +package org.apache.hadoop.hdsl.server; import org.apache.hadoop.util.VersionInfo; diff --git a/hadoop-hdsl/framework/src/main/java/org/apache/hadoop/ozone/web/package-info.java b/hadoop-hdsl/framework/src/main/java/org/apache/hadoop/hdsl/server/package-info.java similarity index 87% rename from hadoop-hdsl/framework/src/main/java/org/apache/hadoop/ozone/web/package-info.java rename to hadoop-hdsl/framework/src/main/java/org/apache/hadoop/hdsl/server/package-info.java index cb0de5ee7af..b38215ccbfb 100644 --- a/hadoop-hdsl/framework/src/main/java/org/apache/hadoop/ozone/web/package-info.java +++ b/hadoop-hdsl/framework/src/main/java/org/apache/hadoop/hdsl/server/package-info.java @@ -16,8 +16,8 @@ * limitations under the License. */ -package org.apache.hadoop.ozone.web; +package org.apache.hadoop.hdsl.server; /** - * Classes related to the ozone web interface. + * Common server side utilities for all the hdsl/ozone server components. */ \ No newline at end of file diff --git a/hadoop-hdsl/framework/src/main/java/org/apache/hadoop/ozone/web/util/package-info.java b/hadoop-hdsl/framework/src/main/java/org/apache/hadoop/ozone/web/util/package-info.java deleted file mode 100644 index a28a6d43365..00000000000 --- a/hadoop-hdsl/framework/src/main/java/org/apache/hadoop/ozone/web/util/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.hadoop.ozone.web.util; - -/** - * Shared utilities for both Ozone/HDSL server side components. - */ \ No newline at end of file diff --git a/hadoop-ozone/common/src/test/java/org/apache/hadoop/ozone/web/TestOzoneHttpServer.java b/hadoop-hdsl/framework/src/test/java/org/apache/hadoop/hdsl/server/TestBaseHttpServer.java similarity index 84% rename from hadoop-ozone/common/src/test/java/org/apache/hadoop/ozone/web/TestOzoneHttpServer.java rename to hadoop-hdsl/framework/src/test/java/org/apache/hadoop/hdsl/server/TestBaseHttpServer.java index e4c95a509fb..fcd5f7fbf75 100644 --- a/hadoop-ozone/common/src/test/java/org/apache/hadoop/ozone/web/TestOzoneHttpServer.java +++ b/hadoop-hdsl/framework/src/test/java/org/apache/hadoop/hdsl/server/TestBaseHttpServer.java @@ -15,22 +15,23 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.hadoop.ozone.web; +package org.apache.hadoop.hdsl.server; + +import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hdsl.conf.OzoneConfiguration; import org.junit.Assert; import org.junit.Test; /** - * Test Common ozone web methods. + * Test Common ozone/hdsl web methods. */ -public class TestOzoneHttpServer { +public class TestBaseHttpServer { @Test public void getBindAddress() throws Exception { - OzoneConfiguration conf = new OzoneConfiguration(); + Configuration conf = new Configuration(); conf.set("enabled", "false"); - OzoneHttpServer ozoneHttpServer = new OzoneHttpServer(conf, "test") { + BaseHttpServer baseHttpServer = new BaseHttpServer(conf, "test") { @Override protected String getHttpAddressKey() { return null; @@ -84,13 +85,13 @@ public class TestOzoneHttpServer { conf.set("addresskey", "0.0.0.0:1234"); - Assert.assertEquals("/0.0.0.0:1234", ozoneHttpServer + Assert.assertEquals("/0.0.0.0:1234", baseHttpServer .getBindAddress("bindhostkey", "addresskey", "default", 65).toString()); conf.set("bindhostkey", "1.2.3.4"); - Assert.assertEquals("/1.2.3.4:1234", ozoneHttpServer + Assert.assertEquals("/1.2.3.4:1234", baseHttpServer .getBindAddress("bindhostkey", "addresskey", "default", 65).toString()); } diff --git a/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/SCMMXBean.java b/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/SCMMXBean.java index 336ed4454b4..3b31d9f70c4 100644 --- a/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/SCMMXBean.java +++ b/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/SCMMXBean.java @@ -21,7 +21,7 @@ package org.apache.hadoop.ozone.scm; import java.util.Map; import org.apache.hadoop.classification.InterfaceAudience; -import org.apache.hadoop.jmx.ServiceRuntimeInfo; +import org.apache.hadoop.hdsl.server.ServiceRuntimeInfo; /** * diff --git a/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/SCMStorage.java b/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/SCMStorage.java index b38741d70bb..4a6d4c06a26 100644 --- a/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/SCMStorage.java +++ b/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/SCMStorage.java @@ -27,7 +27,7 @@ import org.apache.hadoop.hdsl.protocol.proto.HdslProtos.NodeType; import static org.apache.hadoop.ozone.OzoneConsts.SCM_ID; import static org.apache.hadoop.ozone.OzoneConsts.STORAGE_DIR; -import static org.apache.hadoop.ozone.web.util.ServerUtils.getOzoneMetaDirPath; +import static org.apache.hadoop.hdsl.server.ServerUtils.getOzoneMetaDirPath; /** * SCMStorage is responsible for management of the StorageDirectories used by diff --git a/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/StorageContainerManager.java b/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/StorageContainerManager.java index 88391e24dd0..cef8808ee52 100644 --- a/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/StorageContainerManager.java +++ b/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/StorageContainerManager.java @@ -33,7 +33,7 @@ import org.apache.hadoop.hdsl.protocol.DatanodeDetails; import org.apache.hadoop.io.IOUtils; import org.apache.hadoop.ipc.ProtobufRpcEngine; import org.apache.hadoop.ipc.RPC; -import org.apache.hadoop.jmx.ServiceRuntimeInfoImpl; +import org.apache.hadoop.hdsl.server.ServiceRuntimeInfoImpl; import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem; import org.apache.hadoop.metrics2.util.MBeans; import org.apache.hadoop.ozone.OzoneConfigKeys; @@ -103,7 +103,7 @@ import static org.apache.hadoop.ozone.scm.HdslServerUtil .getScmClientBindAddress; import static org.apache.hadoop.ozone.scm.HdslServerUtil .getScmDataNodeBindAddress; -import static org.apache.hadoop.ozone.web.util.ServerUtils +import static org.apache.hadoop.hdsl.server.ServerUtils .updateRPCListenAddress; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/StorageContainerManagerHttpServer.java b/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/StorageContainerManagerHttpServer.java index 62c871c65b5..0dcf364f3d2 100644 --- a/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/StorageContainerManagerHttpServer.java +++ b/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/StorageContainerManagerHttpServer.java @@ -18,8 +18,8 @@ package org.apache.hadoop.ozone.scm; import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hdsl.server.BaseHttpServer; import org.apache.hadoop.ozone.OzoneConfigKeys; -import org.apache.hadoop.ozone.web.OzoneHttpServer; import org.apache.hadoop.scm.ScmConfigKeys; import java.io.IOException; @@ -27,7 +27,7 @@ import java.io.IOException; /** * HttpServer2 wrapper for the Ozone Storage Container Manager. */ -public class StorageContainerManagerHttpServer extends OzoneHttpServer { +public class StorageContainerManagerHttpServer extends BaseHttpServer { public StorageContainerManagerHttpServer(Configuration conf) throws IOException { diff --git a/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/block/BlockManagerImpl.java b/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/block/BlockManagerImpl.java index e368f73c1aa..36f73cc6154 100644 --- a/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/block/BlockManagerImpl.java +++ b/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/block/BlockManagerImpl.java @@ -36,7 +36,7 @@ import org.apache.hadoop.utils.BatchOperation; import org.apache.hadoop.utils.MetadataStore; import org.apache.hadoop.utils.MetadataStoreBuilder; -import static org.apache.hadoop.ozone.web.util.ServerUtils.getOzoneMetaDirPath; +import static org.apache.hadoop.hdsl.server.ServerUtils.getOzoneMetaDirPath; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/block/DeletedBlockLogImpl.java b/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/block/DeletedBlockLogImpl.java index fe3bbced652..77c59b04c4c 100644 --- a/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/block/DeletedBlockLogImpl.java +++ b/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/block/DeletedBlockLogImpl.java @@ -29,7 +29,7 @@ import org.apache.hadoop.utils.MetadataKeyFilters.MetadataKeyFilter; import org.apache.hadoop.utils.MetadataStore; import org.apache.hadoop.utils.MetadataStoreBuilder; -import static org.apache.hadoop.ozone.web.util.ServerUtils.getOzoneMetaDirPath; +import static org.apache.hadoop.hdsl.server.ServerUtils.getOzoneMetaDirPath; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/container/ContainerMapping.java b/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/container/ContainerMapping.java index 112e58e70c2..364bf7d93a7 100644 --- a/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/container/ContainerMapping.java +++ b/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/container/ContainerMapping.java @@ -43,7 +43,7 @@ import org.apache.hadoop.utils.MetadataKeyFilters.MetadataKeyFilter; import org.apache.hadoop.utils.MetadataStore; import org.apache.hadoop.utils.MetadataStoreBuilder; -import static org.apache.hadoop.ozone.web.util.ServerUtils.getOzoneMetaDirPath; +import static org.apache.hadoop.hdsl.server.ServerUtils.getOzoneMetaDirPath; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/node/SCMNodePoolManager.java b/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/node/SCMNodePoolManager.java index a8b9c35b96b..f9b193fe094 100644 --- a/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/node/SCMNodePoolManager.java +++ b/hadoop-hdsl/server-scm/src/main/java/org/apache/hadoop/ozone/scm/node/SCMNodePoolManager.java @@ -28,7 +28,7 @@ import org.apache.hadoop.ozone.scm.exceptions.SCMException; import org.apache.hadoop.utils.MetadataStore; import org.apache.hadoop.utils.MetadataStoreBuilder; -import static org.apache.hadoop.ozone.web.util.ServerUtils.getOzoneMetaDirPath; +import static org.apache.hadoop.hdsl.server.ServerUtils.getOzoneMetaDirPath; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/web/client/OzoneBucket.java b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/web/client/OzoneBucket.java index a5dee9d9c45..1d5edd2d28a 100644 --- a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/web/client/OzoneBucket.java +++ b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/web/client/OzoneBucket.java @@ -30,7 +30,7 @@ import org.apache.hadoop.ozone.web.response.BucketInfo; import org.apache.hadoop.ozone.web.response.KeyInfo; import org.apache.hadoop.ozone.web.response.ListKeys; -import static org.apache.hadoop.ozone.web.util.ServerUtils.releaseConnection; +import static org.apache.hadoop.hdsl.server.ServerUtils.releaseConnection; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpDelete; diff --git a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/web/client/OzoneRestClient.java b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/web/client/OzoneRestClient.java index f88dfe0a76b..8ee363c4f2e 100644 --- a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/web/client/OzoneRestClient.java +++ b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/web/client/OzoneRestClient.java @@ -31,7 +31,7 @@ import org.apache.hadoop.ozone.web.response.VolumeInfo; import org.apache.hadoop.ozone.web.utils.OzoneUtils; import org.apache.hadoop.util.Time; -import static org.apache.hadoop.ozone.web.util.ServerUtils.releaseConnection; +import static org.apache.hadoop.hdsl.server.ServerUtils.releaseConnection; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpDelete; diff --git a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/web/client/OzoneVolume.java b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/web/client/OzoneVolume.java index ac853d2e33a..14488a37c1f 100644 --- a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/web/client/OzoneVolume.java +++ b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/web/client/OzoneVolume.java @@ -31,7 +31,7 @@ import org.apache.hadoop.ozone.web.response.VolumeInfo; import org.apache.hadoop.ozone.OzoneConsts; import org.apache.hadoop.ozone.web.utils.OzoneUtils; -import static org.apache.hadoop.ozone.web.util.ServerUtils.releaseConnection; +import static org.apache.hadoop.hdsl.server.ServerUtils.releaseConnection; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpDelete; diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KSMMXBean.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KSMMXBean.java index 42331f6e705..2e1fbd37c96 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KSMMXBean.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KSMMXBean.java @@ -19,7 +19,7 @@ package org.apache.hadoop.ozone.ksm; import org.apache.hadoop.classification.InterfaceAudience; -import org.apache.hadoop.jmx.ServiceRuntimeInfo; +import org.apache.hadoop.hdsl.server.ServiceRuntimeInfo; /** * This is the JMX management interface for ksm information. diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KSMMetadataManagerImpl.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KSMMetadataManagerImpl.java index 21e02a2ca4e..f241de67697 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KSMMetadataManagerImpl.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KSMMetadataManagerImpl.java @@ -65,7 +65,7 @@ import static org.apache.hadoop.ozone.ksm.KSMConfigKeys .OZONE_KSM_DB_CACHE_SIZE_DEFAULT; import static org.apache.hadoop.ozone.ksm.KSMConfigKeys .OZONE_KSM_DB_CACHE_SIZE_MB; -import static org.apache.hadoop.ozone.web.util.ServerUtils.getOzoneMetaDirPath; +import static org.apache.hadoop.hdsl.server.ServerUtils.getOzoneMetaDirPath; /** * KSM metadata manager interface. diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KSMStorage.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KSMStorage.java index 6e48952e73d..d444e5c38d1 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KSMStorage.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KSMStorage.java @@ -26,7 +26,7 @@ import org.apache.hadoop.ozone.common.Storage; import org.apache.hadoop.hdsl.protocol.proto.HdslProtos.NodeType; import static org.apache.hadoop.ozone.OzoneConsts.SCM_ID; -import static org.apache.hadoop.ozone.web.util.ServerUtils.getOzoneMetaDirPath; +import static org.apache.hadoop.hdsl.server.ServerUtils.getOzoneMetaDirPath; /** * KSMStorage is responsible for management of the StorageDirectories used by diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KeySpaceManager.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KeySpaceManager.java index ef61005168e..2c00beca72a 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KeySpaceManager.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KeySpaceManager.java @@ -25,7 +25,7 @@ import org.apache.hadoop.hdfs.DFSUtil; import org.apache.hadoop.ipc.Client; import org.apache.hadoop.ipc.ProtobufRpcEngine; import org.apache.hadoop.ipc.RPC; -import org.apache.hadoop.jmx.ServiceRuntimeInfoImpl; +import org.apache.hadoop.hdsl.server.ServiceRuntimeInfoImpl; import org.apache.hadoop.ozone.common.Storage.StorageState; import org.apache.hadoop.ozone.ksm.exceptions.KSMException; import org.apache.hadoop.ozone.ksm.helpers.KsmBucketArgs; @@ -67,7 +67,7 @@ import static org.apache.hadoop.hdsl.HdslUtils.getScmAddressForBlockClients; import static org.apache.hadoop.hdsl.HdslUtils.getScmAddressForClients; import static org.apache.hadoop.hdsl.HdslUtils.isHdslEnabled; import static org.apache.hadoop.ozone.KsmUtils.getKsmAddress; -import static org.apache.hadoop.ozone.web.util.ServerUtils +import static org.apache.hadoop.hdsl.server.ServerUtils .updateRPCListenAddress; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KeySpaceManagerHttpServer.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KeySpaceManagerHttpServer.java index b229c895c75..3cf43608f3e 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KeySpaceManagerHttpServer.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KeySpaceManagerHttpServer.java @@ -20,14 +20,14 @@ package org.apache.hadoop.ozone.ksm; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.ozone.OzoneConfigKeys; import org.apache.hadoop.ozone.OzoneConsts; -import org.apache.hadoop.ozone.web.OzoneHttpServer; +import org.apache.hadoop.hdsl.server.BaseHttpServer; import java.io.IOException; /** * HttpServer wrapper for the KeySpaceManager. */ -public class KeySpaceManagerHttpServer extends OzoneHttpServer { +public class KeySpaceManagerHttpServer extends BaseHttpServer { public KeySpaceManagerHttpServer(Configuration conf, KeySpaceManager ksm) throws IOException {