You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2019/04/04 17:09:09 UTC
[impala] 07/12: IMPALA-4669: [KRPC] Add kudu_rpc library to build
This is an automated email from the ASF dual-hosted git repository.
tarmstrong pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/impala.git
commit d10b34354c0d1616ed2faf78a6659e9be4aacd66
Author: Lars Volker <lv...@cloudera.com>
AuthorDate: Tue Jul 3 17:00:51 2018 -0700
IMPALA-4669: [KRPC] Add kudu_rpc library to build
NOTE: This commit is part of a set of changes for IMPALA-7006. It
contains pieces of a previous commit that need to be cherry picked
again after rebasing the code in be/src/kudu/{util,security,rpc}.
The original commit message is below:
Import FindKRPC.cmake from Apache Kudu.
Add some files to protoc-gen-krpc link to allow it to find symbols now
defined within Impala (without linking all of Impala's libraries).
Change-Id: I5693288db90f2e9673b8c88ca4378c3790cba957
Reviewed-on: http://gerrit.cloudera.org:8080/5719
Reviewed-by: Henry Robinson <he...@cloudera.com>
Tested-by: Impala Public Jenkins
Reviewed-on: http://gerrit.cloudera.org:8080/10760
Reviewed-by: Lars Volker <lv...@cloudera.com>
Tested-by: Lars Volker <lv...@cloudera.com>
---
be/src/kudu/rpc/CMakeLists.txt | 9 ++++++++-
be/src/rpc/impala-service-pool.cc | 2 +-
be/src/rpc/rpc-mgr-test-base.h | 1 +
be/src/runtime/krpc-data-stream-mgr.cc | 1 +
4 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/be/src/kudu/rpc/CMakeLists.txt b/be/src/kudu/rpc/CMakeLists.txt
index f8cdb02..91dd484 100644
--- a/be/src/kudu/rpc/CMakeLists.txt
+++ b/be/src/kudu/rpc/CMakeLists.txt
@@ -89,13 +89,20 @@ ADD_EXPORTABLE_LIBRARY(krpc
DEPS ${KRPC_LIBS})
### RPC generator tool
-add_executable(protoc-gen-krpc protoc-gen-krpc.cc)
+add_executable(protoc-gen-krpc protoc-gen-krpc.cc
+ # Impala - add stub for kudu::VersionInfo
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../common/kudu_version.cc
+ # Impala - add definition for any flag names shared between Impala / Kudu.
+ # TODO: Consider either removing code that depends on these flags, or namespacing them
+ # somehow.
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../common/global-flags.cc)
target_link_libraries(protoc-gen-krpc
${KUDU_BASE_LIBS}
rpc_header_proto
protoc
protobuf
gutil
+ libunwind
kudu_util)
#### RPC test
diff --git a/be/src/rpc/impala-service-pool.cc b/be/src/rpc/impala-service-pool.cc
index 02c2fe0..cb406b9 100644
--- a/be/src/rpc/impala-service-pool.cc
+++ b/be/src/rpc/impala-service-pool.cc
@@ -220,7 +220,7 @@ void ImpalaServicePool::RunThread() {
}
// We need to call RecordHandlingStarted() to update the InboundCall timing.
- incoming->RecordHandlingStarted(incoming_queue_time_);
+ incoming->RecordHandlingStarted(incoming_queue_time_.get());
ADOPT_TRACE(incoming->trace());
if (UNLIKELY(incoming->ClientTimedOut())) {
diff --git a/be/src/rpc/rpc-mgr-test-base.h b/be/src/rpc/rpc-mgr-test-base.h
index f994fd8..872e408 100644
--- a/be/src/rpc/rpc-mgr-test-base.h
+++ b/be/src/rpc/rpc-mgr-test-base.h
@@ -38,6 +38,7 @@
#include "gen-cpp/rpc_test.proxy.h"
#include "gen-cpp/rpc_test.service.h"
+#include "gen-cpp/rpc_test.pb.h"
#include "common/names.h"
diff --git a/be/src/runtime/krpc-data-stream-mgr.cc b/be/src/runtime/krpc-data-stream-mgr.cc
index 2aca6c8..bc490dd 100644
--- a/be/src/runtime/krpc-data-stream-mgr.cc
+++ b/be/src/runtime/krpc-data-stream-mgr.cc
@@ -23,6 +23,7 @@
#include <boost/thread/thread.hpp>
#include "kudu/rpc/rpc_context.h"
+#include "kudu/util/net/sockaddr.h"
#include "exec/kudu-util.h"
#include "runtime/exec-env.h"