[01/50] [abbrv] hadoop git commit: HDFS-9134. Move LEASE_{SOFTLIMIT, HARDLIMIT}_PERIOD constants from HdfsServerConstants to HdfsConstants. Contributed by Mingliang Liu.
Repository: hadoop Updated Branches: refs/heads/HDFS-7240 8a070ee48 -> 28d313d19 HDFS-9134. Move LEASE_{SOFTLIMIT,HARDLIMIT}_PERIOD constants from HdfsServerConstants to HdfsConstants. Contributed by Mingliang Liu. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/692b1a45 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/692b1a45 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/692b1a45 Branch: refs/heads/HDFS-7240 Commit: 692b1a45ce46a76586c9c375854940454eeca306 Parents: d1b9b85 Author: Haohui MaiAuthored: Thu Sep 24 20:19:16 2015 -0700 Committer: Haohui Mai Committed: Thu Sep 24 20:19:16 2015 -0700 -- .../hadoop/hdfs/protocol/HdfsConstants.java | 23 + hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../java/org/apache/hadoop/hdfs/DFSClient.java | 5 ++-- .../hadoop/hdfs/client/impl/LeaseRenewer.java | 6 ++--- .../hdfs/server/common/HdfsServerConstants.java | 27 +--- .../hadoop/hdfs/server/namenode/BackupNode.java | 3 ++- .../hdfs/server/namenode/LeaseManager.java | 5 ++-- .../org/apache/hadoop/hdfs/TestFileAppend4.java | 4 +-- .../java/org/apache/hadoop/hdfs/TestLease.java | 8 +++--- .../apache/hadoop/hdfs/TestLeaseRecovery2.java | 5 ++-- .../hdfs/server/namenode/TestFileTruncate.java | 5 ++-- ...tINodeFileUnderConstructionWithSnapshot.java | 8 +++--- 12 files changed, 58 insertions(+), 44 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/692b1a45/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/HdfsConstants.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/HdfsConstants.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/HdfsConstants.java index 0453d1d..e744b85 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/HdfsConstants.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/HdfsConstants.java @@ -93,6 +93,29 @@ public final class HdfsConstants { //for write pipeline public static final int WRITE_TIMEOUT_EXTENSION = 5 * 1000; + /** + * For a HDFS client to write to a file, a lease is granted; During the lease + * period, no other client can write to the file. The writing client can + * periodically renew the lease. When the file is closed, the lease is + * revoked. The lease duration is bound by this soft limit and a + * {@link HdfsConstants#LEASE_HARDLIMIT_PERIOD hard limit}. Until the + * soft limit expires, the writer has sole write access to the file. If the + * soft limit expires and the client fails to close the file or renew the + * lease, another client can preempt the lease. + */ + public static final long LEASE_SOFTLIMIT_PERIOD = 60 * 1000; + /** + * For a HDFS client to write to a file, a lease is granted; During the lease + * period, no other client can write to the file. The writing client can + * periodically renew the lease. When the file is closed, the lease is + * revoked. The lease duration is bound by a + * {@link HdfsConstants#LEASE_SOFTLIMIT_PERIOD soft limit} and this hard + * limit. If after the hard limit expires and the client has failed to renew + * the lease, HDFS assumes that the client has quit and will automatically + * close the file on behalf of the writer, and recover the lease. + */ + public static final long LEASE_HARDLIMIT_PERIOD = 60 * LEASE_SOFTLIMIT_PERIOD; + // SafeMode actions public enum SafeModeAction { SAFEMODE_LEAVE, SAFEMODE_ENTER, SAFEMODE_GET http://git-wip-us.apache.org/repos/asf/hadoop/blob/692b1a45/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index e480e18..ed2aa8f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -959,6 +959,9 @@ Release 2.8.0 - UNRELEASED HDFS-7529. Consolidate encryption zone related implementation into a single class. (Rakesh R via wheat9) +HDFS-9134. Move LEASE_{SOFTLIMIT,HARDLIMIT}_PERIOD constants from +HdfsServerConstants to HdfsConstants. (Mingliang Liu via wheat9) + OPTIMIZATIONS HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than http://git-wip-us.apache.org/repos/asf/hadoop/blob/692b1a45/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
hadoop git commit: HDFS-9134. Move LEASE_{SOFTLIMIT, HARDLIMIT}_PERIOD constants from HdfsServerConstants to HdfsConstants. Contributed by Mingliang Liu.
Repository: hadoop Updated Branches: refs/heads/trunk d1b9b8524 -> 692b1a45c HDFS-9134. Move LEASE_{SOFTLIMIT,HARDLIMIT}_PERIOD constants from HdfsServerConstants to HdfsConstants. Contributed by Mingliang Liu. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/692b1a45 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/692b1a45 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/692b1a45 Branch: refs/heads/trunk Commit: 692b1a45ce46a76586c9c375854940454eeca306 Parents: d1b9b85 Author: Haohui MaiAuthored: Thu Sep 24 20:19:16 2015 -0700 Committer: Haohui Mai Committed: Thu Sep 24 20:19:16 2015 -0700 -- .../hadoop/hdfs/protocol/HdfsConstants.java | 23 + hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../java/org/apache/hadoop/hdfs/DFSClient.java | 5 ++-- .../hadoop/hdfs/client/impl/LeaseRenewer.java | 6 ++--- .../hdfs/server/common/HdfsServerConstants.java | 27 +--- .../hadoop/hdfs/server/namenode/BackupNode.java | 3 ++- .../hdfs/server/namenode/LeaseManager.java | 5 ++-- .../org/apache/hadoop/hdfs/TestFileAppend4.java | 4 +-- .../java/org/apache/hadoop/hdfs/TestLease.java | 8 +++--- .../apache/hadoop/hdfs/TestLeaseRecovery2.java | 5 ++-- .../hdfs/server/namenode/TestFileTruncate.java | 5 ++-- ...tINodeFileUnderConstructionWithSnapshot.java | 8 +++--- 12 files changed, 58 insertions(+), 44 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/692b1a45/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/HdfsConstants.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/HdfsConstants.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/HdfsConstants.java index 0453d1d..e744b85 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/HdfsConstants.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/HdfsConstants.java @@ -93,6 +93,29 @@ public final class HdfsConstants { //for write pipeline public static final int WRITE_TIMEOUT_EXTENSION = 5 * 1000; + /** + * For a HDFS client to write to a file, a lease is granted; During the lease + * period, no other client can write to the file. The writing client can + * periodically renew the lease. When the file is closed, the lease is + * revoked. The lease duration is bound by this soft limit and a + * {@link HdfsConstants#LEASE_HARDLIMIT_PERIOD hard limit}. Until the + * soft limit expires, the writer has sole write access to the file. If the + * soft limit expires and the client fails to close the file or renew the + * lease, another client can preempt the lease. + */ + public static final long LEASE_SOFTLIMIT_PERIOD = 60 * 1000; + /** + * For a HDFS client to write to a file, a lease is granted; During the lease + * period, no other client can write to the file. The writing client can + * periodically renew the lease. When the file is closed, the lease is + * revoked. The lease duration is bound by a + * {@link HdfsConstants#LEASE_SOFTLIMIT_PERIOD soft limit} and this hard + * limit. If after the hard limit expires and the client has failed to renew + * the lease, HDFS assumes that the client has quit and will automatically + * close the file on behalf of the writer, and recover the lease. + */ + public static final long LEASE_HARDLIMIT_PERIOD = 60 * LEASE_SOFTLIMIT_PERIOD; + // SafeMode actions public enum SafeModeAction { SAFEMODE_LEAVE, SAFEMODE_ENTER, SAFEMODE_GET http://git-wip-us.apache.org/repos/asf/hadoop/blob/692b1a45/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index e480e18..ed2aa8f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -959,6 +959,9 @@ Release 2.8.0 - UNRELEASED HDFS-7529. Consolidate encryption zone related implementation into a single class. (Rakesh R via wheat9) +HDFS-9134. Move LEASE_{SOFTLIMIT,HARDLIMIT}_PERIOD constants from +HdfsServerConstants to HdfsConstants. (Mingliang Liu via wheat9) + OPTIMIZATIONS HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than http://git-wip-us.apache.org/repos/asf/hadoop/blob/692b1a45/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java -- diff
hadoop git commit: HDFS-9134. Move LEASE_{SOFTLIMIT, HARDLIMIT}_PERIOD constants from HdfsServerConstants to HdfsConstants. Contributed by Mingliang Liu.
Repository: hadoop Updated Branches: refs/heads/branch-2 bf3f08cc6 -> 85c73d159 HDFS-9134. Move LEASE_{SOFTLIMIT,HARDLIMIT}_PERIOD constants from HdfsServerConstants to HdfsConstants. Contributed by Mingliang Liu. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/85c73d15 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/85c73d15 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/85c73d15 Branch: refs/heads/branch-2 Commit: 85c73d159e60dcbb83f08d54c8cb0c694697c108 Parents: bf3f08c Author: Haohui MaiAuthored: Thu Sep 24 20:19:16 2015 -0700 Committer: Haohui Mai Committed: Thu Sep 24 20:29:52 2015 -0700 -- .../hadoop/hdfs/protocol/HdfsConstants.java | 23 + hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../java/org/apache/hadoop/hdfs/DFSClient.java | 5 ++-- .../hadoop/hdfs/client/impl/LeaseRenewer.java | 6 ++--- .../hdfs/server/common/HdfsServerConstants.java | 27 +--- .../hadoop/hdfs/server/namenode/BackupNode.java | 3 ++- .../hdfs/server/namenode/LeaseManager.java | 5 ++-- .../org/apache/hadoop/hdfs/TestFileAppend4.java | 4 +-- .../java/org/apache/hadoop/hdfs/TestLease.java | 8 +++--- .../apache/hadoop/hdfs/TestLeaseRecovery2.java | 5 ++-- .../hdfs/server/namenode/TestFileTruncate.java | 5 ++-- ...tINodeFileUnderConstructionWithSnapshot.java | 8 +++--- 12 files changed, 58 insertions(+), 44 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/85c73d15/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/HdfsConstants.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/HdfsConstants.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/HdfsConstants.java index 8b60496..1a64933 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/HdfsConstants.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/HdfsConstants.java @@ -93,6 +93,29 @@ public class HdfsConstants { //for write pipeline public static final int WRITE_TIMEOUT_EXTENSION = 5 * 1000; + /** + * For a HDFS client to write to a file, a lease is granted; During the lease + * period, no other client can write to the file. The writing client can + * periodically renew the lease. When the file is closed, the lease is + * revoked. The lease duration is bound by this soft limit and a + * {@link HdfsConstants#LEASE_HARDLIMIT_PERIOD hard limit}. Until the + * soft limit expires, the writer has sole write access to the file. If the + * soft limit expires and the client fails to close the file or renew the + * lease, another client can preempt the lease. + */ + public static final long LEASE_SOFTLIMIT_PERIOD = 60 * 1000; + /** + * For a HDFS client to write to a file, a lease is granted; During the lease + * period, no other client can write to the file. The writing client can + * periodically renew the lease. When the file is closed, the lease is + * revoked. The lease duration is bound by a + * {@link HdfsConstants#LEASE_SOFTLIMIT_PERIOD soft limit} and this hard + * limit. If after the hard limit expires and the client has failed to renew + * the lease, HDFS assumes that the client has quit and will automatically + * close the file on behalf of the writer, and recover the lease. + */ + public static final long LEASE_HARDLIMIT_PERIOD = 60 * LEASE_SOFTLIMIT_PERIOD; + // SafeMode actions public enum SafeModeAction { SAFEMODE_LEAVE, SAFEMODE_ENTER, SAFEMODE_GET http://git-wip-us.apache.org/repos/asf/hadoop/blob/85c73d15/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 354c3cc..840f1ce 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -611,6 +611,9 @@ Release 2.8.0 - UNRELEASED HDFS-7529. Consolidate encryption zone related implementation into a single class. (Rakesh R via wheat9) +HDFS-9134. Move LEASE_{SOFTLIMIT,HARDLIMIT}_PERIOD constants from +HdfsServerConstants to HdfsConstants. (Mingliang Liu via wheat9) + OPTIMIZATIONS HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than http://git-wip-us.apache.org/repos/asf/hadoop/blob/85c73d15/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java -- diff