Skip to content

Commit

Permalink
update project version (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
Foster9527 authored and Functor10 committed Jan 2, 2020
1 parent 34754df commit 0baeddc
Show file tree
Hide file tree
Showing 20 changed files with 68 additions and 59 deletions.
2 changes: 1 addition & 1 deletion analysis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ limitations under the License.
<parent>
<groupId>com.qihoo.qsql</groupId>
<artifactId>qsql</artifactId>
<version>0.6</version>
<version>0.7.0</version>
</parent>

<artifactId>qsql-calcite-analysis</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>qsql</artifactId>
<groupId>com.qihoo.qsql</groupId>
<version>0.6</version>
<version>0.7.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
6 changes: 2 additions & 4 deletions assembly/src/main/assembly/assembly-linux.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
<outputDirectory>/${qsql.release}/lib/flink</outputDirectory>
<fileMode>0755</fileMode>
<includes>
<include>**/qsql-core-0.6-fat.jar</include>
<include>**/qsql-core-0.7.0-fat.jar</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.parent.basedir}/core/src/main/resources</directory>
<outputDirectory>/${qsql.release}/conf</outputDirectory>
<fileMode>0755</fileMode>
<includes>
<include>**/qsql-runner.properties</include>
<include>**/quicksql-runner.properties</include>
</includes>
</fileSet>
<fileSet>
Expand Down Expand Up @@ -92,8 +92,6 @@
<useProjectArtifact>false</useProjectArtifact>
<excludes>
<exclude>org.scala-lang:*:jar</exclude>
<exclude>org.apache.hadoop:*:jar</exclude>
<!--<exclude>org.apache.hive:*:jar</exclude>-->
<exclude>org.spark-project.hive:*:jar</exclude>
<exclude>org.antlr:*:jar</exclude>
<exclude>org.apache.spark:*:jar</exclude>
Expand Down
3 changes: 3 additions & 0 deletions bin/commons.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash
unset QSQL_JARS
unset PROJECT_VERSION

PROJECT_VERSION="0.7.0"

if [ -z "${QSQL_HOME}" ]
then
Expand Down
4 changes: 2 additions & 2 deletions bin/metadata-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ else
fi
fi

QSQL_METADATA_CLASSPATH="${QSQL_HOME}/lib/qsql-core-0.6.jar"
QSQL_METADATA_CLASSPATH="${QSQL_HOME}/lib/qsql-core-"${PROJECT_VERSION}".jar"
QSQL_METADATA_CLASSPATH="${QSQL_HOME}/lib/mysql-connector-java-5.1.20.jar:${QSQL_METADATA_CLASSPATH}"
QSQL_METADATA_CLASSPATH="${QSQL_HOME}/lib/ibatis-core-3.0.jar:${QSQL_METADATA_CLASSPATH}"
QSQL_METADATA_CLASSPATH="${QSQL_HOME}/lib/commons-lang3-3.8.jar:${QSQL_METADATA_CLASSPATH}"
QSQL_METADATA_CLASSPATH="${QSQL_HOME}/lib/qsql-meta-0.6.jar:${QSQL_METADATA_CLASSPATH}"
QSQL_METADATA_CLASSPATH="${QSQL_HOME}/lib/qsql-meta-"${PROJECT_VERSION}".jar:${QSQL_METADATA_CLASSPATH}"



Expand Down
15 changes: 9 additions & 6 deletions bin/quicksql-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ USAGE="-e Usage: quicksql-server.sh {start|stop|restart|status}"
export QSQL_HOME="$(cd "`dirname "$0"`"/..; pwd)"

