Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doujutun3207
flink
提交
5a4bdf2c
F
flink
项目概览
doujutun3207
/
flink
与 Fork 源项目一致
从无法访问的项目Fork
通知
24
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
flink
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
5a4bdf2c
编写于
7月 10, 2018
作者:
T
Till Rohrmann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[FLINK-9819] Add startup scripts for standalone job cluster entry point
This closes #6316.
上级
8f467c1e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
82 addition
and
2 deletion
+82
-2
flink-dist/pom.xml
flink-dist/pom.xml
+6
-0
flink-dist/src/main/flink-bin/bin/flink-console.sh
flink-dist/src/main/flink-bin/bin/flink-console.sh
+5
-1
flink-dist/src/main/flink-bin/bin/flink-daemon.sh
flink-dist/src/main/flink-bin/bin/flink-daemon.sh
+5
-1
flink-dist/src/main/flink-bin/bin/standalone-job.sh
flink-dist/src/main/flink-bin/bin/standalone-job.sh
+66
-0
未找到文件。
flink-dist/pom.xml
浏览文件 @
5a4bdf2c
...
...
@@ -122,6 +122,12 @@ under the License.
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.flink
</groupId>
<artifactId>
flink-container_${scala.binary.version}
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.flink
</groupId>
<artifactId>
flink-statebackend-rocksdb_${scala.binary.version}
</artifactId>
...
...
flink-dist/src/main/flink-bin/bin/flink-console.sh
浏览文件 @
5a4bdf2c
...
...
@@ -19,7 +19,7 @@
# Start a Flink service as a console application. Must be stopped with Ctrl-C
# or with SIGTERM by kill or the controlling process.
USAGE
=
"Usage: flink-console.sh (jobmanager|taskmanager|
historyserver|zookeeper
) [args]"
USAGE
=
"Usage: flink-console.sh (jobmanager|taskmanager|
taskexecutor|zookeeper|historyserver|standalonesession|standalonejob
) [args]"
SERVICE
=
$1
ARGS
=(
"
${
@
:2
}
"
)
# get remaining arguments as array
...
...
@@ -54,6 +54,10 @@ case $SERVICE in
CLASS_TO_RUN
=
org.apache.flink.runtime.entrypoint.StandaloneSessionClusterEntrypoint
;;
(
standalonejob
)
CLASS_TO_RUN
=
org.apache.flink.container.entrypoint.StandaloneJobClusterEntryPoint
;;
(
*
)
echo
"Unknown service '
${
SERVICE
}
'.
$USAGE
."
exit
1
...
...
flink-dist/src/main/flink-bin/bin/flink-daemon.sh
浏览文件 @
5a4bdf2c
...
...
@@ -18,7 +18,7 @@
################################################################################
# Start/stop a Flink daemon.
USAGE
=
"Usage: flink-daemon.sh (start|stop|stop-all) (jobmanager|taskmanager|
zookeeper|historyserver
) [args]"
USAGE
=
"Usage: flink-daemon.sh (start|stop|stop-all) (jobmanager|taskmanager|
taskexecutor|zookeeper|historyserver|standalonesession|standalonejob
) [args]"
STARTSTOP
=
$1
DAEMON
=
$2
...
...
@@ -54,6 +54,10 @@ case $DAEMON in
CLASS_TO_RUN
=
org.apache.flink.runtime.entrypoint.StandaloneSessionClusterEntrypoint
;;
(
standalonejob
)
CLASS_TO_RUN
=
org.apache.flink.container.entrypoint.StandaloneJobClusterEntryPoint
;;
(
*
)
echo
"Unknown daemon '
${
DAEMON
}
'.
$USAGE
."
exit
1
...
...
flink-dist/src/main/flink-bin/bin/standalone-job.sh
0 → 100644
浏览文件 @
5a4bdf2c
#!/usr/bin/env bash
################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.
################################################################################
# Start/stop a Flink JobManager.
USAGE
=
"Usage: standalone-job.sh ((start|start-foreground))|stop"
STARTSTOP
=
$1
ENTRY_POINT_NAME
=
"standalonejob"
ARGS
=(
"
${
@
:2
}
"
)
if
[[
$STARTSTOP
!=
"start"
]]
&&
[[
$STARTSTOP
!=
"start-foreground"
]]
&&
[[
$STARTSTOP
!=
"stop"
]]
||
[[
-z
JOB_CLASSNAME
]]
;
then
echo
$USAGE
exit
1
fi
bin
=
`
dirname
"
$0
"
`
bin
=
`
cd
"
$bin
"
;
pwd
`
.
"
$bin
"
/config.sh
if
[[
$STARTSTOP
==
"start"
]]
||
[[
$STARTSTOP
==
"start-foreground"
]]
;
then
if
[
!
-z
"
${
FLINK_JM_HEAP_MB
}
"
]
&&
[
"
${
FLINK_JM_HEAP
}
"
==
0
]
;
then
echo
"used deprecated key
\`
${
KEY_JOBM_MEM_MB
}
\`
, please replace with key
\`
${
KEY_JOBM_MEM_SIZE
}
\`
"
else
flink_jm_heap_bytes
=
$(
parseBytes
${
FLINK_JM_HEAP
}
)
FLINK_JM_HEAP_MB
=
$(
getMebiBytes
${
flink_jm_heap_bytes
}
)
fi
if
[[
!
${
FLINK_JM_HEAP_MB
}
=
~
$IS_NUMBER
]]
||
[[
"
${
FLINK_JM_HEAP_MB
}
"
-lt
"0"
]]
;
then
echo
"[ERROR] Configured memory size is not a valid value. Please set '
${
KEY_JOBM_MEM_SIZE
}
' in
${
FLINK_CONF_FILE
}
."
exit
1
fi
if
[
"
${
FLINK_JM_HEAP_MB
}
"
-gt
"0"
]
;
then
export
JVM_ARGS
=
"
$JVM_ARGS
-Xms"
$FLINK_JM_HEAP_MB
"m -Xmx"
$FLINK_JM_HEAP_MB
"m"
fi
# Add cluster entry point specific JVM options
export
FLINK_ENV_JAVA_OPTS
=
"
${
FLINK_ENV_JAVA_OPTS
}
${
FLINK_ENV_JAVA_OPTS_JM
}
"
# Startup parameters
ARGS+
=(
"--configDir"
"
${
FLINK_CONF_DIR
}
"
)
fi
if
[[
$STARTSTOP
==
"start-foreground"
]]
;
then
exec
"
${
FLINK_BIN_DIR
}
"
/flink-console.sh
$ENTRY_POINT_NAME
"
${
ARGS
[@]
}
"
else
"
${
FLINK_BIN_DIR
}
"
/flink-daemon.sh
$STARTSTOP
$ENTRY_POINT_NAME
"
${
ARGS
[@]
}
"
fi
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录