Skip to content
Open
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
38 changes: 37 additions & 1 deletion fe/fe-thrift/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,23 @@ under the License.
<artifactId>fe</artifactId>
<relativePath>../pom.xml</relativePath>
</parent>
<properties>
<doris.thrift.executable>${project.parent.basedir}/../thirdparty/installed/bin/thrift</doris.thrift.executable>
<doris.thrift.source>${project.parent.basedir}/../gensrc/thrift</doris.thrift.source>
</properties>
<profiles>
<profile>
<id>thrift-executable-override</id>
<activation>
<property>
<name>env.DORIS_THIRDPARTY</name>
</property>
</activation>
<properties>
<doris.thrift.executable>${env.DORIS_THIRDPARTY}/installed/bin/thrift</doris.thrift.executable>
</properties>
</profile>
</profiles>
<artifactId>fe-thrift</artifactId>
<packaging>jar</packaging>
<name>Doris FE Generated Thrift RPC</name>
Expand All @@ -40,7 +57,7 @@ under the License.
</dependencies>

<build>
<finalName>doris-fe-catalog</finalName>
<finalName>doris-fe-thrift</finalName>
<directory>${project.basedir}/target/</directory>
<plugins>
<!-- Build source jar -->
Expand All @@ -59,6 +76,25 @@ under the License.
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.thrift</groupId>
<artifactId>thrift-maven-plugin</artifactId>
<version>0.10.0</version>
<configuration>
<generator>java:fullcamel</generator>
<thriftExecutable>${doris.thrift.executable}</thriftExecutable>
<thriftSourceRoot>${doris.thrift.source}</thriftSourceRoot>
</configuration>
<executions>
<execution>
<id>thrift-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
2 changes: 1 addition & 1 deletion fe/fe-type/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ under the License.
</dependencies>

<build>
<finalName>doris-fe-catalog</finalName>
<finalName>doris-fe-type</finalName>
<directory>${project.basedir}/target/</directory>
<plugins>
<!-- Build source jar -->
Expand Down
2 changes: 0 additions & 2 deletions generated-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ rm -rf "${DORIS_HOME}/fe/fe-thrift/src/main/java/org/apache/doris/thrift" "${DOR
rm -rf "${DORIS_HOME}/fe/fe-common/src/main/java/org/apache/doris/thrift" "${DORIS_HOME}/fe/fe-common/src/main/java/org/apache/parquet"
rm -rf "${DORIS_HOME}/fe/fe-core/src/main/java/org/apache/doris/thrift" "${DORIS_HOME}/fe/fe-core/src/main/java/org/apache/parquet"

cp -r "build/gen_java/org/apache/doris/thrift" "${DORIS_HOME}/fe/fe-thrift/src/main/java/org/apache/doris"
cp -r "build/gen_java/org/apache/parquet" "${DORIS_HOME}/fe/fe-thrift/src/main/java/org/apache/"
cd "${DORIS_HOME}/"
echo "Done"
exit 0
9 changes: 0 additions & 9 deletions gensrc/thrift/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,10 @@ GEN_OBJECTS = $(patsubst ${BUILD_DIR}/thrift/%.thrift, ${BUILD_DIR}/gen_cpp/%_ty
all: ${GEN_OBJECTS} ${OBJECTS}
.PHONY: all

$(shell mkdir -p ${BUILD_DIR}/gen_java)

THRIFT_CPP_ARGS = -I ${CURDIR} -I ${BUILD_DIR}/thrift/ --gen cpp:moveable_types,no_skeleton -out ${BUILD_DIR}/gen_cpp --allow-64bit-consts -strict
THRIFT_JAVA_ARGS = -I ${CURDIR} -I ${BUILD_DIR}/thrift/ --gen java:fullcamel -out ${BUILD_DIR}/gen_java --allow-64bit-consts -strict

${BUILD_DIR}/gen_cpp:
mkdir -p $@
# handwrite thrift
${BUILD_DIR}/gen_cpp/%_types.cpp: ${CURDIR}/%.thrift | ${BUILD_DIR}/gen_cpp
${THRIFT} ${THRIFT_CPP_ARGS} $<
${THRIFT} ${THRIFT_JAVA_ARGS} $<

# generated thrift
${BUILD_DIR}/gen_cpp/%_types.cpp: ${BUILD_DIR}/thrift/%.thrift | ${BUILD_DIR}/gen_cpp
${THRIFT} ${THRIFT_CPP_ARGS} $<
${THRIFT} ${THRIFT_JAVA_ARGS} $<
34 changes: 34 additions & 0 deletions regression-test/framework/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ under the License.
</mailingLists>
<properties>
<doris.home>${basedir}/../../</doris.home>
<doris.thrift.executable>${doris.home}/thirdparty/installed/bin/thrift</doris.thrift.executable>
<doris.thrift.source>${doris.home}/gensrc/thrift</doris.thrift.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
Expand All @@ -78,6 +80,19 @@ under the License.
<!-- Arrow 18 only supports jdk17 -->
<arrow.version>17.0.0</arrow.version>
</properties>
<profiles>
<profile>
<id>thrift-executable-override</id>
<activation>
<property>
<name>env.DORIS_THIRDPARTY</name>
</property>
</activation>
<properties>
<doris.thrift.executable>${env.DORIS_THIRDPARTY}/installed/bin/thrift</doris.thrift.executable>
</properties>
</profile>
</profiles>
<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -157,6 +172,25 @@ under the License.
<visitor>true</visitor>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.thrift</groupId>
<artifactId>thrift-maven-plugin</artifactId>
<version>0.10.0</version>
<configuration>
<generator>java:fullcamel</generator>
<thriftExecutable>${doris.thrift.executable}</thriftExecutable>
<thriftSourceRoot>${doris.thrift.source}</thriftSourceRoot>
</configuration>
<executions>
<execution>
<id>thrift-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
11 changes: 1 addition & 10 deletions run-regression-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,6 @@ if ! test -f ${RUN_JAR:+${RUN_JAR}}; then
return 1
}

# Build generated code
cd "${DORIS_HOME}/gensrc/thrift" || { echo "Failed to change directory"; exit 1; }
if ! make; then
echo "Make command failed in ${DORIS_HOME}/gensrc/thrift"
exit 1
fi

cp -rf "${DORIS_HOME}/gensrc/build/gen_java/org/apache/doris/thrift" "${FRAMEWORK_APACHE_DIR}/doris/"

# Navigate to framework directory and build with retry
cd "${DORIS_HOME}/regression-test/framework" || { echo "Failed to change directory"; exit 1; }

Expand Down Expand Up @@ -327,4 +318,4 @@ if [[ "${ONLY_COMPILE}" -eq 0 ]]; then
-jar ${RUN_JAR:+${RUN_JAR}} \
-cf "${CONFIG_FILE}" \
${REGRESSION_OPTIONS_PREFIX:+${REGRESSION_OPTIONS_PREFIX}} "$@"
fi
fi
Loading