function start() {

#import quicksql.sh related environment variables
. "${QSQL_HOME}/bin/commons.sh"

JAVA_MAIN_CLASS="com.qihoo.qsql.server.JdbcServer"
QSQL_SERVER_JAR="${QSQL_HOME}/lib/qsql-server-0.6.jar"
QSQL_SERVER_JAR="${QSQL_HOME}/lib/qsql-server-"${PROJECT_VERSION}".jar"

PIDS=`ps -f | grep java | grep "$QSQL_HOME" |awk '{print $2}'`
if [ -n "$PIDS" ]; then
Expand All @@ -13,10 +17,6 @@ function start() {
exit 1
fi

#import quicksql.sh related environment variables
. "${QSQL_HOME}/bin/commons.sh"


if [[ -n "$SPARK_HOME" ]] && [[ -x "$SPARK_HOME/bin/spark-submit" ]]; then
SPARK_RUNNER="${SPARK_HOME}/bin/spark-submit"
else
Expand Down Expand Up @@ -44,7 +44,10 @@ function start() {
fi
fi

QSQL_JARS=${QSQL_HOME}/lib/sqlite-jdbc-3.20.0.jar,${QSQL_HOME}/lib/qsql-meta-0.6.jar,${QSQL_HOME}/lib/jackson-dataformat-cbor-2.8.10.jar,${QSQL_HOME}/lib/jackson-dataformat-smile-2.8.10.jar,${QSQL_HOME}/lib/qsql-client-0.6.jar,${QSQL_HOME}/lib/jetty-http-9.2.19.v20160908.jar,${QSQL_HOME}/lib/jetty-io-9.2.19.v20160908.jar,${QSQL_HOME}/lib/jetty-security-9.2.19.v20160908.jar,${QSQL_HOME}/lib/jetty-server-9.2.19.v20160908.jar,${QSQL_HOME}/lib/jetty-util-9.2.19.v20160908.jar,${QSQL_HOME}/lib/commons-cli-1.3.1.jar,${QSQL_HOME}/lib/avatica-core-1.12.0.jar,${QSQL_HOME}/lib/avatica-server-1.12.0.jar,${QSQL_HOME}/lib/avatica-metrics-1.12.0.jar,${QSQL_HOME}/lib/protobuf-java-3.3.0.jar,${QSQL_HOME}/lib/jackson-core-2.6.5.jar,${QSQL_HOME}/lib/jackson-annotations-2.6.5.jar,${QSQL_HOME}/lib/jackson-databind-2.6.5.jar,${QSQL_HOME}/lib/httpclient-4.5.6.jar,${QSQL_HOME}/lib/httpcore-4.4.10.jar,${QSQL_HOME}/lib/esri-geometry-api-2.2.0.jar,${QSQL_HOME}/lib/guava-19.0.jar,${QSQL_HOME}/lib/calcite-linq4j-1.17.0.jar,${QSQL_HOME}/lib/derby-10.10.2.0.jar,${QSQL_HOME}/lib/jackson-dataformat-yaml-2.6.5.jar,${QSQL_HOME}/lib/imc-0.2.jar,${QSQL_HOME}/lib/qsql-core-0.6.jar,${QSQL_HOME}/lib/qsql-calcite-analysis-0.6.jar,${QSQL_HOME}/lib/qsql-calcite-elasticsearch-0.6.jar,${QSQL_HOME}/lib/elasticsearch-rest-client-6.2.4.jar,${QSQL_HOME}/lib/httpasyncclient-4.1.2.jar,${QSQL_HOME}/lib/httpclient-4.5.6.jar,${QSQL_HOME}/lib/httpcore-4.4.10.jar,${QSQL_HOME}/lib/httpcore-nio-4.4.5.jar,${QSQL_HOME}/lib/mysql-connector-java-5.1.20.jar,${QSQL_HOME}/lib/elasticsearch-spark-20_2.11-6.2.4.jar
QSQL_JARS=${QSQL_HOME}/lib/sqlite-jdbc-3.20.0.jar,${QSQL_HOME}/lib/qsql-meta-"${PROJECT_VERSION}".jar,
${QSQL_HOME}/lib/jackson-dataformat-cbor-2.8.10.jar,${QSQL_HOME}/lib/jackson-dataformat-smile-2.8.10.jar,
${QSQL_HOME}/lib/qsql-client-"${PROJECT_VERSION}".jar,${QSQL_HOME}/lib/jetty-http-9.2.19.v20160908.jar,
${QSQL_HOME}/lib/jetty-io-9.2.19.v20160908.jar,${QSQL_HOME}/lib/jetty-security-9.2.19.v20160908.jar,${QSQL_HOME}/lib/jetty-server-9.2.19.v20160908.jar,${QSQL_HOME}/lib/jetty-util-9.2.19.v20160908.jar,${QSQL_HOME}/lib/commons-cli-1.3.1.jar,${QSQL_HOME}/lib/avatica-core-1.12.0.jar,${QSQL_HOME}/lib/avatica-server-1.12.0.jar,${QSQL_HOME}/lib/avatica-metrics-1.12.0.jar,${QSQL_HOME}/lib/protobuf-java-3.3.0.jar,${QSQL_HOME}/lib/jackson-core-2.6.5.jar,${QSQL_HOME}/lib/jackson-annotations-2.6.5.jar,${QSQL_HOME}/lib/jackson-databind-2.6.5.jar,${QSQL_HOME}/lib/httpclient-4.5.6.jar,${QSQL_HOME}/lib/httpcore-4.4.10.jar,${QSQL_HOME}/lib/esri-geometry-api-2.2.0.jar,${QSQL_HOME}/lib/guava-19.0.jar,${QSQL_HOME}/lib/calcite-linq4j-1.17.0.jar,${QSQL_HOME}/lib/derby-10.10.2.0.jar,${QSQL_HOME}/lib/jackson-dataformat-yaml-2.6.5.jar,${QSQL_HOME}/lib/imc-0.2.jar,${QSQL_HOME}/lib/qsql-core-0.6.jar,${QSQL_HOME}/lib/qsql-calcite-analysis-0.6.jar,${QSQL_HOME}/lib/qsql-calcite-elasticsearch-0.6.jar,${QSQL_HOME}/lib/elasticsearch-rest-client-6.2.4.jar,${QSQL_HOME}/lib/httpasyncclient-4.1.2.jar,${QSQL_HOME}/lib/httpclient-4.5.6.jar,${QSQL_HOME}/lib/httpcore-4.4.10.jar,${QSQL_HOME}/lib/httpcore-nio-4.4.5.jar,${QSQL_HOME}/lib/mysql-connector-java-5.1.20.jar,${QSQL_HOME}/lib/elasticsearch-spark-20_2.11-6.2.4.jar
QSQL_LAUNCH_CLASSPATH="${QSQL_JARS}"

LOGS_DIR=""
Expand Down
27 changes: 14 additions & 13 deletions bin/quicksql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ if [ ! -z "${HELP_ENABLE}" ] ; then
fi

function buildFatJar(){
JAR_FILE="${QSQL_HOME}/lib/flink/qsql-core-0.6.jar"
JAR_FILE="${QSQL_HOME}/lib/flink/qsql-core-"${PROJECT_VERSION}".jar"

if [ ! -f "${JAR_FILE}" ]; then
echo "INFO: Start build flink fat jar...";
Expand All @@ -174,31 +174,32 @@ function buildFatJar(){
if [ -z "${HADOOP_HOME}" ]
then
echo "WARN: HADOOP_HOME is not set";
\cp -f -r "${QSQL_HOME}"/lib/hadoop-common*.jar "${QSQL_HOME}"/lib/flink/tmp
else
cp "`find ${HADOOP_HOME}/ -name "hadoop-common*.jar" |head -n 1`" "${QSQL_HOME}"/lib/flink/tmp
\cp -f -r "`find ${HADOOP_HOME}/ -name "hadoop-common*.jar" |head -n 1`" "${QSQL_HOME}"/lib/flink/tmp
fi

cd "${QSQL_HOME}"/lib/flink/tmp

for jarFile in "$(ls *.jar | grep -v "qsql-core-0.6-fat.jar")"; do
for jarFile in "$(ls *.jar | grep -v "qsql-core-${PROJECT_VERSION}-fat.jar")"; do
jar -xf "${jarFile}"
done
rm -rf META-INF

jar -xf qsql-core-0.6-fat.jar
jar -xf qsql-core-"${PROJECT_VERSION}"-fat.jar
if [ $? -ne 0 ]; then
echo "ERROR: File qsql-core-0.6-fat.jar is not exist.";
echo "ERROR: File qsql-core-"${PROJECT_VERSION}"-fat.jar is not exist.";
exit 1
fi

ls |grep -v jar$ | xargs jar cfM qsql-core-0.6.jar
ls |grep -v jar$ | xargs jar cfM qsql-core-"${PROJECT_VERSION}".jar
if [ $? -ne 0 ]; then
echo "ERROR: Failed buid flink fat jar qsql-core-0.6.jar.";
echo "ERROR: Failed buid flink fat jar qsql-core-"${PROJECT_VERSION}".jar.";
exit 1
fi

mv qsql-core-0.6.jar "${QSQL_HOME}"/lib/flink
cd "${QSQL_HOME}"
mv qsql-core-"${PROJECT_VERSION}".jar "${QSQL_HOME}"/lib/flink
cd ../../
rm -rf "${QSQL_HOME}"/lib/flink/tmp
echo "INFO: End build flink fat jar.";
fi
Expand Down Expand Up @@ -294,7 +295,7 @@ if [ "${QSQL_RUNNER}"X = "FLINKX" ] ; then
fi
fi
buildFatJar
CONF=${CONF}" --jar_name=${QSQL_HOME}/lib/flink/qsql-core-0.6.jar "
CONF=${CONF}" --jar_name=${QSQL_HOME}/lib/flink/qsql-core-"${PROJECT_VERSION}".jar "

elif [ "${QSQL_RUNNER}"X = "SPARKX" ] ; then

Expand Down Expand Up @@ -324,15 +325,15 @@ elif [ "${QSQL_RUNNER}"X = "SPARKX" ] ; then
exit 1
fi
fi
CONF=${CONF}" --jar_name=${QSQL_HOME}/lib/qsql-core-0.6.jar "
CONF=${CONF}" --jar_name=${QSQL_HOME}/lib/qsql-core-"${PROJECT_VERSION}".jar "
else
CONF=${CONF}" --jar_name=${QSQL_HOME}/lib/qsql-core-0.6.jar "
CONF=${CONF}" --jar_name=${QSQL_HOME}/lib/qsql-core-"${PROJECT_VERSION}".jar "
fi

CONF=${CONF}" --class_name=com.qihoo.quicksql.sh.cli.QSqlSubmit "
CONF=${CONF}" --jar=${JARS} "

QSQL_LAUNCH_CLASSPATH="${QSQL_HOME}/lib/qsql-core-0.6.jar"
QSQL_LAUNCH_CLASSPATH="${QSQL_HOME}/lib/qsql-core-"${PROJECT_VERSION}".jar"
QSQL_LAUNCH_CLASSPATH="${QSQL_LAUNCH_CLASSPATH}:${QSQL_JARS}"


Expand Down
28 changes: 15 additions & 13 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ limitations under the License.
<parent>
<groupId>com.qihoo.qsql</groupId>
<artifactId>qsql</artifactId>
<version>0.6</version>
<version>0.7.0</version>
</parent>

<artifactId>qsql-core</artifactId>
<packaging>jar</packaging>
<version>0.6</version>
<version>0.7.0</version>
<name>qsql-core</name>

<properties>
<top.dir>${project.basedir}/..</top.dir>
<qsql.release>qsql-0.6</qsql.release>
<qsql.release>qsql-0.7.0</qsql.release>
<output.directory>/${qsql.release}/lib/flink</output.directory>
</properties>

Expand Down Expand Up @@ -161,12 +161,13 @@ limitations under the License.
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-shaded-hadoop2-uber</artifactId>
<version>2.7.5-1.8.2</version>
<version>${flink-shaded-hadoop2-uber.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-metastore</artifactId>
<version>1.2.1</version>
<version>${hive-driver.version}</version>
<exclusions>
<exclusion>
<artifactId>hive-shims</artifactId>
Expand All @@ -177,7 +178,7 @@ limitations under the License.
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-exec</artifactId>
<version>1.2.1</version>
<version>${hive-driver.version}</version>
<exclusions>
<exclusion>
<artifactId>hive-shims</artifactId>
Expand All @@ -196,7 +197,7 @@ limitations under the License.
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
<version>1.2.1</version>
<version>${hive-driver.version}</version>
<exclusions>
<exclusion>
<artifactId>hive-shims</artifactId>
Expand All @@ -215,21 +216,22 @@ limitations under the License.
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-hadoop-compatibility_${scala.version}</artifactId>
<version>1.9.1</version>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
<version>${gson.version}</version>
</dependency>




<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-planner_${scala.version}</artifactId>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-core</artifactId>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public List<String> assemblySparkOptions() {

private List<String> loadSparkConf() {
Properties properties =
PropertiesReader.readProperties("qsql-runner.properties", this.getClass());
PropertiesReader.readProperties("quicksql-runner.properties", this.getClass());
return properties.entrySet().stream()
.filter(conf -> conf.getKey().toString().startsWith("spark"))
.map(conf -> conf.getKey() + "=" + conf.getValue())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ private static void welcome() {
+ " / __ \\__ __(_)____/ /__/ ___// __ \\ / / \n"
+ " / / / / / / / / ___/ //_/\\__ \\/ / / / / / \n"
+ " / /_/ / /_/ / / /__/ ,< ___/ / /_/ / / /___\n"
+ "Welcome to \\___\\_\\__,_/_/\\___/_/|_|/____/\\___\\_\\/_____/ version 0.6.";
+ "Welcome to \\___\\_\\__,_/_/\\___/_/|_|/____/\\___\\_\\/_____/ version 0.7.0.";
String slogan = " \\ Process data placed anywhere with the most flexible SQL /";
System.out.println(welcome);
System.out.println(slogan);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# This file is sourced when qsql decide to execute sql in Spark, Flink or other engine which can use more configuration parameters.
#
# Copy it as qsql-runner.properties and edit it that to configure Spark, Flink or other engine.
# Copy it as quicksql-runner.properties and edit it that to configure Spark, Flink or other engine.
#

# =======================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void setUp() {
args.add("--jar");
args.add("test.jar");
args.add("--jar_name");
args.add("./target/qsql-core-0.6.jar");
args.add("./target/qsql-core-0.7.0.jar");
}

@Test
Expand Down
8 changes: 4 additions & 4 deletions docker/0.6/Dockerfile → docker/0.7.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ RUN yum update -y && yum install -y wget openssh vim \
java-1.8.0-openjdk-devel java-1.8.0-openjdk-headless

# Download Qlick SQL package
RUN wget https://github.com/Qihoo360/Quicksql/releases/download/release-0.6/qsql-0.6.tar.gz && \
tar -xzvf qsql-0.6.tar.gz -C /usr/local
RUN wget https://github.com/Qihoo360/Quicksql/releases/download/release-0.7.0/qsql-0.7.0.tar.gz && \
tar -xzvf qsql-0.7.0.tar.gz -C /usr/local

# Download Spark package
RUN wget http://mirrors.tuna.tsinghua.edu.cn/apache/spark/spark-2.4.4/spark-2.4.4-bin-hadoop2.7.tgz && \
tar -xzvf spark-2.4.4-bin-hadoop2.7.tgz -C /usr/local

# Setting environments
ENV JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk
ENV QSQL_HOME /usr/local/qsql-0.6
ENV QSQL_HOME /usr/local/qsql-0.7.0
ENV SPARK_HOME /usr/local/spark-2.4.4-bin-hadoop2.7
ENV PATH $JAVA_HOME/bin:$SPARK_HOME/bin:$SPARK_HOME/sbin:$QSQL_HOME/bin:$PATH
RUN export PATH QSQL_HOME SPARK_HOME

WORKDIR /usr/local/qsql-0.6
WORKDIR /usr/local/qsql-0.7.0

EXPOSE 4040 8080

Expand Down
4 changes: 2 additions & 2 deletions elasticsearch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ limitations under the License.
<parent>
<groupId>com.qihoo.qsql</groupId>
<artifactId>qsql</artifactId>
<version>0.6</version>
<version>0.7.0</version>
</parent>

<artifactId>qsql-calcite-elasticsearch</artifactId>
<packaging>jar</packaging>
<version>0.6</version>
<version>0.7.0</version>
<name>qsql-calcite-elasticsearch</name>
<description>Elasticsearch adapter for Calcite</description>

Expand Down
2 changes: 1 addition & 1 deletion example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>qsql</artifactId>
<groupId>com.qihoo.qsql</groupId>
<version>0.6</version>
<version>0.7.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion linq4j/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.
<parent>
<groupId>com.qihoo.qsql</groupId>
<artifactId>qsql</artifactId>
<version>0.6</version>
<version>0.7.0</version>
</parent>

<artifactId>qsql-calcite-linq4j</artifactId>
Expand Down
5 changes: 2 additions & 3 deletions meta/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>qsql</artifactId>
<groupId>com.qihoo.qsql</groupId>
<version>0.6</version>
<version>0.7.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -90,8 +90,7 @@
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>2.7.2</version>
<scope>provided</scope>
<version>${hadoop.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Loading

0 comments on commit 0baeddc

Please sign in to comment.