You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cl...@apache.org on 2019/08/10 00:25:59 UTC

[hadoop] branch branch-2 updated (15062b6 -> 0977101)

This is an automated email from the ASF dual-hosted git repository.

cliang pushed a change to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hadoop.git.


    from 15062b6  HDFS-14696. Backport HDFS-11273 to branch-2 (Move TransferFsImage#doGetUrl function to a Util class) (#1251) Contributed by Siyao Meng.
     new 61b5108  HDFS-12975. [SBN read] Changes to the NameNode to support reads from standby. Contributed by Chao Sun.
     new dd70e6d  HDFS-12977. [SBN read] Add stateId to RPC headers. Contributed by Plamen Jeliazkov.
     new d0c85f8  HDFS-13331. [SBN read] Add lastSeenStateId to RpcRequestHeader. Contributed by Plamen Jeliazkov.
     new d5da529  HDFS-13286. [SBN read] Add haadmin commands to transition between standby and observer. Contributed by Chao Sun.
     new c450e69  HDFS-13578. [SBN read] Add ReadOnly annotation to methods in ClientProtocol. Contributed by Chao Sun.
     new 3ed8d45  HDFS-13399. [SBN read] Make Client field AlignmentContext non-static. Contributed by Plamen Jeliazkov.
     new befe410  HDFS-13607. [SBN read] Edit Tail Fast Path Part 1: Enhance JournalNode with an in-memory cache of recent edit transactions. Contributed by Erik Krogen.
     new 88d65af  HDFS-13608. [SBN read] Edit Tail Fast Path Part 2: Add ability for JournalNode to serve edits via RPC. Contributed by Erik Krogen.
     new 85f81fe  HDFS-13609. [SBN read] Edit Tail Fast Path Part 3: NameNode-side changes to support tailing edits via RPC. Contributed by Erik Krogen. HDFS-10519. Add a configuration option to enable in-progress edit log tailing. Contributed by Jiayi Zhou.
     new 272a198  HDFS-13706. [SBN read] Rename client context to ClientGSIContext. Contributed by Konstantin Shvachko.
     new 04eefe2  HDFS-12976. [SBN read] Introduce ObserverReadProxyProvider. Contributed by Chao Sun.
     new 9803d8d  HDFS-13665. [SBN read] Move RPC response serialization into Server.doResponse(). Contributed by Plamen Jeliazkov.
     new ea6d367  HDFS-13610. [SBN read] Edit Tail Fast Path Part 4: Cleanup. Integration test, documentation, remove unnecessary dummy sync, minors fixups. Contributed by Erik Krogen.
     new 33d8aae  HDFS-13688. [SBN read] Introduce msync API call. Contributed by Chen Liang. Also fix a issue in IPCLoggerChannel
     new f531301  HDFS-13789. Reduce logging frequency of QuorumJournalManager#selectInputStreams. Contributed by Erik Krogen.
     new 9f90bca  HDFS-13767. Add msync server implementation. Contributed by Chen Liang.
     new fcafa72  HDFS-13851. Remove AlignmentContext from AbstractNNFailoverProxyProvider. Contributed by Konstantin Shvachko.
     new c09665d  HDFS-13782. ObserverReadProxyProvider should work with IPFailoverProxyProvider. Contributed by Konstantin Shvachko.
     new 7ccb2a4  HDFS-13779. [SBN read] Implement proper failover and observer failure handling logic for for ObserverReadProxyProvider. Contributed by Erik Krogen. Also add a missing change from HDFS-13610
     new bf9d8ba  HDFS-13880. Add mechanism to allow certain RPC calls to bypass sync. Contributed by Chen Liang.
     new 7eacf5f  HDFS-13778. [SBN read] TestStateAlignmentContextWithHA should use real ObserverReadProxyProvider instead of AlignmentContextProxyProvider. Contributed by Konstantin Shvachko and Plamen Jeliazkov. Also fix a number of java7 incompatibilities from previous SbN read commits.
     new a7d551e  HDFS-13749. [SBN read] Use getServiceStatus to discover observer namenodes. Contributed by Chao Sun.
     new 7146e67  HDFS-13898. [SBN read] Throw retriable exception for getBlockLocations when ObserverNameNode is in safemode. Contributed by Chao Sun.
     new b4fc93d  HDFS-13791. Limit logging frequency of edit tail related statements. Contributed by Erik Krogen.
     new ae559db  HDFS-13961. [SBN read] TestObserverNode refactoring. Contributed by Konstantin Shvachko.
     new 63cf980  HDFS-13523. Support observer nodes in MiniDFSCluster. Contributed by Konstantin Shvachko.
     new 37dfd29  HDFS-13925. Unit Test for transitioning between different states. Contributed by Sherwood Zheng.
     new 40d5cc1  HDFS-13924. [SBN read] Handle BlockMissingException when reading from observer. Contributed by Chao Sun.
     new 697207c  HDFS-14016. [SBN read] ObserverReadProxyProvider should enable observer read by default. Contributed by Chen Liang.
     new 17fac44  HDFS-14035. NN status discovery does not leverage delegation token. Contributed by Chen Liang.
     new c6267bb  HDFS-14017. [SBN read] ObserverReadProxyProviderWithIPFailover should work with HA configuration. Contributed by Chen Liang.
     new 52d066a  HDFS-14067. [SBN read] Allow manual failover between standby and observer. Contributed by Chao Sun.
     new 3518767  HDFS-14094. [SBN read] Fix the order of logging arguments in ObserverReadProxyProvider. Contributed by Ayush Saxena.
     new 3c73819  HDFS-14120. [SBN read] ORFPP should also clone DT for the virtual IP. Contributed by Chen Liang.
     new 0705e83  HDFS-14131. [SBN read] Create user guide for Consistent Reads from Observer feature. Contributed by Chao Sun.
     new 68da1e4  HDFS-14142. Move ipfailover config key out of HdfsClientConfigKeys. Contributed by Chen Liang.
     new a86d955  HDFS-13873. [SBN read] ObserverNode should reject read requests when it is too far behind. Contributed by Konstantin Shvachko.
     new 49bdc53  HDFS-14138. [SBN read] Description errors in the comparison logic of transaction ID. Contributed by xiangheng.
     new 7b1a3b5  HDFS-14146. [SBN read] Handle exceptions from and prevent handler threads from blocking within internalQueueCall. Contributed by Chao Sun.
     new 705e1c8  HDFS-14116. [SBN read] Fix class cast error in NNThroughputBenchmark with ObserverReadProxyProvider. Contributed by Chao Sun.
     new 41e85cc  HDFS-14149. [SBN read] Fix annotations on new interfaces/classes for SBN reads. Contributed by Chao Sun.
     new 3ec2ff7  HDFS-14160. [SBN read] ObserverReadInvocationHandler should implement RpcInvocationHandler. Contributed by Konstantin V Shvachko.
     new 8cf1c0b  HDFS-14154. [SBN read] Document dfs.ha.tail-edits.period in user guide. Contributed by Chao Sun.
     new 3804b8e  HDFS-14170. [SBN read] Fix checkstyle warnings related to SBN reads. Contributed by Konstantin V Shvachko.
     new b247a8b  [SBN read] Addendum: Misc fix to be Java 7 compatible
     new a0327f5  HDFS-14250. [SBN read]. msync should always direct to active NameNode to get latest stateID. Contributed by Chao Sun.
     new 3b2b97a6 HDFS-14317. Ensure checkpoints are created when in-progress edit log tailing is enabled with a period shorter than the log roll period. Contributed by Ekanth Sethuramalingam.
     new c055e78  HDFS-14272. [SBN read] Make ObserverReadProxyProvider initialize its state ID against the active NN on startup. Contributed by Erik Krogen.
     new 5190fd6  HDFS-14211. [SBN Read]. Add a configurable flag to enable always-msync mode to ObserverReadProxyProvider. Contributed by Erik Krogen.
     new c377540  HDFS-14435. [SBN Read] Enable ObserverReadProxyProvider to gracefully handle StandbyException when fetching HAServiceState. Contributed by Erik Krogen.
     new 2fe1505  HDFS-14279. [SBN read] Fix race condition in ObserverReadProxyProvider. Contributed by Erik Krogen.
     new 9599c91  HDFS-14537. Journaled Edits Cache is not cleared when formatting the JN. Contributed by Ranith Sardar.
     new 12dc7ff  HDFS-12836. startTxId could be greater than endTxId when tailing in-progress edit log. Contributed by Chao Sun.
     new 0977101  [SBN read] Addendum: Misc fix of issues, javadoc, whitespace unused backported fields etc

The 54 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/hadoop/ha/FailoverController.java   |   2 +-
 .../main/java/org/apache/hadoop/ha/HAAdmin.java    |  43 ++
 .../org/apache/hadoop/ha/HAServiceProtocol.java    |  18 +
 .../apache/hadoop/ha/HAServiceProtocolHelper.java  |   9 +
 .../java/org/apache/hadoop/ha/HAServiceTarget.java |   7 +
 .../HAServiceProtocolClientSideTranslatorPB.java   |  16 +
 .../HAServiceProtocolServerSideTranslatorPB.java   |  20 +
 .../main/java/org/apache/hadoop/io/IOUtils.java    |  14 +-
 .../org/apache/hadoop/io/MultipleIOException.java  |  10 +
 .../hadoop/io/retry/RetryInvocationHandler.java    |   5 +
 .../org/apache/hadoop/ipc/AlignmentContext.java    |  96 +++++
 .../main/java/org/apache/hadoop/ipc/Client.java    |  38 +-
 .../java/org/apache/hadoop/ipc/ExternalCall.java   |   3 +-
 .../hadoop/ipc/ObserverRetryOnActiveException.java |  37 ++
 .../org/apache/hadoop/ipc/ProtobufRpcEngine.java   |  28 +-
 .../src/main/java/org/apache/hadoop/ipc/RPC.java   |  49 ++-
 .../main/java/org/apache/hadoop/ipc/RpcEngine.java |   8 +-
 .../main/java/org/apache/hadoop/ipc/Server.java    | 137 +++++-
 .../org/apache/hadoop/ipc/WritableRpcEngine.java   |  47 ++-
 .../org/apache/hadoop/log/LogThrottlingHelper.java |  18 +
 .../java/org/apache/hadoop/util/ProtoUtil.java     |  13 +
 .../src/main/proto/HAServiceProtocol.proto         |  20 +
 .../hadoop-common/src/main/proto/RpcHeader.proto   |   2 +
 .../hadoop-common/src/site/markdown/Metrics.md     |   5 +
 .../java/org/apache/hadoop/ha/DummyHAService.java  |  18 +-
 .../java/org/apache/hadoop/ha/MiniZKFCCluster.java |   4 +
 .../java/org/apache/hadoop/io/TestIOUtils.java     |  33 ++
 .../test/java/org/apache/hadoop/ipc/TestRPC.java   |   8 +-
 .../org/apache/hadoop/hdfs/ClientGSIContext.java   | 104 +++++
 .../java/org/apache/hadoop/hdfs/DFSClient.java     |  27 ++
 .../apache/hadoop/hdfs/NameNodeProxiesClient.java  |  54 ++-
 .../hadoop/hdfs/protocol/ClientProtocol.java       |  58 +++
 .../ClientNamenodeProtocolTranslatorPB.java        |  37 ++
 .../ha/AbstractNNFailoverProxyProvider.java        |  19 +-
 .../server/namenode/ha/ClientHAProxyFactory.java   |  12 +
 .../namenode/ha/IPFailoverProxyProvider.java       |   2 +-
 .../namenode/ha/ObserverReadProxyProvider.java     | 470 +++++++++++++++++++++
 .../ObserverReadProxyProviderWithIPFailover.java   | 142 +++++++
 .../hadoop/hdfs/server/namenode/ha/ReadOnly.java   |  57 +++
 .../src/main/proto/ClientNamenodeProtocol.proto    |  18 +
 .../apache/hadoop/hdfs/protocol/TestReadOnly.java  |  95 +++++
 .../resolver/FederationNamenodeServiceState.java   |   3 +
 .../federation/router/RouterClientProtocol.java    |  15 +
 .../server/federation/router/RouterRpcServer.java  |  15 +
 .../bkjournal/BookKeeperJournalManager.java        |  10 +-
 .../java/org/apache/hadoop/hdfs/DFSConfigKeys.java |   9 +-
 ...ientNamenodeProtocolServerSideTranslatorPB.java |  49 +++
 .../apache/hadoop/hdfs/protocolPB/PBHelper.java    |  10 +-
 .../hadoop/hdfs/qjournal/client/AsyncLogger.java   |   7 +
 .../hdfs/qjournal/client/AsyncLoggerSet.java       |  14 +
 .../hdfs/qjournal/client/IPCLoggerChannel.java     |  14 +
 .../hdfs/qjournal/client/QuorumJournalManager.java | 163 ++++++-
 .../hdfs/qjournal/protocol/QJournalProtocol.java   |  23 +-
 .../QJournalProtocolServerSideTranslatorPB.java    |  13 +
 .../protocolPB/QJournalProtocolTranslatorPB.java   |  17 +
 .../hadoop/hdfs/qjournal/server/Journal.java       |  93 +++-
 .../hdfs/qjournal/server/JournalMetrics.java       |  20 +-
 .../hadoop/hdfs/qjournal/server/JournalNode.java   |   5 +
 .../hdfs/qjournal/server/JournalNodeRpcServer.java |   7 +
 .../hdfs/qjournal/server/JournaledEditsCache.java  | 417 ++++++++++++++++++
 .../hdfs/server/common/HdfsServerConstants.java    |   4 +-
 .../hdfs/server/datanode/BPServiceActor.java       |   2 +-
 .../hdfs/server/namenode/BackupJournalManager.java |   2 +-
 .../server/namenode/EditLogFileInputStream.java    |  44 ++
 .../hadoop/hdfs/server/namenode/FSEditLog.java     |  31 +-
 .../hdfs/server/namenode/FSEditLogLoader.java      |  45 +-
 .../hadoop/hdfs/server/namenode/FSImage.java       |  19 +-
 .../hadoop/hdfs/server/namenode/FSNamesystem.java  |  31 +-
 .../hdfs/server/namenode/FileJournalManager.java   |   9 +-
 .../hdfs/server/namenode/GlobalStateIdContext.java | 160 +++++++
 .../hadoop/hdfs/server/namenode/JournalSet.java    |  11 +-
 .../hadoop/hdfs/server/namenode/LogsPurgeable.java |   6 +-
 .../server/namenode/NNStorageRetentionManager.java |   2 +-
 .../hadoop/hdfs/server/namenode/NameNode.java      |  41 +-
 .../hdfs/server/namenode/NameNodeRpcServer.java    |  26 +-
 .../namenode/RedundantEditLogInputStream.java      |  15 +-
 .../hdfs/server/namenode/SecondaryNameNode.java    |   2 +-
 .../hdfs/server/namenode/ha/EditLogTailer.java     |  26 +-
 .../hdfs/server/namenode/ha/StandbyState.java      |  19 +-
 .../server/protocol/RemoteEditLogManifest.java     |  19 +-
 .../hadoop/hdfs/tools/NNHAServiceTarget.java       |   5 +
 .../hadoop-hdfs/src/main/proto/HdfsServer.proto    |   2 +
 .../src/main/proto/QJournalProtocol.proto          |  17 +
 .../src/main/resources/hdfs-default.xml            |  24 +-
 .../hadoop-hdfs/src/site/markdown/HDFSCommands.md  |   2 +
 .../site/markdown/HDFSHighAvailabilityWithQJM.md   |  42 +-
 .../src/site/markdown/ObserverNameNode.md          | 231 ++++++++++
 .../java/org/apache/hadoop/hdfs/DFSTestUtil.java   |  12 +-
 .../org/apache/hadoop/hdfs/MiniDFSCluster.java     |  16 +-
 .../hdfs/TestStateAlignmentContextWithHA.java      | 350 +++++++++++++++
 .../hadoop/hdfs/protocolPB/TestPBHelper.java       |   2 +-
 .../hadoop/hdfs/qjournal/MiniQJMHACluster.java     |   4 +-
 .../qjournal/client/TestQuorumJournalManager.java  | 161 ++++++-
 .../client/TestQuorumJournalManagerUnit.java       | 103 ++++-
 .../hdfs/qjournal/server/JournalTestUtil.java      |  48 +++
 .../hadoop/hdfs/qjournal/server/TestJournal.java   |  50 ++-
 .../qjournal/server/TestJournaledEditsCache.java   | 260 ++++++++++++
 .../server/namenode/NNThroughputBenchmark.java     |   6 +-
 .../hdfs/server/namenode/NameNodeAdapter.java      |  13 +
 .../hadoop/hdfs/server/namenode/TestEditLog.java   |  18 +-
 .../namenode/TestEditLogFileInputStream.java       |  18 +
 .../hdfs/server/namenode/TestFSEditLogLoader.java  |  47 +++
 .../server/namenode/TestFileJournalManager.java    |   2 +-
 .../hadoop/hdfs/server/namenode/TestFsck.java      |   2 +-
 .../server/namenode/TestGenericJournalConf.java    |   2 +-
 .../namenode/TestNNStorageRetentionManager.java    |   4 +-
 .../hadoop/hdfs/server/namenode/ha/HATestUtil.java | 147 ++++++-
 .../namenode/ha/TestConsistentReadsObserver.java   | 414 ++++++++++++++++++
 .../namenode/ha/TestDelegationTokensWithHA.java    |  50 +++
 .../hdfs/server/namenode/ha/TestEditLogTailer.java |  90 +++-
 .../server/namenode/ha/TestFailureToReadEdits.java |  19 +-
 .../server/namenode/ha/TestMultiObserverNode.java  | 159 +++++++
 .../hdfs/server/namenode/ha/TestObserverNode.java  | 379 +++++++++++++++++
 .../namenode/ha/TestObserverReadProxyProvider.java | 403 ++++++++++++++++++
 .../namenode/ha/TestStandbyInProgressTail.java     | 468 ++++++++++++++++++++
 .../apache/hadoop/hdfs/tools/TestDFSHAAdmin.java   |  19 +-
 .../hdfs/tools/TestDFSHAAdminMiniCluster.java      |  44 ++
 .../yarn/server/resourcemanager/AdminService.java  |   7 +
 118 files changed, 6670 insertions(+), 191 deletions(-)
 create mode 100644 hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/AlignmentContext.java
 create mode 100644 hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/ObserverRetryOnActiveException.java
 create mode 100644 hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/ClientGSIContext.java
 create mode 100644 hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProvider.java
 create mode 100644 hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProviderWithIPFailover.java
 create mode 100644 hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ReadOnly.java
 create mode 100644 hadoop-hdfs-project/hadoop-hdfs-client/src/test/java/org/apache/hadoop/hdfs/protocol/TestReadOnly.java
 create mode 100644 hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/JournaledEditsCache.java
 create mode 100644 hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/GlobalStateIdContext.java
 create mode 100644 hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/ObserverNameNode.md
 create mode 100644 hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestStateAlignmentContextWithHA.java
 create mode 100644 hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/server/JournalTestUtil.java
 create mode 100644 hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/server/TestJournaledEditsCache.java
 create mode 100644 hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestConsistentReadsObserver.java
 create mode 100644 hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestMultiObserverNode.java
 create mode 100644 hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestObserverNode.java
 create mode 100644 hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestObserverReadProxyProvider.java
 create mode 100644 hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestStandbyInProgressTail.java


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org