From 4f37ff76165c11069f6c9c58b916e57a275bc00c Mon Sep 17 00:00:00 2001 From: Anu Engineer Date: Mon, 2 Apr 2018 20:43:31 -0700 Subject: [PATCH] HDFS-13341. Ozone: Move ozone specific ServiceRuntimeInfo utility to the framework. Contributed by Elek, Marton. --- .../apache/hadoop/cblock/CBlockManager.java | 2 +- .../hadoop/ozone/scm/HdslServerUtil.java | 2 +- hadoop-hdsl/framework/README.md | 24 +++++++++++++++++++ .../server/BaseHttpServer.java} | 10 ++++---- .../web/util => hdsl/server}/ServerUtils.java | 2 +- .../hdsl/server}/ServiceRuntimeInfo.java | 2 +- .../hdsl/server}/ServiceRuntimeInfoImpl.java | 2 +- .../web => hdsl/server}/package-info.java | 4 ++-- .../hadoop/ozone/web/util/package-info.java | 23 ------------------ .../hdsl/server/TestBaseHttpServer.java | 17 ++++++------- .../apache/hadoop/ozone/scm/SCMMXBean.java | 2 +- .../apache/hadoop/ozone/scm/SCMStorage.java | 2 +- .../ozone/scm/StorageContainerManager.java | 4 ++-- .../StorageContainerManagerHttpServer.java | 4 ++-- .../ozone/scm/block/BlockManagerImpl.java | 2 +- .../ozone/scm/block/DeletedBlockLogImpl.java | 2 +- .../ozone/scm/container/ContainerMapping.java | 2 +- .../ozone/scm/node/SCMNodePoolManager.java | 2 +- .../hadoop/ozone/web/client/OzoneBucket.java | 2 +- .../ozone/web/client/OzoneRestClient.java | 2 +- .../hadoop/ozone/web/client/OzoneVolume.java | 2 +- .../apache/hadoop/ozone/ksm/KSMMXBean.java | 2 +- .../ozone/ksm/KSMMetadataManagerImpl.java | 2 +- .../apache/hadoop/ozone/ksm/KSMStorage.java | 2 +- .../hadoop/ozone/ksm/KeySpaceManager.java | 4 ++-- .../ozone/ksm/KeySpaceManagerHttpServer.java | 4 ++-- 26 files changed, 65 insertions(+), 63 deletions(-) create mode 100644 hadoop-hdsl/framework/README.md rename hadoop-hdsl/framework/src/main/java/org/apache/hadoop/{ozone/web/OzoneHttpServer.java => hdsl/server/BaseHttpServer.java} (96%) rename hadoop-hdsl/framework/src/main/java/org/apache/hadoop/{ozone/web/util => hdsl/server}/ServerUtils.java (99%) rename {hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/jmx => hadoop-hdsl/framework/src/main/java/org/apache/hadoop/hdsl/server}/ServiceRuntimeInfo.java (98%) rename {hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/jmx => hadoop-hdsl/framework/src/main/java/org/apache/hadoop/hdsl/server}/ServiceRuntimeInfoImpl.java (97%) rename hadoop-hdsl/framework/src/main/java/org/apache/hadoop/{ozone/web => hdsl/server}/package-info.java (87%) delete mode 100644 hadoop-hdsl/framework/src/main/java/org/apache/hadoop/ozone/web/util/package-info.java rename hadoop-ozone/common/src/test/java/org/apache/hadoop/ozone/web/TestOzoneHttpServer.java => hadoop-hdsl/framework/src/test/java/org/apache/hadoop/hdsl/server/TestBaseHttpServer.java (84%) 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 788d01e27b..12b505a90c 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 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 11e6d56ca5..21123eba96 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.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 0000000000..1f4d217556 --- /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 27ca3ecc00..f9c3991886 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 @@ /** * 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 OzoneHttpServer(Configuration conf, String name) throws IOException { } /** - * 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 016d0f5048..f315ecb11e 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 085872b8d6..f9c57ea72d 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 5061494d64..92f00b1c5b 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 cb0de5ee7a..b38215ccbf 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 a28a6d4336..0000000000 --- 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 e4c95a509f..fcd5f7fbf7 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 @@ protected String getEnabledKey() { 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 336ed4454b..3b31d9f70c 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 @@ 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 b38741d70b..4a6d4c06a2 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 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 88391e24dd..cef8808ee5 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.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 @@ .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 62c871c65b..0dcf364f3d 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 @@ /** * 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 e368f73c1a..36f73cc615 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.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 fe3bbced65..77c59b04c4 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.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 112e58e70c..364bf7d93a 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.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 a8b9c35b96..f9b193fe09 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.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 a5dee9d9c4..1d5edd2d28 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.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 f88dfe0a76..8ee363c4f2 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.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 ac853d2e33..14488a37c1 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.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 42331f6e70..2e1fbd37c9 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 21e02a2ca4..f241de6769 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 @@ .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 6e48952e73..d444e5c38d 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.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 ef61005168..2c00beca72 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.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.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 b229c895c7..3cf43608f3 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 @@ 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 {