This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch doris-for-zhongjin
in repository https://gitbox.apache.org/repos/asf/doris.git

commit f1b96574bd1a62eb5b1272a87e9d61ca9d61c101
Author: morningman <morning...@163.com>
AuthorDate: Tue Apr 4 11:56:33 2023 +0800

    Revert "[Chore](third-party) upgrade thrift from 0.13 to 0.16 (#17202)"
    
    This reverts commit 1a549edac2a83c8ca20bf6cea8fc0415b12f407c.
---
 .gitignore                                         |  1 -
 be/src/agent/task_worker_pool.cpp                  |  2 +-
 be/src/agent/task_worker_pool.h                    |  2 +-
 be/src/gen_cpp/CMakeLists.txt                      | 75 ++++++++++++++++++++--
 .../java/org/apache/doris/common/GenericPool.java  |  2 +-
 .../apache/doris/common/ThriftServerContext.java   |  9 ---
 .../doris/common/ThriftServerEventProcessor.java   |  2 +-
 .../doris/httpv2/rest/TableQueryPlanAction.java    |  3 +-
 .../main/java/org/apache/doris/udf/JniUtil.java    |  6 +-
 fe/pom.xml                                         |  2 +-
 fs_brokers/apache_hdfs_broker/pom.xml              |  2 +-
 thirdparty/build-thirdparty.sh                     |  6 +-
 thirdparty/vars.sh                                 |  8 +--
 13 files changed, 87 insertions(+), 33 deletions(-)

diff --git a/.gitignore b/.gitignore
index ff1ab08882..6f1eabc5c7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -100,4 +100,3 @@ data_test
 lru_cache_test
 
 /conf/log4j2-spring.xml
-/fe/fe-core/src/test/resources/real-help-resource.zip
diff --git a/be/src/agent/task_worker_pool.cpp 
b/be/src/agent/task_worker_pool.cpp
index 9fe680ea96..8d7fefda00 100644
--- a/be/src/agent/task_worker_pool.cpp
+++ b/be/src/agent/task_worker_pool.cpp
@@ -1662,7 +1662,7 @@ Status TaskWorkerPool::_move_dir(const TTabletId 
tablet_id, const std::string& s
     return loader.move(src, tablet, overwrite);
 }
 
