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 jh...@apache.org on 2017/07/10 18:00:07 UTC

hadoop git commit: HDFS-11908: libhdfs++: Authentication failure when first NN of a kerberized HA cluster is standby. Contributed by James Clampffer

Repository: hadoop
Updated Branches:
  refs/heads/HDFS-8707 d8ffe0a34 -> 80a159d52


HDFS-11908: libhdfs++: Authentication failure when first NN of a kerberized HA cluster is standby.  Contributed by James Clampffer


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

Branch: refs/heads/HDFS-8707
Commit: 80a159d52dd1f5c9d3bb5c62c10df121c33d19af
Parents: d8ffe0a
Author: James Clampffer <ja...@hp.com>
Authored: Mon Jul 10 13:47:51 2017 -0400
Committer: James Clampffer <ja...@hp.com>
Committed: Mon Jul 10 13:47:51 2017 -0400

----------------------------------------------------------------------
 .../src/main/native/libhdfspp/lib/rpc/rpc_connection.h    |  1 +
 .../main/native/libhdfspp/lib/rpc/rpc_connection_impl.cc  |  5 +++++
 .../src/main/native/libhdfspp/lib/rpc/rpc_engine.cc       | 10 ++++++----
 3 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/80a159d5/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection.h
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection.h
index 7a671fe..449a1b6 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection.h
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection.h
@@ -80,6 +80,7 @@ class RpcConnection : public std::enable_shared_from_this<RpcConnection> {
 
   void SetEventHandlers(std::shared_ptr<LibhdfsEvents> event_handlers);
   void SetClusterName(std::string cluster_name);
+  void SetAuthInfo(const AuthInfo& auth_info);
 
   LockFreeRpcEngine *engine() { return engine_; }
   ::asio::io_service &io_service();

http://git-wip-us.apache.org/repos/asf/hadoop/blob/80a159d5/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection_impl.cc
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection_impl.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection_impl.cc
index 198bcdc..06b1616 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection_impl.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection_impl.cc
@@ -383,6 +383,11 @@ void RpcConnection::SetClusterName(std::string cluster_name) {
   cluster_name_ = cluster_name;
 }
 
+void RpcConnection::SetAuthInfo(const AuthInfo& auth_info) {
+  std::lock_guard<std::mutex> state_lock(connection_state_lock_);
+  auth_info_ = auth_info;
+}
+
 void RpcConnection::CommsError(const Status &status) {
   assert(lock_held(connection_state_lock_));  // Must be holding lock before calling
   LOG_DEBUG(kRPC, << "RpcConnection::CommsError called");

http://git-wip-us.apache.org/repos/asf/hadoop/blob/80a159d5/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_engine.cc
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_engine.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_engine.cc
index 22c0e74..98c41da 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_engine.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_engine.cc
@@ -176,10 +176,12 @@ std::shared_ptr<RpcConnection> RpcEngine::NewConnection()
 
 std::shared_ptr<RpcConnection> RpcEngine::InitializeConnection()
 {
-  std::shared_ptr<RpcConnection> result = NewConnection();
-  result->SetEventHandlers(event_handlers_);
-  result->SetClusterName(cluster_name_);
-  return result;
+  std::shared_ptr<RpcConnection> newConn = NewConnection();
+  newConn->SetEventHandlers(event_handlers_);
+  newConn->SetClusterName(cluster_name_);
+  newConn->SetAuthInfo(auth_info_);
+
+  return newConn;
 }
 
 void RpcEngine::AsyncRpcCommsError(


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