You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by ya...@apache.org on 2021/07/30 01:23:07 UTC
[incubator-doris] branch master updated: remove
palo_internal_service.proto and PInternalService from code base,
because it is not used now (#6341)
This is an automated email from the ASF dual-hosted git repository.
yangzhg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 5a72370 remove palo_internal_service.proto and PInternalService from code base, because it is not used now (#6341)
5a72370 is described below
commit 5a7237062f6274df0f5e4bc7f6a926eed03c522f
Author: Zhengguo Yang <ya...@gmail.com>
AuthorDate: Fri Jul 30 09:22:50 2021 +0800
remove palo_internal_service.proto and PInternalService from code base, because it is not used now (#6341)
---
be/src/gen_cpp/CMakeLists.txt | 1 -
be/src/runtime/data_stream_mgr.h | 2 +-
be/src/service/brpc_service.cpp | 2 --
be/src/service/internal_service.cpp | 43 ++++++++++++-------------------
be/src/service/internal_service.h | 24 ++++++-----------
gensrc/proto/internal_service.proto | 2 --
gensrc/proto/palo_internal_service.proto | 44 --------------------------------
7 files changed, 26 insertions(+), 92 deletions(-)
diff --git a/be/src/gen_cpp/CMakeLists.txt b/be/src/gen_cpp/CMakeLists.txt
index d3543c8..cc6d52b 100644
--- a/be/src/gen_cpp/CMakeLists.txt
+++ b/be/src/gen_cpp/CMakeLists.txt
@@ -84,7 +84,6 @@ set(SRC_FILES
${GEN_CPP_DIR}/data.pb.cc
${GEN_CPP_DIR}/descriptors.pb.cc
${GEN_CPP_DIR}/internal_service.pb.cc
- ${GEN_CPP_DIR}/palo_internal_service.pb.cc
${GEN_CPP_DIR}/types.pb.cc
${GEN_CPP_DIR}/status.pb.cc
${GEN_CPP_DIR}/segment_v2.pb.cc
diff --git a/be/src/runtime/data_stream_mgr.h b/be/src/runtime/data_stream_mgr.h
index a8f3e87..6bbeda8 100644
--- a/be/src/runtime/data_stream_mgr.h
+++ b/be/src/runtime/data_stream_mgr.h
@@ -29,7 +29,7 @@
#include "common/object_pool.h"
#include "common/status.h"
#include "gen_cpp/Types_types.h" // for TUniqueId
-#include "gen_cpp/palo_internal_service.pb.h"
+#include "gen_cpp/internal_service.pb.h"
#include "runtime/descriptors.h" // for PlanNodeId
#include "runtime/mem_tracker.h"
#include "runtime/query_statistics.h"
diff --git a/be/src/service/brpc_service.cpp b/be/src/service/brpc_service.cpp
index 424844d..0189891 100644
--- a/be/src/service/brpc_service.cpp
+++ b/be/src/service/brpc_service.cpp
@@ -44,8 +44,6 @@ Status BRpcService::start(int port) {
// Add service
_server->AddService(new PInternalServiceImpl<PBackendService>(_exec_env),
brpc::SERVER_OWNS_SERVICE);
- _server->AddService(new PInternalServiceImpl<palo::PInternalService>(_exec_env),
- brpc::SERVER_OWNS_SERVICE);
// start service
brpc::ServerOptions options;
if (config::brpc_num_threads != -1) {
diff --git a/be/src/service/internal_service.cpp b/be/src/service/internal_service.cpp
index e4c1eca..7afb8c8 100644
--- a/be/src/service/internal_service.cpp
+++ b/be/src/service/internal_service.cpp
@@ -40,10 +40,8 @@ DEFINE_GAUGE_METRIC_PROTOTYPE_2ARG(add_batch_task_queue_size, MetricUnit::NOUNIT
template <typename T>
PInternalServiceImpl<T>::PInternalServiceImpl(ExecEnv* exec_env)
: _exec_env(exec_env), _tablet_worker_pool(config::number_tablet_writer_threads, 10240) {
- REGISTER_HOOK_METRIC(add_batch_task_queue_size, [this]() {
- return _tablet_worker_pool.get_queue_size();
- });
-
+ REGISTER_HOOK_METRIC(add_batch_task_queue_size,
+ [this]() { return _tablet_worker_pool.get_queue_size(); });
}
template <typename T>
@@ -107,8 +105,7 @@ void PInternalServiceImpl<T>::tablet_writer_add_batch(google::protobuf::RpcContr
PTabletWriterAddBatchResult* response,
google::protobuf::Closure* done) {
VLOG_RPC << "tablet writer add batch, id=" << request->id()
- << ", index_id=" << request->index_id()
- << ", sender_id=" << request->sender_id()
+ << ", index_id=" << request->index_id() << ", sender_id=" << request->sender_id()
<< ", current_queued_size=" << _tablet_worker_pool.get_queue_size();
// add batch maybe cost a lot of time, and this callback thread will be held.
// this will influence query execution, because the pthreads under bthread may be
@@ -299,10 +296,9 @@ void PInternalServiceImpl<T>::apply_filter(::google::protobuf::RpcController* co
st.to_protobuf(response->mutable_status());
}
-template<typename T>
+template <typename T>
void PInternalServiceImpl<T>::send_data(google::protobuf::RpcController* controller,
- const PSendDataRequest* request,
- PSendDataResult* response,
+ const PSendDataRequest* request, PSendDataResult* response,
google::protobuf::Closure* done) {
brpc::ClosureGuard closure_guard(done);
TUniqueId fragment_instance_id;
@@ -316,16 +312,16 @@ void PInternalServiceImpl<T>::send_data(google::protobuf::RpcController* control
for (int i = 0; i < request->data_size(); ++i) {
PDataRow* row = new PDataRow();
row->CopyFrom(request->data(i));
- pipe->append_and_flush(reinterpret_cast<char*>(&row), sizeof(row), sizeof(row) + row->ByteSize());
+ pipe->append_and_flush(reinterpret_cast<char*>(&row), sizeof(row),
+ sizeof(row) + row->ByteSize());
}
response->mutable_status()->set_status_code(0);
}
}
-template<typename T>
+template <typename T>
void PInternalServiceImpl<T>::commit(google::protobuf::RpcController* controller,
- const PCommitRequest* request,
- PCommitResult* response,
+ const PCommitRequest* request, PCommitResult* response,
google::protobuf::Closure* done) {
brpc::ClosureGuard closure_guard(done);
TUniqueId fragment_instance_id;
@@ -341,10 +337,9 @@ void PInternalServiceImpl<T>::commit(google::protobuf::RpcController* controller
}
}
-template<typename T>
+template <typename T>
void PInternalServiceImpl<T>::rollback(google::protobuf::RpcController* controller,
- const PRollbackRequest* request,
- PRollbackResult* response,
+ const PRollbackRequest* request, PRollbackResult* response,
google::protobuf::Closure* done) {
brpc::ClosureGuard closure_guard(done);
TUniqueId fragment_instance_id;
@@ -360,13 +355,11 @@ void PInternalServiceImpl<T>::rollback(google::protobuf::RpcController* controll
}
}
-template<typename T>
-void PInternalServiceImpl<T>::fold_constant_expr(
- google::protobuf::RpcController* cntl_base,
- const PConstantExprRequest* request,
- PConstantExprResult* response,
- google::protobuf::Closure* done) {
-
+template <typename T>
+void PInternalServiceImpl<T>::fold_constant_expr(google::protobuf::RpcController* cntl_base,
+ const PConstantExprRequest* request,
+ PConstantExprResult* response,
+ google::protobuf::Closure* done) {
brpc::ClosureGuard closure_guard(done);
brpc::Controller* cntl = static_cast<brpc::Controller*>(cntl_base);
@@ -383,10 +376,9 @@ void PInternalServiceImpl<T>::fold_constant_expr(
st.to_protobuf(response->mutable_status());
}
-template<typename T>
+template <typename T>
Status PInternalServiceImpl<T>::_fold_constant_expr(const std::string& ser_request,
PConstantExprResult* response) {
-
TFoldConstantParams t_request;
{
const uint8_t* buf = (const uint8_t*)ser_request.data();
@@ -398,6 +390,5 @@ Status PInternalServiceImpl<T>::_fold_constant_expr(const std::string& ser_reque
}
template class PInternalServiceImpl<PBackendService>;
-template class PInternalServiceImpl<palo::PInternalService>;
} // namespace doris
diff --git a/be/src/service/internal_service.h b/be/src/service/internal_service.h
index 9a4f240..16722f7 100644
--- a/be/src/service/internal_service.h
+++ b/be/src/service/internal_service.h
@@ -19,7 +19,6 @@
#include "common/status.h"
#include "gen_cpp/internal_service.pb.h"
-#include "gen_cpp/palo_internal_service.pb.h"
#include "runtime/cache/result_cache.h"
#include "util/priority_thread_pool.hpp"
@@ -87,27 +86,20 @@ public:
const ::doris::PMergeFilterRequest* request,
::doris::PMergeFilterResponse* response,
::google::protobuf::Closure* done) override;
-
+
void apply_filter(::google::protobuf::RpcController* controller,
const ::doris::PPublishFilterRequest* request,
::doris::PPublishFilterResponse* response,
::google::protobuf::Closure* done) override;
- void send_data(google::protobuf::RpcController* controller,
- const PSendDataRequest* request,
- PSendDataResult* response,
- google::protobuf::Closure* done);
- void commit(google::protobuf::RpcController* controller,
- const PCommitRequest* request,
- PCommitResult* response,
- google::protobuf::Closure* done);
- void rollback(google::protobuf::RpcController* controller,
- const PRollbackRequest* request,
- PRollbackResult* response,
- google::protobuf::Closure* done);
+ void send_data(google::protobuf::RpcController* controller, const PSendDataRequest* request,
+ PSendDataResult* response, google::protobuf::Closure* done);
+ void commit(google::protobuf::RpcController* controller, const PCommitRequest* request,
+ PCommitResult* response, google::protobuf::Closure* done);
+ void rollback(google::protobuf::RpcController* controller, const PRollbackRequest* request,
+ PRollbackResult* response, google::protobuf::Closure* done);
void fold_constant_expr(google::protobuf::RpcController* controller,
- const PConstantExprRequest* request,
- PConstantExprResult* response,
+ const PConstantExprRequest* request, PConstantExprResult* response,
google::protobuf::Closure* done) override;
private:
diff --git a/gensrc/proto/internal_service.proto b/gensrc/proto/internal_service.proto
index 4ebb671..b792fc0 100644
--- a/gensrc/proto/internal_service.proto
+++ b/gensrc/proto/internal_service.proto
@@ -377,8 +377,6 @@ message PConstantExprResult {
map<string, PExprResultMap> expr_result_map = 2;
};
-// NOTE(zc): If you want to add new method here,
-// you MUST add same method to palo_internal_service.proto
service PBackendService {
rpc transmit_data(PTransmitDataParams) returns (PTransmitDataResult);
rpc exec_plan_fragment(PExecPlanFragmentRequest) returns (PExecPlanFragmentResult);
diff --git a/gensrc/proto/palo_internal_service.proto b/gensrc/proto/palo_internal_service.proto
deleted file mode 100644
index 8439f4a..0000000
--- a/gensrc/proto/palo_internal_service.proto
+++ /dev/null
@@ -1,44 +0,0 @@
-// 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.
-
-// NOTE(XXX): DEPRECATED, just use to compatiple with old version.
-// Make system can grayscale upgrade
-syntax="proto2";
-
-import "internal_service.proto";
-
-package palo;
-option java_package = "org.apache.doris.proto";
-
-option cc_generic_services = true;
-
-service PInternalService {
- rpc transmit_data(doris.PTransmitDataParams) returns (doris.PTransmitDataResult);
- rpc exec_plan_fragment(doris.PExecPlanFragmentRequest) returns (doris.PExecPlanFragmentResult);
- rpc cancel_plan_fragment(doris.PCancelPlanFragmentRequest) returns (doris.PCancelPlanFragmentResult);
- rpc fetch_data(doris.PFetchDataRequest) returns (doris.PFetchDataResult);
- rpc tablet_writer_open(doris.PTabletWriterOpenRequest) returns (doris.PTabletWriterOpenResult);
- rpc tablet_writer_add_batch(doris.PTabletWriterAddBatchRequest) returns (doris.PTabletWriterAddBatchResult);
- rpc tablet_writer_cancel(doris.PTabletWriterCancelRequest) returns (doris.PTabletWriterCancelResult);
- rpc get_info(doris.PProxyRequest) returns (doris.PProxyResult);
- rpc update_cache(doris.PUpdateCacheRequest) returns (doris.PCacheResponse);
- rpc fetch_cache(doris.PFetchCacheRequest) returns (doris.PFetchCacheResult);
- rpc clear_cache(doris.PClearCacheRequest) returns (doris.PCacheResponse);
- rpc merge_filter(doris.PMergeFilterRequest) returns (doris.PMergeFilterResponse);
- rpc apply_filter(doris.PPublishFilterRequest) returns (doris.PPublishFilterResponse);
- rpc fold_constant_expr(doris.PConstantExprRequest) returns (doris.PConstantExprResult);
-};
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org