-void TaskWorkerPool::_handle_report(const TReportRequest& request, ReportType 
type) {
+void TaskWorkerPool::_handle_report(TReportRequest& request, ReportType type) {
     TMasterResult result;
     Status status = MasterServerClient::instance()->report(request, &result);
     bool is_report_success = false;
diff --git a/be/src/agent/task_worker_pool.h b/be/src/agent/task_worker_pool.h
index 3ea664014e..d583a02495 100644
--- a/be/src/agent/task_worker_pool.h
+++ b/be/src/agent/task_worker_pool.h
@@ -203,7 +203,7 @@ private:
 
     void _alter_tablet(const TAgentTaskRequest& alter_tablet_request, int64_t 
signature,
                        const TTaskType::type task_type, TFinishTaskRequest* 
finish_task_request);
-    void _handle_report(const TReportRequest& request, ReportType type);
+    void _handle_report(TReportRequest& request, ReportType type);
 
     Status _get_tablet_info(const TTabletId tablet_id, const TSchemaHash 
schema_hash,
                             int64_t signature, TTabletInfo* tablet_info);
diff --git a/be/src/gen_cpp/CMakeLists.txt b/be/src/gen_cpp/CMakeLists.txt
index 0b4d42da5a..e9bc3cd793 100644
--- a/be/src/gen_cpp/CMakeLists.txt
+++ b/be/src/gen_cpp/CMakeLists.txt
@@ -19,13 +19,78 @@
 set(LIBRARY_OUTPUT_PATH "${BUILD_DIR}/src/gen_cpp")
 
 set (GEN_CPP_DIR ${GENSRC_DIR}/gen_cpp)
-file(GLOB SRC_FILES CONFIGURE_DEPENDS
-    ${GEN_CPP_DIR}/*.cpp
-    ${GEN_CPP_DIR}/*.cc
+set(SRC_FILES
+    ${GEN_CPP_DIR}/AgentService_constants.cpp
+    ${GEN_CPP_DIR}/AgentService_types.cpp
+    ${GEN_CPP_DIR}/BackendService_constants.cpp
+    ${GEN_CPP_DIR}/BackendService.cpp
+    ${GEN_CPP_DIR}/BackendService_types.cpp
+    ${GEN_CPP_DIR}/PaloBrokerService_types.cpp
+    ${GEN_CPP_DIR}/TDorisExternalService.cpp
+    ${GEN_CPP_DIR}/DorisExternalService_types.cpp
+    ${GEN_CPP_DIR}/DorisExternalService_constants.cpp
+    ${GEN_CPP_DIR}/QueryPlanExtra_types.cpp
+    ${GEN_CPP_DIR}/QueryPlanExtra_constants.cpp
+    ${GEN_CPP_DIR}/TPaloBrokerService.cpp
+    ${GEN_CPP_DIR}/HeartbeatService_constants.cpp
+    ${GEN_CPP_DIR}/HeartbeatService.cpp
+    ${GEN_CPP_DIR}/HeartbeatService_types.cpp
+    ${GEN_CPP_DIR}/PaloInternalService_constants.cpp
+    ${GEN_CPP_DIR}/PaloInternalService_types.cpp
+    ${GEN_CPP_DIR}/FrontendService.cpp
+    ${GEN_CPP_DIR}/FrontendService_constants.cpp
+    ${GEN_CPP_DIR}/FrontendService_types.cpp
+    ${GEN_CPP_DIR}/PaloService_constants.cpp
+    ${GEN_CPP_DIR}/PaloService_types.cpp
+    ${GEN_CPP_DIR}/Data_constants.cpp
+    ${GEN_CPP_DIR}/Data_types.cpp
+    ${GEN_CPP_DIR}/DataSinks_constants.cpp
+    ${GEN_CPP_DIR}/DataSinks_types.cpp
+    ${GEN_CPP_DIR}/Ddl_constants.cpp
+    ${GEN_CPP_DIR}/Ddl_types.cpp
+    ${GEN_CPP_DIR}/Descriptors_constants.cpp
+    ${GEN_CPP_DIR}/Descriptors_types.cpp
+    ${GEN_CPP_DIR}/Exprs_constants.cpp
+    ${GEN_CPP_DIR}/Exprs_types.cpp
+    ${GEN_CPP_DIR}/MasterService_constants.cpp
+    ${GEN_CPP_DIR}/MasterService_types.cpp
+    ${GEN_CPP_DIR}/MetricDefs_constants.cpp
+    ${GEN_CPP_DIR}/MetricDefs_types.cpp
+    ${GEN_CPP_DIR}/Metrics_constants.cpp
+    ${GEN_CPP_DIR}/Metrics_types.cpp
+    ${GEN_CPP_DIR}/NetworkTest_constants.cpp
+    ${GEN_CPP_DIR}/NetworkTest_types.cpp
+    ${GEN_CPP_DIR}/NetworkTestService.cpp
+    ${GEN_CPP_DIR}/Opcodes_constants.cpp
+    ${GEN_CPP_DIR}/Opcodes_types.cpp
+    ${GEN_CPP_DIR}/PlanNodes_constants.cpp
+    ${GEN_CPP_DIR}/PlanNodes_types.cpp
+    ${GEN_CPP_DIR}/Partitions_constants.cpp
+    ${GEN_CPP_DIR}/Partitions_types.cpp
+    ${GEN_CPP_DIR}/Planner_constants.cpp
+    ${GEN_CPP_DIR}/Planner_types.cpp
+    ${GEN_CPP_DIR}/RuntimeProfile_constants.cpp
+    ${GEN_CPP_DIR}/RuntimeProfile_types.cpp
+    ${GEN_CPP_DIR}/Status_constants.cpp
+    ${GEN_CPP_DIR}/Status_types.cpp
+    ${GEN_CPP_DIR}/Types_constants.cpp
+    ${GEN_CPP_DIR}/Types_types.cpp
+    ${GEN_CPP_DIR}/olap_common.pb.cc
+    ${GEN_CPP_DIR}/olap_file.pb.cc
+    ${GEN_CPP_DIR}/column_data_file.pb.cc
+    ${GEN_CPP_DIR}/data.pb.cc
+    ${GEN_CPP_DIR}/descriptors.pb.cc
+    ${GEN_CPP_DIR}/internal_service.pb.cc
+    ${GEN_CPP_DIR}/function_service.pb.cc
+    ${GEN_CPP_DIR}/types.pb.cc
+    ${GEN_CPP_DIR}/segment_v2.pb.cc
+    ${GEN_CPP_DIR}/parquet_constants.cpp
+    ${GEN_CPP_DIR}/parquet_types.cpp
+    #$${GEN_CPP_DIR}/opcode/functions.cc
+    #$${GEN_CPP_DIR}/opcode/vector-functions.cc
+    #$${GEN_CPP_DIR}/opcode/opcode-registry-init.cc
 )
 
-add_compile_options(-Wno-return-type)
-
 # keep everything in one library, the object files reference 
 # each other
 add_library(DorisGen STATIC ${SRC_FILES})
diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/GenericPool.java 
b/fe/fe-core/src/main/java/org/apache/doris/common/GenericPool.java
index 35a3198616..86d381f27a 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/common/GenericPool.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/common/GenericPool.java
@@ -28,10 +28,10 @@ import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import org.apache.thrift.protocol.TBinaryProtocol;
 import org.apache.thrift.protocol.TProtocol;
+import org.apache.thrift.transport.TFramedTransport;
 import org.apache.thrift.transport.TSocket;
 import org.apache.thrift.transport.TTransport;
 import org.apache.thrift.transport.TTransportException;
-import org.apache.thrift.transport.layered.TFramedTransport;
 
 import java.lang.reflect.Constructor;
 
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/common/ThriftServerContext.java 
b/fe/fe-core/src/main/java/org/apache/doris/common/ThriftServerContext.java
index f6d0433221..3237f72302 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/common/ThriftServerContext.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/common/ThriftServerContext.java
@@ -34,13 +34,4 @@ public class ThriftServerContext implements ServerContext {
     public TNetworkAddress getClient() {
         return client;
     }
-
-    public boolean isWrapperFor(Class<?> iface) {
-        return false;
-    }
-
-    @Override
-    public <T> T unwrap(Class<T> iface) {
-        throw new UnsupportedOperationException("Unimplemented method 
'unwrap'");
-    }
 }
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/common/ThriftServerEventProcessor.java
 
b/fe/fe-core/src/main/java/org/apache/doris/common/ThriftServerEventProcessor.java
index 33228cd1a1..253eaf5ee5 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/common/ThriftServerEventProcessor.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/common/ThriftServerEventProcessor.java
@@ -25,9 +25,9 @@ import org.apache.logging.log4j.Logger;
 import org.apache.thrift.protocol.TProtocol;
 import org.apache.thrift.server.ServerContext;
 import org.apache.thrift.server.TServerEventHandler;
+import org.apache.thrift.transport.TFramedTransport;
 import org.apache.thrift.transport.TSocket;
 import org.apache.thrift.transport.TTransport;
-import org.apache.thrift.transport.layered.TFramedTransport;
 
 import java.net.InetSocketAddress;
 import java.net.SocketAddress;
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/TableQueryPlanAction.java
 
b/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/TableQueryPlanAction.java
index 6d42f4a338..fa051b983f 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/TableQueryPlanAction.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/TableQueryPlanAction.java
@@ -236,10 +236,9 @@ public class TableQueryPlanAction extends 
RestBaseController {
         tQueryPlanInfo.tablet_info = tabletInfo;
 
         // serialize TQueryPlanInfo and encode plan with Base64 to string in 
order to translate by json format
-        TSerializer serializer;
+        TSerializer serializer = new TSerializer();
         String opaquedQueryPlan;
         try {
-            serializer = new TSerializer();
             byte[] queryPlanStream = serializer.serialize(tQueryPlanInfo);
             opaquedQueryPlan = 
Base64.getEncoder().encodeToString(queryPlanStream);
         } catch (TException e) {
diff --git a/fe/java-udf/src/main/java/org/apache/doris/udf/JniUtil.java 
b/fe/java-udf/src/main/java/org/apache/doris/udf/JniUtil.java
index af1cf6e3b0..d949b85586 100644
--- a/fe/java-udf/src/main/java/org/apache/doris/udf/JniUtil.java
+++ b/fe/java-udf/src/main/java/org/apache/doris/udf/JniUtil.java
@@ -90,8 +90,8 @@ public class JniUtil {
      * Serializes input into a byte[] using the default protocol factory.
      */
     public static <T extends TBase<?, ?>> byte[] serializeToThrift(T input) 
throws InternalException {
+        TSerializer serializer = new TSerializer(protocolFactory_);
         try {
-            TSerializer serializer = new TSerializer(protocolFactory_);
             return serializer.serialize(input);
         } catch (TException e) {
             throw new InternalException(e.getMessage());
@@ -103,8 +103,8 @@ public class JniUtil {
      */
     public static <T extends TBase<?, ?>, F extends TProtocolFactory> byte[] 
serializeToThrift(
             T input, F protocolFactory) throws InternalException {
+        TSerializer serializer = new TSerializer(protocolFactory);
         try {
-            TSerializer serializer = new TSerializer(protocolFactory);
             return serializer.serialize(input);
         } catch (TException e) {
             throw new InternalException(e.getMessage());
@@ -122,8 +122,8 @@ public class JniUtil {
     public static <T extends TBase<?, ?>, F extends TProtocolFactory> void 
deserializeThrift(
             F protocolFactory, T result, byte[] thriftData) throws 
InternalException {
         // TODO: avoid creating deserializer for each query?
+        TDeserializer deserializer = new TDeserializer(protocolFactory);
         try {
-            TDeserializer deserializer = new TDeserializer(protocolFactory);
             deserializer.deserialize(result, thriftData);
         } catch (TException e) {
             throw new InternalException(e.getMessage());
diff --git a/fe/pom.xml b/fe/pom.xml
index 99648531da..59759046eb 100644
--- a/fe/pom.xml
+++ b/fe/pom.xml
@@ -189,7 +189,7 @@ under the License.
         <json-simple.version>1.1.1</json-simple.version>
         <junit.version>5.8.2</junit.version>
         <druid.version>1.2.5</druid.version>
-        <thrift.version>0.16.0</thrift.version>
+        <thrift.version>0.13.0</thrift.version>
         <tomcat-embed-core.version>8.5.86</tomcat-embed-core.version>
         <log4j2.version>2.18.0</log4j2.version>
         <log4j-1.2.version>2.18.0</log4j-1.2.version>
diff --git a/fs_brokers/apache_hdfs_broker/pom.xml 
b/fs_brokers/apache_hdfs_broker/pom.xml
index b67c119fc9..bea0443d56 100644
--- a/fs_brokers/apache_hdfs_broker/pom.xml
+++ b/fs_brokers/apache_hdfs_broker/pom.xml
@@ -252,7 +252,7 @@ under the License.
         <dependency>
             <groupId>org.apache.thrift</groupId>
             <artifactId>libthrift</artifactId>
-            <version>0.16.0</version>
+            <version>0.13.0</version>
         </dependency>
         <!-- 
https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api -->
         <dependency>
diff --git a/thirdparty/build-thirdparty.sh b/thirdparty/build-thirdparty.sh
index 5b365033fd..258461144e 100755
--- a/thirdparty/build-thirdparty.sh
+++ b/thirdparty/build-thirdparty.sh
@@ -367,11 +367,11 @@ build_thrift() {
 
     if [[ "${KERNEL}" != 'Darwin' ]]; then
         cflags="-I${TP_INCLUDE_DIR}"
-        cxxflags="-I${TP_INCLUDE_DIR} ${warning_unused_but_set_variable} 
-Wno-inconsistent-missing-override"
+        cxxflags="-I${TP_INCLUDE_DIR} ${warning_unused_but_set_variable}"
         ldflags="-L${TP_LIB_DIR} --static"
     else
-        cflags="-I${TP_INCLUDE_DIR} -Wno-implicit-function-declaration 
-Wno-inconsistent-missing-override"
-        cxxflags="-I${TP_INCLUDE_DIR} ${warning_unused_but_set_variable} 
-Wno-inconsistent-missing-override"
+        cflags="-I${TP_INCLUDE_DIR} -Wno-implicit-function-declaration"
+        cxxflags="-I${TP_INCLUDE_DIR} ${warning_unused_but_set_variable}"
         ldflags="-L${TP_LIB_DIR}"
     fi
 
diff --git a/thirdparty/vars.sh b/thirdparty/vars.sh
index 247dcf2aea..94870003d0 100644
--- a/thirdparty/vars.sh
+++ b/thirdparty/vars.sh
@@ -73,10 +73,10 @@ OPENSSL_SOURCE=openssl-OpenSSL_1_1_1s
 OPENSSL_MD5SUM="7e79a7560dee77c0758baa33c61af4b4"
 
 # thrift
-THRIFT_DOWNLOAD="http://archive.apache.org/dist/thrift/0.16.0/thrift-0.16.0.tar.gz";
-THRIFT_NAME=thrift-0.16.0.tar.gz
-THRIFT_SOURCE=thrift-0.16.0
-THRIFT_MD5SUM="44cf1b54b4ec1890576c85804acfa637"
+THRIFT_DOWNLOAD="http://archive.apache.org/dist/thrift/0.13.0/thrift-0.13.0.tar.gz";
+THRIFT_NAME=thrift-0.13.0.tar.gz
+THRIFT_SOURCE=thrift-0.13.0
+THRIFT_MD5SUM="38a27d391a2b03214b444cb13d5664f1"
 
 # protobuf
 PROTOBUF_DOWNLOAD="https://github.com/google/protobuf/archive/v3.15.0.tar.gz";


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to