From 12f4df043fb6922c6ce1c470a2e020b4111f8739 Mon Sep 17 00:00:00 2001 From: Haohui Mai Date: Wed, 22 Apr 2015 09:10:12 -0700 Subject: [PATCH] HDFS-8218. Move classes that used by ClientProtocol into hdfs-client. Contributed by Haohui Mai. --- .../dev-support/findbugsExcludeFile.xml | 7 ++++++ .../java/org/apache/hadoop/fs/CacheFlag.java | 0 .../main/java/org/apache/hadoop/fs/XAttr.java | 22 +++++++++---------- .../org/apache/hadoop/hdfs/inotify/Event.java | 4 ++-- .../hadoop/hdfs/inotify/EventBatch.java | 0 .../hadoop/hdfs/inotify/EventBatchList.java | 0 .../AlreadyBeingCreatedException.java | 0 .../hdfs/protocol/BlockStoragePolicy.java | 2 +- .../hdfs/protocol/CorruptFileBlocks.java | 2 +- .../protocol/DSQuotaExceededException.java | 0 .../hdfs/protocol/DatanodeLocalInfo.java | 0 .../hdfs/protocol/DirectoryListing.java | 10 ++++----- .../hadoop/hdfs/protocol/EncryptionZone.java | 0 .../hdfs/protocol/LastBlockWithStatus.java | 0 .../protocol/NSQuotaExceededException.java | 12 +++++----- .../hdfs/protocol/QuotaExceededException.java | 20 ++++++++--------- .../hdfs/protocol/RollingUpgradeInfo.java | 8 +++---- .../hdfs/protocol/RollingUpgradeStatus.java | 0 .../SnapshotAccessControlException.java | 0 .../token/block/DataEncryptionKey.java | 4 ++-- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ 21 files changed, 52 insertions(+), 42 deletions(-) rename hadoop-hdfs-project/{hadoop-hdfs => hadoop-hdfs-client}/src/main/java/org/apache/hadoop/fs/CacheFlag.java (100%) rename hadoop-hdfs-project/{hadoop-hdfs => hadoop-hdfs-client}/src/main/java/org/apache/hadoop/fs/XAttr.java (99%) rename hadoop-hdfs-project/{hadoop-hdfs => hadoop-hdfs-client}/src/main/java/org/apache/hadoop/hdfs/inotify/Event.java (99%) rename hadoop-hdfs-project/{hadoop-hdfs => hadoop-hdfs-client}/src/main/java/org/apache/hadoop/hdfs/inotify/EventBatch.java (100%) rename hadoop-hdfs-project/{hadoop-hdfs => hadoop-hdfs-client}/src/main/java/org/apache/hadoop/hdfs/inotify/EventBatchList.java (100%) rename hadoop-hdfs-project/{hadoop-hdfs => hadoop-hdfs-client}/src/main/java/org/apache/hadoop/hdfs/protocol/AlreadyBeingCreatedException.java (100%) rename hadoop-hdfs-project/{hadoop-hdfs => hadoop-hdfs-client}/src/main/java/org/apache/hadoop/hdfs/protocol/BlockStoragePolicy.java (99%) rename hadoop-hdfs-project/{hadoop-hdfs => hadoop-hdfs-client}/src/main/java/org/apache/hadoop/hdfs/protocol/CorruptFileBlocks.java (99%) rename hadoop-hdfs-project/{hadoop-hdfs => hadoop-hdfs-client}/src/main/java/org/apache/hadoop/hdfs/protocol/DSQuotaExceededException.java (100%) rename hadoop-hdfs-project/{hadoop-hdfs => hadoop-hdfs-client}/src/main/java/org/apache/hadoop/hdfs/protocol/DatanodeLocalInfo.java (100%) rename hadoop-hdfs-project/{hadoop-hdfs => hadoop-hdfs-client}/src/main/java/org/apache/hadoop/hdfs/protocol/DirectoryListing.java (97%) rename hadoop-hdfs-project/{hadoop-hdfs => hadoop-hdfs-client}/src/main/java/org/apache/hadoop/hdfs/protocol/EncryptionZone.java (100%) rename hadoop-hdfs-project/{hadoop-hdfs => hadoop-hdfs-client}/src/main/java/org/apache/hadoop/hdfs/protocol/LastBlockWithStatus.java (100%) rename hadoop-hdfs-project/{hadoop-hdfs => hadoop-hdfs-client}/src/main/java/org/apache/hadoop/hdfs/protocol/NSQuotaExceededException.java (93%) rename hadoop-hdfs-project/{hadoop-hdfs => hadoop-hdfs-client}/src/main/java/org/apache/hadoop/hdfs/protocol/QuotaExceededException.java (95%) rename hadoop-hdfs-project/{hadoop-hdfs => hadoop-hdfs-client}/src/main/java/org/apache/hadoop/hdfs/protocol/RollingUpgradeInfo.java (99%) rename hadoop-hdfs-project/{hadoop-hdfs => hadoop-hdfs-client}/src/main/java/org/apache/hadoop/hdfs/protocol/RollingUpgradeStatus.java (100%) rename hadoop-hdfs-project/{hadoop-hdfs => hadoop-hdfs-client}/src/main/java/org/apache/hadoop/hdfs/protocol/SnapshotAccessControlException.java (100%) rename hadoop-hdfs-project/{hadoop-hdfs => hadoop-hdfs-client}/src/main/java/org/apache/hadoop/hdfs/security/token/block/DataEncryptionKey.java (99%) diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/dev-support/findbugsExcludeFile.xml b/hadoop-hdfs-project/hadoop-hdfs-client/dev-support/findbugsExcludeFile.xml index 478a931575e..7aade70ceb3 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/dev-support/findbugsExcludeFile.xml +++ b/hadoop-hdfs-project/hadoop-hdfs-client/dev-support/findbugsExcludeFile.xml @@ -1,9 +1,16 @@ + + + + + + + diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/fs/CacheFlag.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/fs/CacheFlag.java similarity index 100% rename from hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/fs/CacheFlag.java rename to hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/fs/CacheFlag.java diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/fs/XAttr.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/fs/XAttr.java similarity index 99% rename from hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/fs/XAttr.java rename to hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/fs/XAttr.java index 968ee00ce76..f688c91072b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/fs/XAttr.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/fs/XAttr.java @@ -64,54 +64,54 @@ public class XAttr { SYSTEM, RAW; } - + private final NameSpace ns; private final String name; private final byte[] value; - + public static class Builder { private NameSpace ns = NameSpace.USER; private String name; private byte[] value; - + public Builder setNameSpace(NameSpace ns) { this.ns = ns; return this; } - + public Builder setName(String name) { this.name = name; return this; } - + public Builder setValue(byte[] value) { this.value = value; return this; } - + public XAttr build() { return new XAttr(ns, name, value); } } - + private XAttr(NameSpace ns, String name, byte[] value) { this.ns = ns; this.name = name; this.value = value; } - + public NameSpace getNameSpace() { return ns; } - + public String getName() { return name; } - + public byte[] getValue() { return value; } - + @Override public int hashCode() { return new HashCodeBuilder(811, 67) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/inotify/Event.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/inotify/Event.java similarity index 99% rename from hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/inotify/Event.java rename to hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/inotify/Event.java index a6de289b679..53eefa0425b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/inotify/Event.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/inotify/Event.java @@ -154,7 +154,7 @@ public abstract class Event { this.symlinkTarget = symlinkTarget; return this; } - + public Builder overwrite(boolean overwrite) { this.overwrite = overwrite; return this; @@ -224,7 +224,7 @@ public abstract class Event { public String getSymlinkTarget() { return symlinkTarget; } - + public boolean getOverwrite() { return overwrite; } diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/inotify/EventBatch.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/inotify/EventBatch.java similarity index 100% rename from hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/inotify/EventBatch.java rename to hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/inotify/EventBatch.java diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/inotify/EventBatchList.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/inotify/EventBatchList.java similarity index 100% rename from hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/inotify/EventBatchList.java rename to hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/inotify/EventBatchList.java diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/AlreadyBeingCreatedException.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/AlreadyBeingCreatedException.java similarity index 100% rename from hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/AlreadyBeingCreatedException.java rename to hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/AlreadyBeingCreatedException.java diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/BlockStoragePolicy.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/BlockStoragePolicy.java similarity index 99% rename from hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/BlockStoragePolicy.java rename to hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/BlockStoragePolicy.java index 4bfb33bb5bf..9ecf6e8684b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/BlockStoragePolicy.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/BlockStoragePolicy.java @@ -123,7 +123,7 @@ public class BlockStoragePolicy { * Choose the storage types for storing the remaining replicas, given the * replication number, the storage types of the chosen replicas and * the unavailable storage types. It uses fallback storage in case that - * the desired storage type is unavailable. + * the desired storage type is unavailable. * * @param replication the replication number. * @param chosen the storage types of the chosen replicas. diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/CorruptFileBlocks.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/CorruptFileBlocks.java similarity index 99% rename from hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/CorruptFileBlocks.java rename to hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/CorruptFileBlocks.java index 60657861473..1b5dbd336d4 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/CorruptFileBlocks.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/CorruptFileBlocks.java @@ -61,7 +61,7 @@ public class CorruptFileBlocks { Arrays.equals(files, other.files); } - + @Override public int hashCode() { int result = cookie.hashCode(); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DSQuotaExceededException.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/DSQuotaExceededException.java similarity index 100% rename from hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DSQuotaExceededException.java rename to hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/DSQuotaExceededException.java diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DatanodeLocalInfo.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/DatanodeLocalInfo.java similarity index 100% rename from hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DatanodeLocalInfo.java rename to hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/DatanodeLocalInfo.java diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DirectoryListing.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/DirectoryListing.java similarity index 97% rename from hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DirectoryListing.java rename to hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/DirectoryListing.java index 169287b8560..23802ad6db9 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DirectoryListing.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/DirectoryListing.java @@ -28,13 +28,13 @@ import org.apache.hadoop.classification.InterfaceStability; public class DirectoryListing { private HdfsFileStatus[] partialListing; private int remainingEntries; - + /** * constructor * @param partialListing a partial listing of a directory * @param remainingEntries number of entries that are left to be listed */ - public DirectoryListing(HdfsFileStatus[] partialListing, + public DirectoryListing(HdfsFileStatus[] partialListing, int remainingEntries) { if (partialListing == null) { throw new IllegalArgumentException("partial listing should not be null"); @@ -54,7 +54,7 @@ public class DirectoryListing { public HdfsFileStatus[] getPartialListing() { return partialListing; } - + /** * Get the number of remaining entries that are left to be listed * @return the number of remaining entries that are left to be listed @@ -62,7 +62,7 @@ public class DirectoryListing { public int getRemainingEntries() { return remainingEntries; } - + /** * Check if there are more entries that are left to be listed * @return true if there are more entries that are left to be listed; @@ -71,7 +71,7 @@ public class DirectoryListing { public boolean hasMore() { return remainingEntries != 0; } - + /** * Get the last name in this list * @return the last name in the list if it is not empty; otherwise return null diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/EncryptionZone.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/EncryptionZone.java similarity index 100% rename from hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/EncryptionZone.java rename to hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/EncryptionZone.java diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LastBlockWithStatus.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/LastBlockWithStatus.java similarity index 100% rename from hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LastBlockWithStatus.java rename to hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/LastBlockWithStatus.java diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/NSQuotaExceededException.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/NSQuotaExceededException.java similarity index 93% rename from hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/NSQuotaExceededException.java rename to hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/NSQuotaExceededException.java index 7c28cd90ae6..eeedd5a3722 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/NSQuotaExceededException.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/NSQuotaExceededException.java @@ -25,15 +25,15 @@ import org.apache.hadoop.classification.InterfaceStability; @InterfaceStability.Evolving public final class NSQuotaExceededException extends QuotaExceededException { protected static final long serialVersionUID = 1L; - + private String prefix; - + public NSQuotaExceededException() {} public NSQuotaExceededException(String msg) { super(msg); } - + public NSQuotaExceededException(long quota, long count) { super(quota, count); } @@ -42,9 +42,9 @@ public final class NSQuotaExceededException extends QuotaExceededException { public String getMessage() { String msg = super.getMessage(); if (msg == null) { - msg = "The NameSpace quota (directories and files)" + - (pathName==null?"":(" of directory " + pathName)) + - " is exceeded: quota=" + quota + " file count=" + count; + msg = "The NameSpace quota (directories and files)" + + (pathName==null?"":(" of directory " + pathName)) + + " is exceeded: quota=" + quota + " file count=" + count; if (prefix != null) { msg = prefix + ": " + msg; diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/QuotaExceededException.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/QuotaExceededException.java similarity index 95% rename from hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/QuotaExceededException.java rename to hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/QuotaExceededException.java index 6dfed79f28a..f4e7f343f9d 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/QuotaExceededException.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/QuotaExceededException.java @@ -23,15 +23,15 @@ import java.io.IOException; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability; -/** +/** * This exception is thrown when modification to HDFS results in violation - * of a directory quota. A directory quota might be namespace quota (limit - * on number of files and directories) or a diskspace quota (limit on space + * of a directory quota. A directory quota might be namespace quota (limit + * on number of files and directories) or a diskspace quota (limit on space * taken by all the file under the directory tree).

- * + * * The message for the exception specifies the directory where the quota - * was violated and actual quotas. Specific message is generated in the - * corresponding Exception class: + * was violated and actual quotas. Specific message is generated in the + * corresponding Exception class: * DSQuotaExceededException or * NSQuotaExceededException */ @@ -42,22 +42,22 @@ public class QuotaExceededException extends IOException { protected String pathName=null; protected long quota; // quota protected long count; // actual value - + protected QuotaExceededException() {} protected QuotaExceededException(String msg) { super(msg); } - + protected QuotaExceededException(long quota, long count) { this.quota = quota; this.count = count; } - + public void setPathName(String path) { this.pathName = path; } - + @Override public String getMessage() { return super.getMessage(); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/RollingUpgradeInfo.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/RollingUpgradeInfo.java similarity index 99% rename from hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/RollingUpgradeInfo.java rename to hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/RollingUpgradeInfo.java index 80e3e3478d3..b5277979c35 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/RollingUpgradeInfo.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/RollingUpgradeInfo.java @@ -31,7 +31,7 @@ public class RollingUpgradeInfo extends RollingUpgradeStatus { private final long startTime; private long finalizeTime; private boolean createdRollbackImages; - + public RollingUpgradeInfo(String blockPoolId, boolean createdRollbackImages, long startTime, long finalizeTime) { super(blockPoolId, finalizeTime != 0); @@ -39,7 +39,7 @@ public class RollingUpgradeInfo extends RollingUpgradeStatus { this.startTime = startTime; this.finalizeTime = finalizeTime; } - + public boolean createdRollbackImages() { return createdRollbackImages; } @@ -51,7 +51,7 @@ public class RollingUpgradeInfo extends RollingUpgradeStatus { public boolean isStarted() { return startTime != 0; } - + /** @return The rolling upgrade starting time. */ public long getStartTime() { return startTime; @@ -102,7 +102,7 @@ public class RollingUpgradeInfo extends RollingUpgradeStatus { + "\n Start Time: " + (startTime == 0? "": timestamp2String(startTime)) + "\n Finalize Time: " + (finalizeTime == 0? "": timestamp2String(finalizeTime)); } - + private static String timestamp2String(long timestamp) { return new Date(timestamp) + " (=" + timestamp + ")"; } diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/RollingUpgradeStatus.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/RollingUpgradeStatus.java similarity index 100% rename from hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/RollingUpgradeStatus.java rename to hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/RollingUpgradeStatus.java diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/SnapshotAccessControlException.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/SnapshotAccessControlException.java similarity index 100% rename from hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/SnapshotAccessControlException.java rename to hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/SnapshotAccessControlException.java diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/security/token/block/DataEncryptionKey.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/security/token/block/DataEncryptionKey.java similarity index 99% rename from hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/security/token/block/DataEncryptionKey.java rename to hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/security/token/block/DataEncryptionKey.java index 41c84e2e4d6..87411f29d82 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/security/token/block/DataEncryptionKey.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/security/token/block/DataEncryptionKey.java @@ -31,7 +31,7 @@ public class DataEncryptionKey { public final byte[] encryptionKey; public final long expiryDate; public final String encryptionAlgorithm; - + public DataEncryptionKey(int keyId, String blockPoolId, byte[] nonce, byte[] encryptionKey, long expiryDate, String encryptionAlgorithm) { this.keyId = keyId; @@ -41,7 +41,7 @@ public class DataEncryptionKey { this.expiryDate = expiryDate; this.encryptionAlgorithm = encryptionAlgorithm; } - + @Override public String toString() { return keyId + "/" + blockPoolId + "/" + nonce.length + "/" + diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 03c52282a10..521315b3621 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -458,6 +458,9 @@ Release 2.8.0 - UNRELEASED HDFS-8185. Separate client related routines in HAUtil into a new class. (wheat9) + HDFS-8218. Move classes that used by ClientProtocol into hdfs-client. + (wheat9) + OPTIMIZATIONS HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than