Skip to content

Commit 0638033

Browse files
add start shell
1 parent 750dbd0 commit 0638033

File tree

4 files changed

+138
-0
lines changed

4 files changed

+138
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ target/
88
*.eclipse.*
99
*.iml
1010
plugins/
11+
lib/

bin/submit.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/usr/bin/env bash
2+
3+
#
4+
# Licensed to the Apache Software Foundation (ASF) under one or more
5+
# contributor license agreements. See the NOTICE file distributed with
6+
# this work for additional information regarding copyright ownership.
7+
# The ASF licenses this file to You under the Apache License, Version 2.0
8+
# (the "License"); you may not use this file except in compliance with
9+
# the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
20+
set -e
21+
22+
export SQL_HOME="$(cd "`dirname "$0"`"/..; pwd)"
23+
24+
# Find the java binary
25+
if [ -n "${JAVA_HOME}" ]; then
26+
JAVA_RUN="${JAVA_HOME}/bin/java"
27+
else
28+
if [ `command -v java` ]; then
29+
JAVA_RUN="java"
30+
else
31+
echo "JAVA_HOME is not set" >&2
32+
exit 1
33+
fi
34+
fi
35+
36+
JAR_DIR=$SQL_HOME/lib/*
37+
CLASS_NAME=com.dtstack.flink.sql.launcher.LauncherMain
38+
39+
echo "sql submit ..."
40+
nohup $JAVA_RUN -cp $JAR_DIR $CLASS_NAME $@ &

launcher/.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
target
2+
.idea/
3+
/.idea/*
4+
target/
5+
.class
6+
.project
7+
.classpath
8+
*.eclipse.*
9+
*.iml
10+
plugins/
11+
lib/
12+
dependency-reduced-pom.xml

launcher/pom.xml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,89 @@
3131
</dependency>
3232
</dependencies>
3333

34+
<build>
35+
<plugins>
36+
37+
<plugin>
38+
<groupId>org.apache.maven.plugins</groupId>
39+
<artifactId>maven-shade-plugin</artifactId>
40+
<version>3.0.0</version>
41+
<executions>
42+
<execution>
43+
<phase>package</phase>
44+
<goals>
45+
<goal>shade</goal>
46+
</goals>
47+
<configuration>
48+
<transformers>
49+
50+
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" />
51+
<!-- The service transformer is needed to merge META-INF/services files -->
52+
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
53+
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer"/>
54+
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
55+
<resource>reference.conf</resource>
56+
</transformer>
57+
58+
<transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer">
59+
<resource>core-default.xml</resource>
60+
</transformer>
61+
62+
<transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer">
63+
<resource>core-site.xml</resource>
64+
</transformer>
65+
66+
<transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer">
67+
<resource>yarn-default.xml</resource>
68+
</transformer>
69+
70+
<transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer">
71+
<resource>mapred-default.xml</resource>
72+
</transformer>
73+
74+
<transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer">
75+
<resource>mapred-site.xml</resource>
76+
</transformer>
77+
</transformers>
78+
79+
<filters>
80+
<filter>
81+
<artifact>*:*</artifact>
82+
<excludes>
83+
<exclude>META-INF/*.SF</exclude>
84+
<exclude>META-INF/*.DSA</exclude>
85+
<exclude>META-INF/*.RSA</exclude>
86+
</excludes>
87+
</filter>
88+
</filters>
89+
</configuration>
90+
</execution>
91+
</executions>
92+
</plugin>
93+
94+
<plugin>
95+
<artifactId>maven-antrun-plugin</artifactId>
96+
<version>1.2</version>
97+
<executions>
98+
<execution>
99+
<id>copy-resources</id>
100+
<!-- here the phase you need -->
101+
<phase>package</phase>
102+
<goals>
103+
<goal>run</goal>
104+
</goals>
105+
<configuration>
106+
<tasks>
107+
<copy todir="${basedir}/../lib/">
108+
<fileset dir="target/">
109+
<include name="${project.name}-${project.version}.jar" />
110+
</fileset>
111+
</copy>
112+
</tasks>
113+
</configuration>
114+
</execution>
115+
</executions>
116+
</plugin>
117+
</plugins>
118+
</build>
34119
</project>

0 commit comments

Comments
 (0)