From 5f0b43fa93d02c90956d48eb5c6c0b60deeac91c Mon Sep 17 00:00:00 2001 From: Arpit Agarwal Date: Tue, 16 Oct 2018 10:40:00 -0700 Subject: [PATCH] HDDS-378. Remove dependencies between hdds/ozone and hdfs proto files. Contributed by Elek, Marton. --- hadoop-hdds/common/pom.xml | 6 -- .../main/proto/ScmBlockLocationProtocol.proto | 1 - .../StorageContainerLocationProtocol.proto | 1 - hadoop-hdds/container-service/pom.xml | 11 +--- .../hadoop/ozone/client/BucketArgs.java | 2 +- .../hadoop/ozone/client/OzoneBucket.java | 2 +- .../ozone/client/protocol/ClientProtocol.java | 2 +- .../hadoop/ozone/client/rest/RestClient.java | 2 +- .../hadoop/ozone/client/rpc/RpcClient.java | 2 +- hadoop-ozone/common/pom.xml | 6 -- .../hadoop/hdds/protocol/StorageType.java | 64 +++++++++++++++++++ .../client/rest/response/BucketInfo.java | 2 +- .../hadoop/ozone/om/helpers/OmBucketArgs.java | 7 +- .../hadoop/ozone/om/helpers/OmBucketInfo.java | 9 ++- .../hadoop/ozone/web/handlers/BucketArgs.java | 2 +- .../hadoop/ozone/web/response/BucketInfo.java | 2 +- .../src/main/proto/OzoneManagerProtocol.proto | 12 +++- .../hadoop/ozone/web/TestBucketInfo.java | 2 +- .../TestStorageContainerManagerHelper.java | 2 +- .../client/rest/TestOzoneRestClient.java | 2 +- .../ozone/client/rpc/TestOzoneRpcClient.java | 2 +- .../om/TestMultipleContainerReadWrite.java | 2 +- .../ozone/om/TestOmBlockVersioning.java | 2 +- .../hadoop/ozone/om/TestOzoneManager.java | 2 +- .../web/handlers/BucketProcessTemplate.java | 2 +- .../hadoop/ozone/om/BucketManagerImpl.java | 2 +- .../hadoop/ozone/om/S3BucketManagerImpl.java | 2 +- .../ozone/om/TestBucketManagerImpl.java | 2 +- .../hadoop/ozone/client/OzoneBucketStub.java | 2 +- .../hadoop/ozone/client/OzoneVolumeStub.java | 2 +- 30 files changed, 102 insertions(+), 57 deletions(-) create mode 100644 hadoop-ozone/common/src/main/java/org/apache/hadoop/hdds/protocol/StorageType.java diff --git a/hadoop-hdds/common/pom.xml b/hadoop-hdds/common/pom.xml index bf2a6b9954..65cd1d1c6a 100644 --- a/hadoop-hdds/common/pom.xml +++ b/hadoop-hdds/common/pom.xml @@ -218,12 +218,6 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> ${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto - - ${basedir}/../../hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/ - - - ${basedir}/../../hadoop-hdfs-project/hadoop-hdfs/src/main/proto/ - ${basedir}/src/main/proto diff --git a/hadoop-hdds/common/src/main/proto/ScmBlockLocationProtocol.proto b/hadoop-hdds/common/src/main/proto/ScmBlockLocationProtocol.proto index 9b4e0acaba..01a0ddea38 100644 --- a/hadoop-hdds/common/src/main/proto/ScmBlockLocationProtocol.proto +++ b/hadoop-hdds/common/src/main/proto/ScmBlockLocationProtocol.proto @@ -28,7 +28,6 @@ option java_generic_services = true; option java_generate_equals_and_hash = true; package hadoop.hdds; -import "hdfs.proto"; import "hdds.proto"; diff --git a/hadoop-hdds/common/src/main/proto/StorageContainerLocationProtocol.proto b/hadoop-hdds/common/src/main/proto/StorageContainerLocationProtocol.proto index fb01d6a0b1..49d1975278 100644 --- a/hadoop-hdds/common/src/main/proto/StorageContainerLocationProtocol.proto +++ b/hadoop-hdds/common/src/main/proto/StorageContainerLocationProtocol.proto @@ -28,7 +28,6 @@ option java_generic_services = true; option java_generate_equals_and_hash = true; package hadoop.hdds; -import "hdfs.proto"; import "hdds.proto"; /** diff --git a/hadoop-hdds/container-service/pom.xml b/hadoop-hdds/container-service/pom.xml index 0df5893c3b..cfbdc9f54f 100644 --- a/hadoop-hdds/container-service/pom.xml +++ b/hadoop-hdds/container-service/pom.xml @@ -73,15 +73,6 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> ${protobuf.version} ${protoc.path} - - ${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto - - - ${basedir}/../../hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/ - - - ${basedir}/../../hadoop-hdfs-project/hadoop-hdfs/src/main/proto/ - ${basedir}/../../hadoop-hdds/common/src/main/proto/ @@ -106,4 +97,4 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> - \ No newline at end of file + diff --git a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/BucketArgs.java b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/BucketArgs.java index 0da52dc033..d86062bc76 100644 --- a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/BucketArgs.java +++ b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/BucketArgs.java @@ -18,7 +18,7 @@ package org.apache.hadoop.ozone.client; -import org.apache.hadoop.fs.StorageType; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.ozone.OzoneAcl; import java.util.List; diff --git a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneBucket.java b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneBucket.java index 751992ed6d..8cc65eb924 100644 --- a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneBucket.java +++ b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneBucket.java @@ -21,7 +21,7 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.StorageType; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.hdds.client.ReplicationFactor; import org.apache.hadoop.hdds.client.ReplicationType; import org.apache.hadoop.hdds.scm.client.HddsClientUtils; diff --git a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/protocol/ClientProtocol.java b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/protocol/ClientProtocol.java index 2737a9c923..a3e49e9589 100644 --- a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/protocol/ClientProtocol.java +++ b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/protocol/ClientProtocol.java @@ -18,7 +18,7 @@ package org.apache.hadoop.ozone.client.protocol; -import org.apache.hadoop.fs.StorageType; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.ozone.OzoneAcl; import org.apache.hadoop.ozone.client.*; import org.apache.hadoop.hdds.client.OzoneQuota; diff --git a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rest/RestClient.java b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rest/RestClient.java index b6e2f09fbd..4293c0848c 100644 --- a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rest/RestClient.java +++ b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rest/RestClient.java @@ -23,7 +23,7 @@ import com.google.common.base.Preconditions; import com.google.common.base.Strings; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.StorageType; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.hdds.protocol.proto.HddsProtos; import org.apache.hadoop.hdds.scm.client.HddsClientUtils; import org.apache.hadoop.net.NetUtils; diff --git a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java index 734d2a6ca4..5efc086f6c 100644 --- a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java +++ b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java @@ -21,7 +21,7 @@ import com.google.common.base.Preconditions; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdds.conf.OzoneConfiguration; -import org.apache.hadoop.fs.StorageType; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.hdds.scm.client.HddsClientUtils; import org.apache.hadoop.io.IOUtils; import org.apache.hadoop.io.retry.RetryPolicy; diff --git a/hadoop-ozone/common/pom.xml b/hadoop-ozone/common/pom.xml index ea9b2da466..add22b41e6 100644 --- a/hadoop-ozone/common/pom.xml +++ b/hadoop-ozone/common/pom.xml @@ -82,12 +82,6 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> ${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto - - ${basedir}/../../hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/ - - - ${basedir}/../../hadoop-hdfs-project/hadoop-hdfs/src/main/proto/ - ${basedir}/../../hadoop-hdds/common/src/main/proto/ diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/hdds/protocol/StorageType.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/hdds/protocol/StorageType.java new file mode 100644 index 0000000000..8d5ca6d72e --- /dev/null +++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/hdds/protocol/StorageType.java @@ -0,0 +1,64 @@ +/** + * 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.hdds.protocol; + +import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.StorageTypeProto; + +/** + * Ozone specific storage types. + */ +public enum StorageType { + RAM_DISK, + SSD, + DISK, + ARCHIVE; + + public static final StorageType DEFAULT = DISK; + + public StorageTypeProto toProto() { + switch (this) { + case DISK: + return StorageTypeProto.DISK; + case SSD: + return StorageTypeProto.SSD; + case ARCHIVE: + return StorageTypeProto.ARCHIVE; + case RAM_DISK: + return StorageTypeProto.RAM_DISK; + default: + throw new IllegalStateException( + "BUG: StorageType not found, type=" + this); + } + } + + public static StorageType valueOf(StorageTypeProto type) { + switch (type) { + case DISK: + return DISK; + case SSD: + return SSD; + case ARCHIVE: + return ARCHIVE; + case RAM_DISK: + return RAM_DISK; + default: + throw new IllegalStateException( + "BUG: StorageTypeProto not found, type=" + type); + } + } +} diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/client/rest/response/BucketInfo.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/client/rest/response/BucketInfo.java index af89b39efb..d515dc215d 100644 --- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/client/rest/response/BucketInfo.java +++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/client/rest/response/BucketInfo.java @@ -21,7 +21,7 @@ import java.util.LinkedList; import java.util.List; -import org.apache.hadoop.fs.StorageType; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.ozone.OzoneAcl; import org.apache.hadoop.ozone.OzoneConsts; diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketArgs.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketArgs.java index 1bd258e742..381913112f 100644 --- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketArgs.java +++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketArgs.java @@ -23,7 +23,7 @@ import java.util.stream.Collectors; import com.google.common.base.Preconditions; -import org.apache.hadoop.fs.StorageType; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.hdfs.protocolPB.PBHelperClient; import org.apache.hadoop.ozone.OzoneAcl; import org.apache.hadoop.ozone.OzoneConsts; @@ -230,8 +230,7 @@ public BucketArgs getProtobuf() { builder.setIsVersionEnabled(isVersionEnabled); } if(storageType != null) { - builder.setStorageType( - PBHelperClient.convertStorageType(storageType)); + builder.setStorageType(storageType.toProto()); } return builder.build(); } @@ -250,7 +249,7 @@ public static OmBucketArgs getFromProtobuf(BucketArgs bucketArgs) { OMPBHelper::convertOzoneAcl).collect(Collectors.toList()), bucketArgs.hasIsVersionEnabled() ? bucketArgs.getIsVersionEnabled() : null, - bucketArgs.hasStorageType() ? PBHelperClient.convertStorageType( + bucketArgs.hasStorageType() ? StorageType.valueOf( bucketArgs.getStorageType()) : null); } } diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketInfo.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketInfo.java index 5199ce3b58..4418738151 100644 --- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketInfo.java +++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmBucketInfo.java @@ -18,7 +18,7 @@ package org.apache.hadoop.ozone.om.helpers; import com.google.common.base.Preconditions; -import org.apache.hadoop.fs.StorageType; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.hdfs.protocolPB.PBHelperClient; import org.apache.hadoop.ozone.OzoneAcl; import org.apache.hadoop.ozone.OzoneConsts; @@ -230,8 +230,7 @@ public BucketInfo getProtobuf() { .addAllAcls(acls.stream().map( OMPBHelper::convertOzoneAcl).collect(Collectors.toList())) .setIsVersionEnabled(isVersionEnabled) - .setStorageType(PBHelperClient.convertStorageType( - storageType)) + .setStorageType(storageType.toProto()) .setCreationTime(creationTime) .build(); } @@ -248,7 +247,7 @@ public static OmBucketInfo getFromProtobuf(BucketInfo bucketInfo) { bucketInfo.getAclsList().stream().map( OMPBHelper::convertOzoneAcl).collect(Collectors.toList()), bucketInfo.getIsVersionEnabled(), - PBHelperClient.convertStorageType( - bucketInfo.getStorageType()), bucketInfo.getCreationTime()); + StorageType.valueOf(bucketInfo.getStorageType()), + bucketInfo.getCreationTime()); } } diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/web/handlers/BucketArgs.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/web/handlers/BucketArgs.java index 0d5248d125..a1b787cf20 100644 --- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/web/handlers/BucketArgs.java +++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/web/handlers/BucketArgs.java @@ -17,7 +17,7 @@ */ package org.apache.hadoop.ozone.web.handlers; -import org.apache.hadoop.fs.StorageType; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.ozone.OzoneAcl; import org.apache.hadoop.ozone.OzoneConsts; diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/web/response/BucketInfo.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/web/response/BucketInfo.java index e66cd204df..cf2810f801 100644 --- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/web/response/BucketInfo.java +++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/web/response/BucketInfo.java @@ -21,7 +21,7 @@ import java.util.LinkedList; import java.util.List; -import org.apache.hadoop.fs.StorageType; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.ozone.OzoneConsts; import org.apache.hadoop.ozone.OzoneAcl; import org.apache.hadoop.ozone.web.utils.JsonUtils; diff --git a/hadoop-ozone/common/src/main/proto/OzoneManagerProtocol.proto b/hadoop-ozone/common/src/main/proto/OzoneManagerProtocol.proto index 19fb204fd2..d36caceb11 100644 --- a/hadoop-ozone/common/src/main/proto/OzoneManagerProtocol.proto +++ b/hadoop-ozone/common/src/main/proto/OzoneManagerProtocol.proto @@ -34,7 +34,6 @@ Ozone Manager. Ozone Manager manages the namespace for ozone. This is similar to Namenode for Ozone. */ -import "hdfs.proto"; import "hdds.proto"; enum Status { @@ -170,17 +169,24 @@ message BucketInfo { required string bucketName = 2; repeated OzoneAclInfo acls = 3; required bool isVersionEnabled = 4 [default = false]; - required hadoop.hdfs.StorageTypeProto storageType = 5 [default = DISK]; + required StorageTypeProto storageType = 5 [default = DISK]; required uint64 creationTime = 6; } +enum StorageTypeProto { + DISK = 1; + SSD = 2; + ARCHIVE = 3; + RAM_DISK = 4; +} + message BucketArgs { required string volumeName = 1; required string bucketName = 2; repeated OzoneAclInfo addAcls = 3; repeated OzoneAclInfo removeAcls = 4; optional bool isVersionEnabled = 5; - optional hadoop.hdfs.StorageTypeProto storageType = 6; + optional StorageTypeProto storageType = 6; } message OzoneAclInfo { diff --git a/hadoop-ozone/common/src/test/java/org/apache/hadoop/ozone/web/TestBucketInfo.java b/hadoop-ozone/common/src/test/java/org/apache/hadoop/ozone/web/TestBucketInfo.java index 2e69922594..f45883b695 100644 --- a/hadoop-ozone/common/src/test/java/org/apache/hadoop/ozone/web/TestBucketInfo.java +++ b/hadoop-ozone/common/src/test/java/org/apache/hadoop/ozone/web/TestBucketInfo.java @@ -19,8 +19,8 @@ package org.apache.hadoop.ozone.web; -import org.apache.hadoop.fs.StorageType; import org.apache.hadoop.ozone.OzoneAcl; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.ozone.web.response.BucketInfo; import org.apache.hadoop.ozone.OzoneConsts; import org.junit.Test; diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManagerHelper.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManagerHelper.java index 0537f8ac06..217d3f41ac 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManagerHelper.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManagerHelper.java @@ -22,7 +22,7 @@ import com.google.common.primitives.Longs; import org.apache.commons.lang3.RandomStringUtils; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.StorageType; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.hdds.scm.container.common.helpers.ContainerWithPipeline; import org.apache.hadoop.hdfs.DFSUtil; import org.apache.hadoop.hdfs.server.datanode.ObjectStoreHandler; diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rest/TestOzoneRestClient.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rest/TestOzoneRestClient.java index 70ca1fa51a..1daf8e1d9f 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rest/TestOzoneRestClient.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rest/TestOzoneRestClient.java @@ -20,7 +20,7 @@ import org.apache.commons.lang3.RandomStringUtils; import org.apache.hadoop.hdds.conf.OzoneConfiguration; -import org.apache.hadoop.fs.StorageType; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.hdds.protocol.DatanodeDetails; import org.apache.hadoop.hdds.protocol.datanode.proto.ContainerProtos; import org.apache.hadoop.hdds.scm.container.common.helpers.Pipeline; diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClient.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClient.java index ee8cc08579..b60343a788 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClient.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClient.java @@ -20,7 +20,7 @@ import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.RandomUtils; -import org.apache.hadoop.fs.StorageType; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.hdds.protocol.DatanodeDetails; import org.apache.hadoop.hdds.protocol.datanode.proto.ContainerProtos; import org.apache.hadoop.hdds.scm.container.common.helpers.ContainerInfo; diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestMultipleContainerReadWrite.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestMultipleContainerReadWrite.java index f1ff2cfcd0..3848cda2bf 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestMultipleContainerReadWrite.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestMultipleContainerReadWrite.java @@ -17,7 +17,7 @@ package org.apache.hadoop.ozone.om; import org.apache.commons.lang3.RandomStringUtils; -import org.apache.hadoop.fs.StorageType; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.hdfs.server.datanode.ObjectStoreHandler; import org.apache.hadoop.metrics2.MetricsRecordBuilder; import org.apache.hadoop.ozone.MiniOzoneCluster; diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmBlockVersioning.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmBlockVersioning.java index 9f97a2cbfc..8c08c8fe11 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmBlockVersioning.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmBlockVersioning.java @@ -18,7 +18,7 @@ import org.apache.commons.lang3.RandomStringUtils; import org.apache.hadoop.hdds.conf.OzoneConfiguration; -import org.apache.hadoop.fs.StorageType; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.hdfs.DFSUtil; import org.apache.hadoop.hdfs.server.datanode.ObjectStoreHandler; import org.apache.hadoop.ozone.MiniOzoneCluster; diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManager.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManager.java index 714400587c..44df68ae1b 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManager.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManager.java @@ -18,7 +18,7 @@ import org.apache.commons.lang3.RandomStringUtils; -import org.apache.hadoop.fs.StorageType; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.hdds.scm.client.HddsClientUtils; import org.apache.hadoop.hdfs.DFSUtil; import org.apache.hadoop.hdfs.server.datanode.ObjectStoreHandler; diff --git a/hadoop-ozone/objectstore-service/src/main/java/org/apache/hadoop/ozone/web/handlers/BucketProcessTemplate.java b/hadoop-ozone/objectstore-service/src/main/java/org/apache/hadoop/ozone/web/handlers/BucketProcessTemplate.java index 8f31dfdf2d..c6625fdb57 100644 --- a/hadoop-ozone/objectstore-service/src/main/java/org/apache/hadoop/ozone/web/handlers/BucketProcessTemplate.java +++ b/hadoop-ozone/objectstore-service/src/main/java/org/apache/hadoop/ozone/web/handlers/BucketProcessTemplate.java @@ -29,7 +29,7 @@ import java.util.LinkedList; import java.util.List; -import org.apache.hadoop.fs.StorageType; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.ozone.OzoneConsts; import org.apache.hadoop.ozone.OzoneRestUtils; import org.apache.hadoop.ozone.client.rest.OzoneException; diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/BucketManagerImpl.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/BucketManagerImpl.java index 3e740d9903..be44bce93d 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/BucketManagerImpl.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/BucketManagerImpl.java @@ -17,7 +17,7 @@ package org.apache.hadoop.ozone.om; import com.google.common.base.Preconditions; -import org.apache.hadoop.fs.StorageType; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.ozone.OzoneAcl; import org.apache.hadoop.ozone.om.exceptions.OMException; import org.apache.hadoop.ozone.om.helpers.OmBucketArgs; diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/S3BucketManagerImpl.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/S3BucketManagerImpl.java index e64995f4cd..ca032c9adc 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/S3BucketManagerImpl.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/S3BucketManagerImpl.java @@ -19,8 +19,8 @@ package org.apache.hadoop.ozone.om; import com.google.common.base.Preconditions; -import org.apache.hadoop.fs.StorageType; import org.apache.hadoop.hdds.conf.OzoneConfiguration; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.ozone.OzoneConsts; import org.apache.hadoop.ozone.om.exceptions.OMException; import org.apache.hadoop.ozone.om.helpers.OmBucketInfo; diff --git a/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestBucketManagerImpl.java b/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestBucketManagerImpl.java index 9684a1f222..59f29400d9 100644 --- a/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestBucketManagerImpl.java +++ b/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestBucketManagerImpl.java @@ -16,7 +16,7 @@ */ package org.apache.hadoop.ozone.om; -import org.apache.hadoop.fs.StorageType; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.hdds.conf.OzoneConfiguration; import org.apache.hadoop.hdds.server.ServerUtils; import org.apache.hadoop.hdfs.DFSUtil; diff --git a/hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/client/OzoneBucketStub.java b/hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/client/OzoneBucketStub.java index ff0f70627a..6aff087bfc 100644 --- a/hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/client/OzoneBucketStub.java +++ b/hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/client/OzoneBucketStub.java @@ -29,9 +29,9 @@ import java.util.Map; import java.util.stream.Collectors; -import org.apache.hadoop.fs.StorageType; import org.apache.hadoop.hdds.client.ReplicationFactor; import org.apache.hadoop.hdds.client.ReplicationType; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.ozone.OzoneAcl; import org.apache.hadoop.ozone.client.io.OzoneInputStream; import org.apache.hadoop.ozone.client.io.OzoneOutputStream; diff --git a/hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/client/OzoneVolumeStub.java b/hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/client/OzoneVolumeStub.java index dd8701f557..c7317a4771 100644 --- a/hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/client/OzoneVolumeStub.java +++ b/hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/client/OzoneVolumeStub.java @@ -26,7 +26,7 @@ import java.util.Map; import java.util.stream.Collectors; -import org.apache.hadoop.fs.StorageType; +import org.apache.hadoop.hdds.protocol.StorageType; import org.apache.hadoop.ozone.OzoneAcl; /**