Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangpeng
dinky
Commits
ce0089f4
Unverified
Commit
ce0089f4
authored
Aug 22, 2022
by
aiwenmo
Committed by
GitHub
Aug 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Optimization-932][pom] Optimizate package and auto.sh by loading classpaths (#933)
Co-authored-by:
wenmo
<
32723967+wenmo@users.noreply.github.com
>
parent
c1b4b556
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
84 additions
and
77 deletions
+84
-77
pom.xml
dlink-admin/pom.xml
+11
-64
package.xml
dlink-admin/src/main/assembly/package.xml
+51
-0
JobInstanceServiceImpl.java
...n/java/com/dlink/service/impl/JobInstanceServiceImpl.java
+6
-1
package.xml
dlink-assembly/src/main/assembly/package.xml
+0
-0
LineageContext.java
...nt-1.14/src/main/java/com/dlink/utils/LineageContext.java
+11
-5
auto.sh
dlink-doc/bin/auto.sh
+5
-7
No files found.
dlink-admin/pom.xml
View file @
ce0089f4
...
...
@@ -196,83 +196,30 @@
<artifactId>
spring-boot-starter-aop
</artifactId>
</dependency>
</dependencies>
<build>
<finalName>
${project.artifactId}
</finalName>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
${spring-boot-dependencies.version}
</version>
<configuration>
<layout>
ZIP
</layout>
<mainClass>
com.dlink.Dlink
</mainClass>
<excludes>
<exclude>
<groupId>
org.apache.flink
</groupId>
<artifactId>
flink-*
</artifactId>
</exclude>
</excludes>
</configuration>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
<!--<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>maven-
jar
-plugin</artifactId>
<version>3.
1
.0</version>
<artifactId>
maven-
assembly
-plugin
</artifactId>
<version>
3.
0
.0
</version>
<configuration>
<!–<outputDirectory>${project.build.directory}/app/bin</outputDirectory>–>
<!–这些配置将写入到MANIFEST.MF文件中–>
<archive>
<!–指定程序入口–>
<manifest>
<!–<addClasspath>true</addClasspath>–>
<classpathPrefix>../lib/</classpathPrefix>
<mainClass>com.dlink.Dlink</mainClass>
</manifest>
<!– (配置文件外置目录) –>
<manifestEntries>
<Class-Path>../config/</Class-Path>
</manifestEntries>
</archive>
<excludes>
<exclude>**/*.xml</exclude>
<exclude>**/*.conf</exclude>
<exclude>**/*.properties</exclude>
<exclude>**/*/*.json</exclude>
</excludes>
<appendAssemblyId>
false
</appendAssemblyId>
<descriptors>
<descriptor>
src/main/assembly/package.xml
</descriptor>
</descriptors>
</configuration>
</plugin>-->
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-resources-plugin
</artifactId>
<version>
${maven.resource.version}
</version>
<executions>
<execution>
<id>
copy-static
</id>
<phase>
validat
e
</phase>
<id>
make-assembly
</id>
<phase>
packag
e
</phase>
<goals>
<goal>
copy-resources
</goal>
<goal>
single
</goal>
</goals>
<configuration>
<outputDirectory>
src/main/resources/static
</outputDirectory>
<overwrite>
true
</overwrite>
<resources>
<resource>
<!-- 因为dlink-web打包目录在项目跟目录,所以从这里复制 -->
<directory>
../dlink-web/dist
</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<finalName>
${project.artifactId}-${project.version}
</finalName>
</build>
</project>
dlink-admin/src/main/assembly/package.xml
0 → 100644
View file @
ce0089f4
<assembly>
<id>
dist
</id>
<formats>
<format>
dir
</format>
</formats>
<includeBaseDirectory>
false
</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>
${basedir}/src/main/bin
</directory>
<lineEnding>
unix
</lineEnding>
<outputDirectory>
service
</outputDirectory>
<includes>
<include>
*.service
</include>
</includes>
</fileSet>
<fileSet>
<directory>
${basedir}/src/main/bin
</directory>
<lineEnding>
unix
</lineEnding>
<outputDirectory></outputDirectory>
<fileMode>
755
</fileMode>
<includes>
<include>
*.sh
</include>
</includes>
</fileSet>
<fileSet>
<directory>
${basedir}/src/main/bin
</directory>
<lineEnding>
windows
</lineEnding>
<outputDirectory></outputDirectory>
<includes>
<include>
*.bat
</include>
</includes>
</fileSet>
<fileSet>
<directory>
target/classes
</directory>
<outputDirectory>
config
</outputDirectory>
<includes>
<include>
**/*.properties
</include>
<include>
**/*.yml
</include>
<include>
**/*.yaml
</include>
<include>
**/*.xml
</include>
</includes>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
<outputDirectory>
lib
</outputDirectory>
<unpack>
false
</unpack>
</dependencySet>
</dependencySets>
</assembly>
\ No newline at end of file
dlink-admin/src/main/java/com/dlink/service/impl/JobInstanceServiceImpl.java
View file @
ce0089f4
...
...
@@ -33,6 +33,7 @@ import com.dlink.model.JobInstance;
import
com.dlink.model.JobInstanceCount
;
import
com.dlink.model.JobInstanceStatus
;
import
com.dlink.model.JobStatus
;
import
com.dlink.model.SystemConfiguration
;
import
com.dlink.service.ClusterConfigurationService
;
import
com.dlink.service.ClusterService
;
import
com.dlink.service.HistoryService
;
...
...
@@ -184,7 +185,11 @@ public class JobInstanceServiceImpl extends SuperServiceImpl<JobInstanceMapper,
@Override
public
LineageResult
getLineage
(
Integer
id
)
{
History
history
=
getJobInfoDetail
(
id
).
getHistory
();
return
LineageBuilder
.
getLineage
(
history
.
getStatement
(),
history
.
getConfig
().
get
(
"useStatementSet"
).
asBoolean
());
if
(
SystemConfiguration
.
getInstances
().
isUseLogicalPlan
())
{
return
LineageBuilder
.
getColumnLineageByLogicalPlan
(
history
.
getStatement
());
}
else
{
return
LineageBuilder
.
getLineage
(
history
.
getStatement
());
}
}
@Override
...
...
dlink-assembly/src/main/assembly/package.xml
View file @
ce0089f4
This diff is collapsed.
Click to expand it.
dlink-client/dlink-client-1.14/src/main/java/com/dlink/utils/LineageContext.java
View file @
ce0089f4
...
...
@@ -135,7 +135,7 @@ public class LineageContext {
/**
* Calling each program's optimize method in sequence.
*/
p
ublic
RelNode
optimize
(
RelNode
relNode
)
{
p
rivate
RelNode
optimize
(
RelNode
relNode
)
{
return
flinkChainedProgram
.
optimize
(
relNode
,
new
StreamOptimizeContext
()
{
@Override
public
boolean
isBatchMode
()
{
...
...
@@ -149,7 +149,7 @@ public class LineageContext {
@Override
public
FunctionCatalog
getFunctionCatalog
()
{
return
((
PlannerBase
)
tableEnv
.
getPlanner
()
).
getFlinkContext
().
getFunctionCatalog
();
return
getPlanner
(
).
getFlinkContext
().
getFunctionCatalog
();
}
@Override
...
...
@@ -159,17 +159,18 @@ public class LineageContext {
@Override
public
SqlExprToRexConverterFactory
getSqlExprToRexConverterFactory
()
{
return
relNode
.
getCluster
().
getPlanner
().
getContext
().
unwrap
(
FlinkContext
.
class
).
getSqlExprToRexConverterFactory
();
return
getPlanner
().
getFlinkContext
(
).
getSqlExprToRexConverterFactory
();
}
@Override
public
<
C
>
C
unwrap
(
Class
<
C
>
clazz
)
{
return
StreamOptimizeContext
.
super
.
unwrap
(
clazz
);
return
getPlanner
().
getFlinkContext
().
unwrap
(
clazz
);
}
@Override
public
FlinkRelBuilder
getFlinkRelBuilder
()
{
return
((
PlannerBase
)
tableEnv
.
getPlanner
()
).
getRelBuilder
();
return
getPlanner
(
).
getRelBuilder
();
}
@Override
...
...
@@ -186,6 +187,11 @@ public class LineageContext {
public
MiniBatchInterval
getMiniBatchInterval
()
{
return
MiniBatchInterval
.
NONE
;
}
private
PlannerBase
getPlanner
()
{
return
(
PlannerBase
)
tableEnv
.
getPlanner
();
}
});
}
...
...
dlink-doc/bin/auto.sh
View file @
ce0089f4
#!/bin/bash
# 定义变量
# 要运行的jar包路径,加不加引号都行。 注意:等号两边 不能 有空格,否则会提示command找不到
JAR_NAME
=
"./dlink-admin-*.jar"
#java -Djava.ext.dirs=$JAVA_HOME/jre/lib/ext:$JAVA_HOME/jre/lib:./lib -classpath ."/lib/*.jar" -jar dlink-admin-*.jar
# 如果需要将FLINK依赖直接加入启动脚本,在SETTING中增加$FLINK_HOME/lib
SETTING
=
"-Dloader.path=./lib,./plugins -Ddruid.mysql.usePingMethod=false"
# 要运行的jar包路径,加不加引号都行。 注意:等号两边不能有空格,否则会提示command找不到
JAR_NAME
=
"dlink-admin"
# 如果需要将 FLINK 依赖直接加入启动脚本,在 CLASS_PATH 中末尾追加 :$FLINK_HOME/lib/*
CLASS_PATH
=
"./lib/*:config:html:./plugins/*"
#if [ ! -d ${HADOOP_HOME} ]; then
# echo 'WARNING!!!...not find HADOOP_HOME for CLASSPATH.'
#else
...
...
@@ -57,7 +55,7 @@ start() {
pid
=
$(
cat
${
PIDPATH
}
/
${
PIDFILE
})
if
[
-z
$pid
]
;
then
nohup
java
$SETTING
-jar
-Xms512M
-Xmx2048M
-XX
:PermSize
=
512M
-XX
:MaxPermSize
=
1024M
$JAR_NAME
>
dlink.log 2>&1 &
nohup
java
-Ddruid
.mysql.usePingMethod
=
false
-Xms512M
-Xmx2048M
-XX
:PermSize
=
512M
-XX
:MaxPermSize
=
1024M
-XX
:+HeapDumpOnOutOfMemoryError
-Xverify
:none
-cp
${
CLASS_PATH
}
com.dlink.Dlink
>
dlink.log 2>&1 &
echo
$!
>
${
PIDPATH
}
/
${
PIDFILE
}
echo
"........................................Start Dlink Successfully........................................"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment