From 28fb4b527afec93926127a93e4b94a157c0f64f1 Mon Sep 17 00:00:00 2001 From: avijayanhwx <14299376+avijayanhwx@users.noreply.github.com> Date: Thu, 22 Aug 2019 10:57:22 -0700 Subject: [PATCH] HDDS-2008 : Wrong package for RatisHelper class in hadoop-hdds/common module. (#1333) --- .../java/org/apache/hadoop/hdds/scm/XceiverClientRatis.java | 2 +- .../java/org/apache/{ => hadoop/hdds}/ratis/RatisHelper.java | 3 ++- .../java/org/apache/{ => hadoop/hdds}/ratis/package-info.java | 2 +- .../common/transport/server/ratis/XceiverServerRatis.java | 2 +- .../commandhandler/TestCloseContainerCommandHandler.java | 2 +- .../hadoop/hdds/scm/pipeline/RatisPipelineProvider.java | 2 +- .../apache/hadoop/hdds/scm/pipeline/RatisPipelineUtils.java | 2 +- .../test/java/org/apache/hadoop/ozone/RatisTestHelper.java | 4 ++-- 8 files changed, 10 insertions(+), 9 deletions(-) rename hadoop-hdds/common/src/main/java/org/apache/{ => hadoop/hdds}/ratis/RatisHelper.java (99%) rename hadoop-hdds/common/src/main/java/org/apache/{ => hadoop/hdds}/ratis/package-info.java (95%) diff --git a/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientRatis.java b/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientRatis.java index 98cba0b1039..e2f0299ce3c 100644 --- a/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientRatis.java +++ b/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientRatis.java @@ -45,7 +45,7 @@ import org.apache.hadoop.hdds.scm.pipeline.Pipeline; import org.apache.hadoop.hdds.security.x509.SecurityConfig; import org.apache.hadoop.hdds.tracing.TracingUtil; import org.apache.hadoop.util.Time; -import org.apache.ratis.RatisHelper; +import org.apache.hadoop.hdds.ratis.RatisHelper; import org.apache.ratis.client.RaftClient; import org.apache.ratis.grpc.GrpcTlsConfig; import org.apache.ratis.proto.RaftProtos; diff --git a/hadoop-hdds/common/src/main/java/org/apache/ratis/RatisHelper.java b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/ratis/RatisHelper.java similarity index 99% rename from hadoop-hdds/common/src/main/java/org/apache/ratis/RatisHelper.java rename to hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/ratis/RatisHelper.java index 557815b815a..318a94b63f3 100644 --- a/hadoop-hdds/common/src/main/java/org/apache/ratis/RatisHelper.java +++ b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/ratis/RatisHelper.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package org.apache.ratis; +package org.apache.hadoop.hdds.ratis; import java.io.IOException; import java.util.ArrayList; @@ -35,6 +35,7 @@ import org.apache.hadoop.hdds.security.x509.SecurityConfig; import org.apache.hadoop.ozone.OzoneConfigKeys; import org.apache.hadoop.ozone.OzoneConsts; +import org.apache.ratis.RaftConfigKeys; import org.apache.ratis.client.RaftClient; import org.apache.ratis.client.RaftClientConfigKeys; import org.apache.ratis.conf.RaftProperties; diff --git a/hadoop-hdds/common/src/main/java/org/apache/ratis/package-info.java b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/ratis/package-info.java similarity index 95% rename from hadoop-hdds/common/src/main/java/org/apache/ratis/package-info.java rename to hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/ratis/package-info.java index c13c20c6060..e52dc7ffc70 100644 --- a/hadoop-hdds/common/src/main/java/org/apache/ratis/package-info.java +++ b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/ratis/package-info.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.ratis; +package org.apache.hadoop.hdds.ratis; /** * This package contains classes related to Apache Ratis. diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/XceiverServerRatis.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/XceiverServerRatis.java index 4cb4cbbd379..b4021cf657b 100644 --- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/XceiverServerRatis.java +++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/XceiverServerRatis.java @@ -44,7 +44,7 @@ import org.apache.hadoop.ozone.container.common.transport.server.XceiverServer; import io.opentracing.Scope; import org.apache.ratis.RaftConfigKeys; -import org.apache.ratis.RatisHelper; +import org.apache.hadoop.hdds.ratis.RatisHelper; import org.apache.ratis.conf.RaftProperties; import org.apache.ratis.grpc.GrpcConfigKeys; import org.apache.ratis.grpc.GrpcFactory; diff --git a/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/TestCloseContainerCommandHandler.java b/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/TestCloseContainerCommandHandler.java index f80247089b2..219b504a9af 100644 --- a/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/TestCloseContainerCommandHandler.java +++ b/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/TestCloseContainerCommandHandler.java @@ -33,7 +33,7 @@ import org.apache.hadoop.ozone.container.common.statemachine.StateContext; import org.apache.hadoop.ozone.container.ozoneimpl.OzoneContainer; import org.apache.hadoop.ozone.protocol.commands.CloseContainerCommand; import org.apache.hadoop.test.GenericTestUtils; -import org.apache.ratis.RatisHelper; +import org.apache.hadoop.hdds.ratis.RatisHelper; import org.apache.ratis.client.RaftClient; import org.apache.ratis.protocol.RaftGroup; import org.apache.ratis.protocol.RaftGroupId; diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/RatisPipelineProvider.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/RatisPipelineProvider.java index d3b02e6253a..14fde0785a4 100644 --- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/RatisPipelineProvider.java +++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/RatisPipelineProvider.java @@ -31,7 +31,7 @@ import org.apache.hadoop.hdds.scm.node.NodeManager; import org.apache.hadoop.hdds.scm.pipeline.Pipeline.PipelineState; import org.apache.hadoop.hdds.security.x509.SecurityConfig; import org.apache.hadoop.io.MultipleIOException; -import org.apache.ratis.RatisHelper; +import org.apache.hadoop.hdds.ratis.RatisHelper; import org.apache.ratis.client.RaftClient; import org.apache.ratis.grpc.GrpcTlsConfig; import org.apache.ratis.protocol.RaftClientReply; diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/RatisPipelineUtils.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/RatisPipelineUtils.java index 85e4c371851..d9aec34b8bd 100644 --- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/RatisPipelineUtils.java +++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/RatisPipelineUtils.java @@ -24,7 +24,7 @@ import org.apache.hadoop.hdds.protocol.DatanodeDetails; import org.apache.hadoop.hdds.scm.ScmConfigKeys; import org.apache.hadoop.hdds.scm.client.HddsClientUtils; import org.apache.hadoop.hdds.security.x509.SecurityConfig; -import org.apache.ratis.RatisHelper; +import org.apache.hadoop.hdds.ratis.RatisHelper; import org.apache.ratis.client.RaftClient; import org.apache.ratis.grpc.GrpcTlsConfig; import org.apache.ratis.protocol.RaftGroup; diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/RatisTestHelper.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/RatisTestHelper.java index da06c59d190..a1243e87f7b 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/RatisTestHelper.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/RatisTestHelper.java @@ -26,7 +26,7 @@ import org.apache.hadoop.ozone.client.protocol.ClientProtocol; import org.apache.hadoop.ozone.client.rpc.RpcClient; import org.apache.hadoop.hdds.protocol.DatanodeDetails; import org.apache.hadoop.ozone.client.rest.OzoneException; -import org.apache.ratis.RatisHelper; +import org.apache.hadoop.hdds.ratis.RatisHelper; import org.apache.ratis.client.RaftClient; import org.apache.ratis.protocol.RaftPeer; import org.apache.ratis.rpc.RpcType; @@ -43,7 +43,7 @@ import java.util.concurrent.TimeoutException; import static org.apache.hadoop.hdds.HddsConfigKeys.HDDS_CONTAINER_REPORT_INTERVAL; import static org.apache.hadoop.hdds.scm.ScmConfigKeys.OZONE_SCM_STALENODE_INTERVAL; -import static org.apache.ratis.RatisHelper.newRaftClient; +import static org.apache.hadoop.hdds.ratis.RatisHelper.newRaftClient; /** * Helpers for Ratis tests.