From 34e9173c00f7e1ae55dec365850849c793cde8e3 Mon Sep 17 00:00:00 2001 From: Arpit Agarwal Date: Thu, 12 Jun 2014 01:27:39 +0000 Subject: [PATCH] HADOOP-10376. Refactor refresh*Protocols into a single generic refreshConfigProtocol. (Contributed by Chris Li) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1602055 13f79535-47bb-0310-9956-ffa450edef68 --- .../hadoop-common/CHANGES.txt | 3 + .../dev-support/findbugsExcludeFile.xml | 4 + hadoop-common-project/hadoop-common/pom.xml | 1 + .../hadoop/fs/CommonConfigurationKeys.java | 3 + .../hadoop/ipc/GenericRefreshProtocol.java | 49 ++++ .../org/apache/hadoop/ipc/RefreshHandler.java | 35 +++ .../apache/hadoop/ipc/RefreshRegistry.java | 134 +++++++++++ .../apache/hadoop/ipc/RefreshResponse.java | 78 ++++++ ...RefreshProtocolClientSideTranslatorPB.java | 119 +++++++++ .../protocolPB/GenericRefreshProtocolPB.java | 37 +++ ...RefreshProtocolServerSideTranslatorPB.java | 84 +++++++ .../main/proto/GenericRefreshProtocol.proto | 61 +++++ .../hadoop/hdfs/HDFSPolicyProvider.java | 6 +- .../server/namenode/NameNodeRpcServer.java | 20 ++ .../server/protocol/NamenodeProtocols.java | 2 + .../apache/hadoop/hdfs/tools/DFSAdmin.java | 77 +++++- .../org/apache/hadoop/TestGenericRefresh.java | 227 ++++++++++++++++++ 17 files changed, 938 insertions(+), 2 deletions(-) create mode 100644 hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/GenericRefreshProtocol.java create mode 100644 hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/RefreshHandler.java create mode 100644 hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/RefreshRegistry.java create mode 100644 hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/RefreshResponse.java create mode 100644 hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/protocolPB/GenericRefreshProtocolClientSideTranslatorPB.java create mode 100644 hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/protocolPB/GenericRefreshProtocolPB.java create mode 100644 hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/protocolPB/GenericRefreshProtocolServerSideTranslatorPB.java create mode 100644 hadoop-common-project/hadoop-common/src/main/proto/GenericRefreshProtocol.proto create mode 100644 hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/TestGenericRefresh.java diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 8e524a487b..8f26a3b56f 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -417,6 +417,9 @@ Release 2.5.0 - UNRELEASED TCP RST and miss session expiration event due to bug in client connection management. (cnauroth) + HADOOP-10376. Refactor refresh*Protocols into a single generic + refreshConfigProtocol. (Chris Li via Arpit Agarwal) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-common-project/hadoop-common/dev-support/findbugsExcludeFile.xml b/hadoop-common-project/hadoop-common/dev-support/findbugsExcludeFile.xml index e8f80dd396..e0b217118d 100644 --- a/hadoop-common-project/hadoop-common/dev-support/findbugsExcludeFile.xml +++ b/hadoop-common-project/hadoop-common/dev-support/findbugsExcludeFile.xml @@ -287,6 +287,10 @@ + + + +