1. Apache HDFS broker support HDFS HA and Hadoop kerberos authentication. 2. New Backup and Restore function. Use Fs Broker to backup your data to HDFS or restore them from HDFS. 3. Table-Level Privileges. Grant fine-grained privileges on table-level to specified user. 4. A lot of bugs fixed. 5. Performance improvement.
248 lines
10 KiB
XML
248 lines
10 KiB
XML
<?xml version="1.0"?>
|
|
|
|
<!--
|
|
# Copyright (c) 2017, Baidu.com, Inc. All Rights Reserved
|
|
|
|
# Licensed 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.
|
|
-->
|
|
|
|
<project name="palo-fe" default="jar" basedir=".">
|
|
<property environment="env" />
|
|
<!-- set global properties for this build -->
|
|
<property name="libdir" value="${basedir}/../thirdparty/installed/lib/jar"/>
|
|
<property name="kudulibdir" value="${basedir}/../thirdparty/installed/lib/jar/kudu-client"/>
|
|
<property name="k8slibdir" value="${basedir}/../thirdparty/installed/lib/jar/k8s-client"/>
|
|
<property name="builddir" value="${basedir}/build/"/>
|
|
<property name="genjavadir" value="${basedir}/../gensrc/build/java"/>
|
|
<property name="outputdir" value="${basedir}/output/"/>
|
|
|
|
<echo message="${builddir}"/>
|
|
<target name="clean">
|
|
<delete quiet="true" dir="${builddir}"/>
|
|
<delete quiet="true" dir="${outputdir}"/>
|
|
</target>
|
|
|
|
<target name="prepare">
|
|
<mkdir dir="${builddir}"/>
|
|
<mkdir dir="${builddir}/compile"/>
|
|
<mkdir dir="${builddir}/compile/src"/>
|
|
<mkdir dir="${builddir}/compile/test"/>
|
|
</target>
|
|
|
|
<target name="gensrc">
|
|
<exec executable="make" failonerror="true" >
|
|
<arg line="-C ${basedir}/../gensrc" />
|
|
</exec>
|
|
</target>
|
|
|
|
<!-- classpath -->
|
|
<path id="classpathid">
|
|
<pathelement location="${builddir}/compile/src"/>
|
|
<fileset dir="${libdir}">
|
|
<include name="*.jar" />
|
|
</fileset>
|
|
<fileset dir="${kudulibdir}">
|
|
<include name="*.jar" />
|
|
</fileset>
|
|
<fileset dir="${k8slibdir}">
|
|
<include name="*.jar" />
|
|
</fileset>
|
|
</path>
|
|
|
|
<!-- compile source files. -->
|
|
<target name="compile-src" depends="prepare, gensrc">
|
|
<javac executable="${env.JAVA_HOME}/bin/javac" destdir="${builddir}/compile/src" source="1.8" includeantruntime="false" debug="true" failonerror="true" debuglevel="lines,vars,source" encoding="UTF-8">
|
|
<classpath refid="classpathid"/>
|
|
<src path="src"/>
|
|
<src path="${genjavadir}"/>
|
|
</javac>
|
|
<!-- copy dat file of cup and default log4j2.xml -->
|
|
<copy todir="${builddir}/compile/src/com/baidu/palo/analysis">
|
|
<fileset dir="${genjavadir}/com/baidu/palo/analysis">
|
|
<include name="*.dat"/>
|
|
</fileset>
|
|
</copy>
|
|
<copy todir="${builddir}/compile/src/">
|
|
<fileset dir="${basedir}/src/com/baidu/palo/common">
|
|
<include name="log4j2.xml"/>
|
|
</fileset>
|
|
</copy>
|
|
</target>
|
|
|
|
<!-- create the jar file -->
|
|
<target name="jar" depends="compile-src">
|
|
<jar jarfile="${builddir}/palo-fe.jar">
|
|
<fileset dir="${builddir}/compile/src">
|
|
<include name="**/*.class" />
|
|
<include name="**/*.dat" />
|
|
<include name="log4j2.xml"/>
|
|
</fileset>
|
|
</jar>
|
|
</target>
|
|
|
|
<!-- install fe -->
|
|
<target name="install" depends="jar">
|
|
<mkdir dir="${outputdir}" />
|
|
<mkdir dir="${outputdir}/bin" />
|
|
<mkdir dir="${outputdir}/conf" />
|
|
<mkdir dir="${outputdir}/lib" />
|
|
<mkdir dir="${outputdir}/lib/kudu-client" />
|
|
<mkdir dir="${outputdir}/lib/k8s-client" />
|
|
<mkdir dir="${outputdir}/webroot" />
|
|
|
|
<exec executable="cp">
|
|
<arg line="-rp ${basedir}/../bin/start_fe.sh ${outputdir}/bin/" />
|
|
</exec>
|
|
<exec executable="cp">
|
|
<arg line="-rp ${basedir}/../bin/stop_fe.sh ${outputdir}/bin/" />
|
|
</exec>
|
|
<copy todir="${outputdir}/conf" >
|
|
<fileset dir="${basedir}/../conf/" includes="fe.conf" />
|
|
</copy>
|
|
<copy todir="${outputdir}/lib" >
|
|
<fileset dir="${basedir}/../docs/build/" includes="help-resource.zip" />
|
|
</copy>
|
|
<copy todir="${outputdir}/lib" >
|
|
<fileset dir="${builddir}/" includes="palo-fe.jar" />
|
|
<fileset dir="${libdir}" includes="*.jar" />
|
|
</copy>
|
|
<copy todir="${outputdir}/lib/kudu-client" >
|
|
<fileset dir="${kudulibdir}/" includes="*.jar"/>
|
|
</copy>
|
|
<copy todir="${outputdir}/lib/k8s-client" >
|
|
<fileset dir="${k8slibdir}/" includes="*.jar"/>
|
|
</copy>
|
|
<copy todir="${outputdir}/webroot" >
|
|
<fileset dir="${basedir}/../webroot/" />
|
|
</copy>
|
|
</target>
|
|
|
|
<!-- compile all the test java source files -->
|
|
<target name="compile-test" depends="prepare, compile-src">
|
|
<javac destdir="${builddir}/compile/test" source="1.8" includeantruntime="false" debug="true" failonerror="true" debuglevel="lines,vars,source">
|
|
<classpath refid="classpathid"/>
|
|
<src path="test"/>
|
|
</javac>
|
|
</target>
|
|
|
|
<property name="result-dir" value="${builddir}/testreportdir"/>
|
|
<property name="instrumented-classes-dir" value="${builddir}/testreportdir/instrumented-classes"/>
|
|
<property name="case-result-dir" value="${builddir}/testreportdir/caseresult"/>
|
|
<property name="case-result-html-dir" value="${builddir}/testreportdir/caseresult_html"/>
|
|
<property name="cobertura-dir" value="${builddir}/testreportdir/cobertura"/>
|
|
|
|
<path id="cobertura.classpath">
|
|
<pathelement location="${builddir}"/>
|
|
<fileset dir="${libdir}/cobertura/">
|
|
<include name="*.jar" />
|
|
</fileset>
|
|
</path>
|
|
|
|
<taskdef classpathref="cobertura.classpath" resource="tasks.properties" />
|
|
|
|
<target name="instrument" depends="compile-test">
|
|
<mkdir dir="${result-dir}"/>
|
|
<mkdir dir="${instrumented-classes-dir}"/>
|
|
<cobertura-instrument todir="${instrumented-classes-dir}">
|
|
<classpath refid="classpathid"/>
|
|
<fileset dir="${builddir}/compile/src">
|
|
<include name="**/*.class"/>
|
|
<exclude name="**/*Test.class"/>
|
|
<exclude name="**/*Test*.class"/>
|
|
<exclude name="**/thrift/*.class"/>
|
|
<exclude name="**/opcode/*.class"/>
|
|
<exclude name="**/common/Version.class"/>
|
|
<exclude name="**/analysis/SqlParser.class"/>
|
|
<exclude name="**/analysis/SqlParserSymbols.class"/>
|
|
<exclude name="**/analysis/SqlScanner.class"/>
|
|
</fileset>
|
|
</cobertura-instrument>
|
|
</target>
|
|
|
|
<target name="run-test" depends="make-test-help-zip, compile-test">
|
|
<mkdir dir="${case-result-dir}"/>
|
|
<mkdir dir="${case-result-html-dir}"/>
|
|
<junit dir='./' failureproperty="test.failure" printSummary="yes" fork="yes" haltonerror="false">
|
|
<jvmarg value="-Xverify:none" />
|
|
<classpath location="${builddir}/compile/src"/>
|
|
<classpath location="${builddir}/compile/test"/>
|
|
<!-- test help-zip file -->
|
|
<classpath location="${builddir}/compile"/>
|
|
<!-- for test loading data from help-dir -->
|
|
<classpath location="test/resource"/>
|
|
<classpath refid="classpathid"/>
|
|
<formatter type="xml"/>
|
|
<batchtest fork="yes" todir="${case-result-dir}">
|
|
<fileset dir="test">
|
|
<include name="**/*Test.java"/>
|
|
<!-- <exclude name="**/CatalogTest.java"/> -->
|
|
</fileset>
|
|
</batchtest>
|
|
</junit>
|
|
<junitreport todir="${case-result-html-dir}">
|
|
<fileset dir="${case-result-dir}">
|
|
<include name="TEST-*.xml"/>
|
|
</fileset>
|
|
<report format="frames" todir="${case-result-html-dir}"/>
|
|
</junitreport>
|
|
</target>
|
|
|
|
<target name="cover-test" depends="instrument, make-test-help-zip">
|
|
<mkdir dir="${case-result-dir}"/>
|
|
<mkdir dir="${case-result-html-dir}"/>
|
|
<junit dir='./' failureproperty="test.failure" printSummary="yes" fork="yes" haltonerror="false">
|
|
<jvmarg value="-Xverify:none" />
|
|
<sysproperty key="net.sourceforge.cobertura.datafile" file="cobertura.ser" />
|
|
<classpath location="${instrumented-classes-dir}"/>
|
|
<classpath location="${builddir}/compile/src"/>
|
|
<classpath location="${builddir}/compile/test"/>
|
|
<!-- test help-zip file -->
|
|
<classpath location="${builddir}/compile"/>
|
|
<!-- for test loading data from help-dir -->
|
|
<classpath location="test/resource"/>
|
|
<classpath location="${libdir}/cobertura/cobertura.jar"/>
|
|
<classpath refid="cobertura.classpath"/>
|
|
<classpath refid="classpathid"/>
|
|
<formatter type="xml"/>
|
|
<batchtest fork="yes" todir="${case-result-dir}">
|
|
<fileset dir="test">
|
|
<include name="**/*Test.java"/>
|
|
<!-- <exclude name="**/CatalogTest.java"/> -->
|
|
</fileset>
|
|
</batchtest>
|
|
</junit>
|
|
<junitreport todir="${case-result-html-dir}">
|
|
<fileset dir="${case-result-dir}">
|
|
<include name="TEST-*.xml"/>
|
|
</fileset>
|
|
<report format="frames" todir="${case-result-html-dir}"/>
|
|
</junitreport>
|
|
</target>
|
|
|
|
<target name="coverage-report" depends="cover-test">
|
|
<mkdir dir="${cobertura-dir}"/>
|
|
<cobertura-report format="html" srcdir="src" destdir="${cobertura-dir}"/>
|
|
<fileset dir="src">
|
|
<include name="**/*.java" />
|
|
</fileset>
|
|
</target>
|
|
|
|
<property name="test-help-dir" value="test/resource/data" />
|
|
<target name="make-test-help-zip">
|
|
<zip zipfile="${builddir}/compile/test-help-resource.zip" basedir="${test-help-dir}/help" />
|
|
<zip zipfile="${builddir}/compile/test-help-resource-show-help.zip" basedir="${test-help-dir}/show_help" />
|
|
</target>
|
|
</project>
|
|
|