hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cnaur...@apache.org
Subject [2/2] hadoop git commit: HDFS-9414. Refactor reconfiguration of ClientDatanodeProtocol for reusability. Contributed by Xiaobing Zhou.
Date Tue, 08 Dec 2015 19:01:39 GMT
HDFS-9414. Refactor reconfiguration of ClientDatanodeProtocol for reusability. Contributed
by Xiaobing Zhou.

(cherry picked from commit 303f80e6567023985f00e5f33ff41a7bbb4d6072)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/1072be12
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/1072be12
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/1072be12

Branch: refs/heads/branch-2
Commit: 1072be12b9fca3ced631f2b1113e6932d57efc20
Parents: 3b10ff6
Author: cnauroth <cnauroth@apache.org>
Authored: Tue Dec 8 10:49:32 2015 -0800
Committer: cnauroth <cnauroth@apache.org>
Committed: Tue Dec 8 10:50:13 2015 -0800

----------------------------------------------------------------------
 .../hdfs/protocol/ReconfigurationProtocol.java    |  2 +-
 .../protocolPB/ReconfigurationProtocolPB.java     | 14 +++++++-------
 .../protocolPB/ReconfigurationProtocolUtils.java  |  2 +-
 .../hadoop/hdfs/protocolPB/package-info.java      | 18 ++++++++++++++++++
 .../ReconfigurationProtocolServerSideUtils.java   |  2 +-
 .../hadoop/hdfs/server/datanode/DataNode.java     |  2 +-
 6 files changed, 29 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/1072be12/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ReconfigurationProtocol.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ReconfigurationProtocol.java
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ReconfigurationProtocol.java
index a22192c..75dc877 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ReconfigurationProtocol.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ReconfigurationProtocol.java
@@ -34,7 +34,7 @@ import org.apache.hadoop.conf.ReconfigurationTaskStatus;
 @InterfaceStability.Evolving
 public interface ReconfigurationProtocol {
 
-  long versionID = 1L;
+  long VERSIONID = 1L;
 
   /**
    * Asynchronously reload configuration on disk and apply changes.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/1072be12/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocolPB/ReconfigurationProtocolPB.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocolPB/ReconfigurationProtocolPB.java
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocolPB/ReconfigurationProtocolPB.java
index 659edac..95f05b2 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocolPB/ReconfigurationProtocolPB.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocolPB/ReconfigurationProtocolPB.java
@@ -24,13 +24,6 @@ import org.apache.hadoop.ipc.ProtocolInfo;
 import org.apache.hadoop.security.KerberosInfo;
 import org.apache.hadoop.hdfs.protocol.proto.ReconfigurationProtocolProtos.ReconfigurationProtocolService;
 
-@KerberosInfo(serverPrincipal =
-    CommonConfigurationKeys.HADOOP_SECURITY_SERVICE_USER_NAME_KEY)
-@ProtocolInfo(
-    protocolName = "org.apache.hadoop.hdfs.protocol.ReconfigurationProtocol",
-    protocolVersion = 1)
-@InterfaceAudience.Public
-@InterfaceStability.Evolving
 /**
  * Protocol that clients use to communicate with the NN/DN to do
  * reconfiguration on the fly.
@@ -38,6 +31,13 @@ import org.apache.hadoop.hdfs.protocol.proto.ReconfigurationProtocolProtos.Recon
  * Note: This extends the protocolbuffer service based interface to
  * add annotations required for security.
  */
+@KerberosInfo(serverPrincipal =
+    CommonConfigurationKeys.HADOOP_SECURITY_SERVICE_USER_NAME_KEY)
+@ProtocolInfo(
+    protocolName = "org.apache.hadoop.hdfs.protocol.ReconfigurationProtocol",
+    protocolVersion = 1)
+@InterfaceAudience.Public
+@InterfaceStability.Evolving
 public interface ReconfigurationProtocolPB extends
     ReconfigurationProtocolService.BlockingInterface {
 }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/1072be12/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocolPB/ReconfigurationProtocolUtils.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocolPB/ReconfigurationProtocolUtils.java
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocolPB/ReconfigurationProtocolUtils.java
index a3fead9..71195c8 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocolPB/ReconfigurationProtocolUtils.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocolPB/ReconfigurationProtocolUtils.java
@@ -32,7 +32,7 @@ import com.google.common.collect.Maps;
  * This is a client side utility class that handles
  * common logic to to parameter reconfiguration.
  */
-public class ReconfigurationProtocolUtils {
+public final class ReconfigurationProtocolUtils {
   private ReconfigurationProtocolUtils() {
   }
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/1072be12/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocolPB/package-info.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocolPB/package-info.java
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocolPB/package-info.java
new file mode 100644
index 0000000..6233024
--- /dev/null
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocolPB/package-info.java
@@ -0,0 +1,18 @@
+/**
+ * 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.hdfs.protocolPB;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/1072be12/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolPB/ReconfigurationProtocolServerSideUtils.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolPB/ReconfigurationProtocolServerSideUtils.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolPB/ReconfigurationProtocolServerSideUtils.java
index 29c7326..b2be9cd 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolPB/ReconfigurationProtocolServerSideUtils.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolPB/ReconfigurationProtocolServerSideUtils.java
@@ -32,7 +32,7 @@ import com.google.common.base.Optional;
  * This is a server side utility class that handles
  * common logic to to parameter reconfiguration.
  */
-public class ReconfigurationProtocolServerSideUtils {
+public final class ReconfigurationProtocolServerSideUtils {
   private ReconfigurationProtocolServerSideUtils() {
   }
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/1072be12/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
index ef69773..b247500 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
@@ -925,7 +925,7 @@ public class DataNode extends ReconfigurableBase
         .setSecretManager(blockPoolTokenSecretManager).build();
 
     ReconfigurationProtocolServerSideTranslatorPB reconfigurationProtocolXlator
-      = new ReconfigurationProtocolServerSideTranslatorPB(this);
+        = new ReconfigurationProtocolServerSideTranslatorPB(this);
     service = ReconfigurationProtocolService
         .newReflectiveBlockingService(reconfigurationProtocolXlator);
     DFSUtil.addPBProtocol(conf, ReconfigurationProtocolPB.class, service,


Mime
View raw message