Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,4 @@ tools/single-node-cluster/fe*
data_test

/conf/log4j2-spring.xml
/fe/fe-core/src/test/resources/real-help-resource.zip
2 changes: 1 addition & 1 deletion be/src/agent/task_worker_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1647,7 +1647,7 @@ Status TaskWorkerPool::_move_dir(const TTabletId tablet_id, const std::string& s
return loader.move(src, tablet, overwrite);
}

void TaskWorkerPool::_handle_report(TReportRequest& request, ReportType type) {
void TaskWorkerPool::_handle_report(const TReportRequest& request, ReportType type) {
TMasterResult result;
Status status = MasterServerClient::instance()->report(request, &result);
bool is_report_success = false;
Expand Down
2 changes: 1 addition & 1 deletion be/src/agent/task_worker_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class TaskWorkerPool {

void _alter_tablet(const TAgentTaskRequest& alter_tablet_request, int64_t signature,
const TTaskType::type task_type, TFinishTaskRequest* finish_task_request);
void _handle_report(TReportRequest& request, ReportType type);
void _handle_report(const TReportRequest& request, ReportType type);

Status _get_tablet_info(const TTabletId tablet_id, const TSchemaHash schema_hash,
int64_t signature, TTabletInfo* tablet_info);
Expand Down
75 changes: 5 additions & 70 deletions be/src/gen_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,78 +19,13 @@
set(LIBRARY_OUTPUT_PATH "${BUILD_DIR}/src/gen_cpp")

set (GEN_CPP_DIR ${GENSRC_DIR}/gen_cpp)
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
file(GLOB SRC_FILES CONFIGURE_DEPENDS
${GEN_CPP_DIR}/*.cpp
${GEN_CPP_DIR}/*.cc
)

add_compile_options(-Wno-return-type)

# keep everything in one library, the object files reference
# each other
add_library(DorisGen STATIC ${SRC_FILES})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,13 @@ public ThriftServerContext(TNetworkAddress clientAddress) {
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'");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,10 @@ private void handleQuery(ConnectContext context, String requestDb, String reques
tQueryPlanInfo.tablet_info = tabletInfo;

// serialize TQueryPlanInfo and encode plan with Base64 to string in order to translate by json format
TSerializer serializer = new TSerializer();
TSerializer serializer;
String opaquedQueryPlan;
try {
serializer = new TSerializer();
byte[] queryPlanStream = serializer.serialize(tQueryPlanInfo);
opaquedQueryPlan = Base64.getEncoder().encodeToString(queryPlanStream);
} catch (TException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.protocol.TCompactProtocol;
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 org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -653,7 +653,12 @@ private void open() throws MetaException {
throw new MetaException(e.toString());
}
} else {
transport = new TSocket(store.getHost(), store.getPort(), clientSocketTimeout);
try {
transport = new TSocket(store.getHost(), store.getPort(), clientSocketTimeout);
} catch (TTransportException e) {
tte = e;
throw new MetaException(e.toString());
}
}

if (useSasl) {
Expand Down Expand Up @@ -691,7 +696,12 @@ private void open() throws MetaException {
}
} else {
if (useFramedTransport) {
transport = new TFramedTransport(transport);
try {
transport = new TFramedTransport(transport);
} catch (TTransportException e) {
tte = e;
throw new MetaException(e.toString());
}
}
}

Expand Down
6 changes: 3 additions & 3 deletions fe/java-udf/src/main/java/org/apache/doris/udf/JniUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ public static String throwableToStackTrace(Throwable t) {
* 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());
Expand All @@ -103,8 +103,8 @@ public static String throwableToStackTrace(Throwable t) {
*/
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());
Expand All @@ -122,8 +122,8 @@ public static String throwableToStackTrace(Throwable t) {
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());
Expand Down
2 changes: 1 addition & 1 deletion fe/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.13.0</thrift.version>
<thrift.version>0.16.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>
Expand Down
2 changes: 1 addition & 1 deletion fs_brokers/apache_hdfs_broker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ under the License.
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<version>0.13.0</version>
<version>0.16.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api -->
<dependency>
Expand Down
3 changes: 3 additions & 0 deletions thirdparty/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

This file contains version of the third-party dependency libraries in the build-env image. The docker build-env image is apache/doris, and the tag is `build-env-${version}`

## v20230228
- Modified: thrift 0.13 -> 0.16

## v20230221
- Modified: clucene 2.4.4 -> 2.4.6

Expand Down
6 changes: 3 additions & 3 deletions thirdparty/build-thirdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
cxxflags="-I${TP_INCLUDE_DIR} ${warning_unused_but_set_variable} -Wno-inconsistent-missing-override"
ldflags="-L${TP_LIB_DIR} --static"
else
cflags="-I${TP_INCLUDE_DIR} -Wno-implicit-function-declaration"
cxxflags="-I${TP_INCLUDE_DIR} ${warning_unused_but_set_variable}"
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"
ldflags="-L${TP_LIB_DIR}"
fi

Expand Down
8 changes: 4 additions & 4 deletions thirdparty/vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ OPENSSL_SOURCE=openssl-OpenSSL_1_1_1s
OPENSSL_MD5SUM="7e79a7560dee77c0758baa33c61af4b4"

# thrift
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"
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"

# protobuf
PROTOBUF_DOWNLOAD="https://github.com/google/protobuf/archive/v3.15.0.tar.gz"
Expand Down