Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doujutun3207
flink
提交
1e2497b4
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,发现更多精彩内容 >>
提交
1e2497b4
编写于
12月 18, 2013
作者:
S
StephanEwen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Cleaned up sysouts and apache headers in shell scripts
上级
54bb2dec
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
126 addition
and
131 deletion
+126
-131
stratosphere-dist/src/main/stratosphere-bin/bin/config.sh
stratosphere-dist/src/main/stratosphere-bin/bin/config.sh
+22
-22
stratosphere-dist/src/main/stratosphere-bin/bin/jobmanager.sh
...tosphere-dist/src/main/stratosphere-bin/bin/jobmanager.sh
+23
-24
stratosphere-dist/src/main/stratosphere-bin/bin/start-cluster.sh
...phere-dist/src/main/stratosphere-bin/bin/start-cluster.sh
+6
-6
stratosphere-dist/src/main/stratosphere-bin/bin/start-local.sh
...osphere-dist/src/main/stratosphere-bin/bin/start-local.sh
+3
-3
stratosphere-dist/src/main/stratosphere-bin/bin/start-webclient.sh
...ere-dist/src/main/stratosphere-bin/bin/start-webclient.sh
+2
-3
stratosphere-dist/src/main/stratosphere-bin/bin/stop-cluster.sh
...sphere-dist/src/main/stratosphere-bin/bin/stop-cluster.sh
+6
-6
stratosphere-dist/src/main/stratosphere-bin/bin/stop-local.sh
...tosphere-dist/src/main/stratosphere-bin/bin/stop-local.sh
+3
-3
stratosphere-dist/src/main/stratosphere-bin/bin/stop-webclient.sh
...here-dist/src/main/stratosphere-bin/bin/stop-webclient.sh
+2
-3
stratosphere-dist/src/main/stratosphere-bin/bin/swt-visualization.sh
...e-dist/src/main/stratosphere-bin/bin/swt-visualization.sh
+13
-14
stratosphere-dist/src/main/stratosphere-bin/bin/taskmanager.sh
...osphere-dist/src/main/stratosphere-bin/bin/taskmanager.sh
+21
-21
stratosphere-dist/src/main/stratosphere-bin/bin/webclient.sh
stratosphere-dist/src/main/stratosphere-bin/bin/webclient.sh
+25
-26
未找到文件。
stratosphere-dist/src/main/stratosphere-bin/bin/config.sh
浏览文件 @
1e2497b4
#!/bin/bash
########################################################################################################################
#
# Copyright (C) 2010 by the Stratosphere project (http://stratosphere.eu)
# Copyright (C) 2010
-2013
by the Stratosphere project (http://stratosphere.eu)
#
# 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
...
...
@@ -103,18 +103,18 @@ script=`basename "$this"`
bin
=
`
cd
"
$bin
"
;
pwd
`
this
=
"
$bin
/
$script
"
# Define the main directory of the
Nephel
e installation
NEPHEL
E_ROOT_DIR
=
`
dirname
"
$this
"
`
/..
NEPHELE_LIB_DIR
=
$NEPHEL
E_ROOT_DIR
/lib
# Define the main directory of the
stratospher
e installation
STRATOSPHER
E_ROOT_DIR
=
`
dirname
"
$this
"
`
/..
STRATOSPHERE_LIB_DIR
=
$STRATOSPHER
E_ROOT_DIR
/lib
# These need to be mangled because they are directly passed to java.
# The above lib path is used by the shell script to retrieve jars in a
# directory, so it needs to be unmangled.
NEPHELE_ROOT_DIR_MANGLED
=
`
manglePath
$NEPHEL
E_ROOT_DIR
`
NEPHELE_CONF_DIR
=
$NEPHEL
E_ROOT_DIR_MANGLED
/conf
NEPHELE_BIN_DIR
=
$NEPHEL
E_ROOT_DIR_MANGLED
/bin
NEPHELE_LOG_DIR
=
$NEPHEL
E_ROOT_DIR_MANGLED
/log
YAML_CONF
=
${
NEPHEL
E_CONF_DIR
}
/stratosphere-conf.yaml
STRATOSPHERE_ROOT_DIR_MANGLED
=
`
manglePath
$STRATOSPHER
E_ROOT_DIR
`
STRATOSPHERE_CONF_DIR
=
$STRATOSPHER
E_ROOT_DIR_MANGLED
/conf
STRATOSPHERE_BIN_DIR
=
$STRATOSPHER
E_ROOT_DIR_MANGLED
/bin
STRATOSPHERE_LOG_DIR
=
$STRATOSPHER
E_ROOT_DIR_MANGLED
/log
YAML_CONF
=
${
STRATOSPHER
E_CONF_DIR
}
/stratosphere-conf.yaml
########################################################################################################################
# ENVIRONMENT VARIABLES
...
...
@@ -151,30 +151,30 @@ if [ -z "${HOSTNAME}" ]; then
HOSTNAME
=
`
hostname
`
fi
# Define
NEPHEL
E_JM_HEAP if it is not already set
if
[
-z
"
${
NEPHEL
E_JM_HEAP
}
"
]
;
then
NEPHEL
E_JM_HEAP
=
$(
readFromConfig
${
KEY_JOBM_HEAP_MB
}
${
DEFAULT_JOBM_HEAP_MB
}
${
YAML_CONF
}
)
# Define
STRATOSPHER
E_JM_HEAP if it is not already set
if
[
-z
"
${
STRATOSPHER
E_JM_HEAP
}
"
]
;
then
STRATOSPHER
E_JM_HEAP
=
$(
readFromConfig
${
KEY_JOBM_HEAP_MB
}
${
DEFAULT_JOBM_HEAP_MB
}
${
YAML_CONF
}
)
fi
# Define
NEPHEL
E_TM_HEAP if it is not already set
if
[
-z
"
${
NEPHEL
E_TM_HEAP
}
"
]
;
then
NEPHEL
E_TM_HEAP
=
$(
readFromConfig
${
KEY_TASKM_HEAP_MB
}
${
DEFAULT_TASKM_HEAP_MB
}
${
YAML_CONF
}
)
# Define
STRATOSPHER
E_TM_HEAP if it is not already set
if
[
-z
"
${
STRATOSPHER
E_TM_HEAP
}
"
]
;
then
STRATOSPHER
E_TM_HEAP
=
$(
readFromConfig
${
KEY_TASKM_HEAP_MB
}
${
DEFAULT_TASKM_HEAP_MB
}
${
YAML_CONF
}
)
fi
if
[
-z
"
${
MAX_LOG_FILE_NUMBER
}
"
]
;
then
MAX_LOG_FILE_NUMBER
=
$(
readFromConfig
${
KEY_ENV_LOG_MAX
}
${
DEFAULT_ENV_LOG_MAX
}
${
YAML_CONF
}
)
fi
if
[
-z
"
${
NEPHEL
E_PID_DIR
}
"
]
;
then
NEPHEL
E_PID_DIR
=
$(
readFromConfig
${
KEY_ENV_PID_DIR
}
"
${
DEFAULT_ENV_PID_DIR
}
"
${
YAML_CONF
}
)
if
[
-z
"
${
STRATOSPHER
E_PID_DIR
}
"
]
;
then
STRATOSPHER
E_PID_DIR
=
$(
readFromConfig
${
KEY_ENV_PID_DIR
}
"
${
DEFAULT_ENV_PID_DIR
}
"
${
YAML_CONF
}
)
fi
if
[
-z
"
${
NEPHEL
E_OPTS
}
"
]
;
then
NEPHEL
E_OPTS
=
$(
readFromConfig
${
KEY_ENV_JAVA_OPTS
}
"
${
DEFAULT_ENV_JAVA_OPTS
}
"
${
YAML_CONF
}
)
if
[
-z
"
${
STRATOSPHER
E_OPTS
}
"
]
;
then
STRATOSPHER
E_OPTS
=
$(
readFromConfig
${
KEY_ENV_JAVA_OPTS
}
"
${
DEFAULT_ENV_JAVA_OPTS
}
"
${
YAML_CONF
}
)
fi
if
[
-z
"
${
NEPHEL
E_SSH_OPTS
}
"
]
;
then
NEPHEL
E_OPTS
=
$(
readFromConfig
${
KEY_ENV_SSH_OPTS
}
"
${
DEFAULT_ENV_SSH_OPTS
}
"
${
YAML_CONF
}
)
if
[
-z
"
${
STRATOSPHER
E_SSH_OPTS
}
"
]
;
then
STRATOSPHER
E_OPTS
=
$(
readFromConfig
${
KEY_ENV_SSH_OPTS
}
"
${
DEFAULT_ENV_SSH_OPTS
}
"
${
YAML_CONF
}
)
fi
# Arguments for the JVM. Used for job and task manager JVMs.
...
...
@@ -183,7 +183,7 @@ fi
JVM_ARGS
=
""
# Default classpath
CLASSPATH
=
`
manglePathList
$(
echo
$
NEPHEL
E_LIB_DIR
/
*
.jar
.
|
sed
's/ /:/g'
)
`
CLASSPATH
=
`
manglePathList
$(
echo
$
STRATOSPHER
E_LIB_DIR
/
*
.jar
.
|
sed
's/ /:/g'
)
`
# Auxilliary function which extracts the name of host from a line which
# also potentialy includes topology information and the instance type
...
...
stratosphere-dist/src/main/stratosphere-bin/bin/jobmanager.sh
浏览文件 @
1e2497b4
#!/bin/bash
########################################################################################################################
#
# Copyright (C) 2010 by the Stratosphere project (http://stratosphere.eu)
# Copyright (C) 2010
-2013
by the Stratosphere project (http://stratosphere.eu)
#
# 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
...
...
@@ -23,43 +23,42 @@ bin=`cd "$bin"; pwd`
.
"
$bin
"
/config.sh
if
[
"
$EXECUTIONMODE
"
=
"local"
]
;
then
NEPHELE_JM_HEAP
=
`
expr
$NEPHELE_JM_HEAP
+
$NEPHEL
E_TM_HEAP
`
STRATOSPHERE_JM_HEAP
=
`
expr
$STRATOSPHERE_JM_HEAP
+
$STRATOSPHER
E_TM_HEAP
`
fi
JVM_ARGS
=
"
$JVM_ARGS
-Xms"
$
NEPHELE_JM_HEAP
"m -Xmx"
$NEPHEL
E_JM_HEAP
"m"
JVM_ARGS
=
"
$JVM_ARGS
-Xms"
$
STRATOSPHERE_JM_HEAP
"m -Xmx"
$STRATOSPHER
E_JM_HEAP
"m"
if
[
"
$
NEPHEL
E_IDENT_STRING
"
=
""
]
;
then
NEPHEL
E_IDENT_STRING
=
"
$USER
"
if
[
"
$
STRATOSPHER
E_IDENT_STRING
"
=
""
]
;
then
STRATOSPHER
E_IDENT_STRING
=
"
$USER
"
fi
# auxilliary function to construct a lightweight classpath for the
# Nephele JobManager
# auxilliary function to construct a the classpath for the jobmanager
constructJobManagerClassPath
()
{
for
jarfile
in
$
NEPHEL
E_LIB_DIR
/
*
.jar
;
do
if
[[
$
NEPHEL
E_JM_CLASSPATH
=
""
]]
;
then
NEPHEL
E_JM_CLASSPATH
=
$jarfile
;
for
jarfile
in
$
STRATOSPHER
E_LIB_DIR
/
*
.jar
;
do
if
[[
$
STRATOSPHER
E_JM_CLASSPATH
=
""
]]
;
then
STRATOSPHER
E_JM_CLASSPATH
=
$jarfile
;
else
NEPHELE_JM_CLASSPATH
=
$NEPHEL
E_JM_CLASSPATH
:
$jarfile
STRATOSPHERE_JM_CLASSPATH
=
$STRATOSPHER
E_JM_CLASSPATH
:
$jarfile
fi
done
echo
$
NEPHEL
E_JM_CLASSPATH
echo
$
STRATOSPHER
E_JM_CLASSPATH
}
NEPHEL
E_JM_CLASSPATH
=
`
manglePathList
$(
constructJobManagerClassPath
)
`
STRATOSPHER
E_JM_CLASSPATH
=
`
manglePathList
$(
constructJobManagerClassPath
)
`
log
=
$
NEPHELE_LOG_DIR
/nephele-
$NEPHEL
E_IDENT_STRING
-jobmanager-
$HOSTNAME
.log
out
=
$
NEPHELE_LOG_DIR
/nephele-
$NEPHEL
E_IDENT_STRING
-jobmanager-
$HOSTNAME
.out
pid
=
$
NEPHELE_PID_DIR
/nephele-
$NEPHEL
E_IDENT_STRING
-jobmanager
.pid
log_setting
=
"-Dlog.file="
$log
" -Dlog4j.configuration=file:"
$
NEPHEL
E_CONF_DIR
"/log4j.properties"
log
=
$
STRATOSPHERE_LOG_DIR
/stratosphere-
$STRATOSPHER
E_IDENT_STRING
-jobmanager-
$HOSTNAME
.log
out
=
$
STRATOSPHERE_LOG_DIR
/stratosphere-
$STRATOSPHER
E_IDENT_STRING
-jobmanager-
$HOSTNAME
.out
pid
=
$
STRATOSPHERE_PID_DIR
/stratosphere-
$STRATOSPHER
E_IDENT_STRING
-jobmanager
.pid
log_setting
=
"-Dlog.file="
$log
" -Dlog4j.configuration=file:"
$
STRATOSPHER
E_CONF_DIR
"/log4j.properties"
case
$STARTSTOP
in
(
start
)
mkdir
-p
"
$
NEPHEL
E_PID_DIR
"
mkdir
-p
"
$
STRATOSPHER
E_PID_DIR
"
if
[
-f
$pid
]
;
then
if
kill
-0
`
cat
$pid
`
>
/dev/null 2>&1
;
then
echo
Nephele j
ob manager running as process
`
cat
$pid
`
.
Stop it first.
echo
J
ob manager running as process
`
cat
$pid
`
.
Stop it first.
exit
1
fi
fi
...
...
@@ -68,21 +67,21 @@ case $STARTSTOP in
rotateLogFile
$log
rotateLogFile
$out
echo
Starting
Nephele
job manager
$JAVA_RUN
$JVM_ARGS
$
NEPHELE_OPTS
$log_setting
-classpath
$NEPHELE_JM_CLASSPATH
eu.stratosphere.nephele.jobmanager.JobManager
-executionMode
$EXECUTIONMODE
-configDir
$NEPHEL
E_CONF_DIR
>
"
$out
"
2>&1 < /dev/null &
echo
Starting job manager
$JAVA_RUN
$JVM_ARGS
$
STRATOSPHERE_OPTS
$log_setting
-classpath
$STRATOSPHERE_JM_CLASSPATH
eu.stratosphere.nephele.jobmanager.JobManager
-executionMode
$EXECUTIONMODE
-configDir
$STRATOSPHER
E_CONF_DIR
>
"
$out
"
2>&1 < /dev/null &
echo
$!
>
$pid
;;
(
stop
)
if
[
-f
$pid
]
;
then
if
kill
-0
`
cat
$pid
`
>
/dev/null 2>&1
;
then
echo
Stopping
Nephele
job manager
echo
Stopping job manager
kill
`
cat
$pid
`
else
echo
No
Nephele
job manager to stop
echo
No job manager to stop
fi
else
echo
No
Nephele
job manager to stop
echo
No job manager to stop
fi
;;
...
...
stratosphere-dist/src/main/stratosphere-bin/bin/start-cluster.sh
浏览文件 @
1e2497b4
#!/bin/bash
########################################################################################################################
#
# Copyright (C) 2010 by the Stratosphere project (http://stratosphere.eu)
# Copyright (C) 2010
-2013
by the Stratosphere project (http://stratosphere.eu)
#
# 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
...
...
@@ -19,10 +19,10 @@ bin=`cd "$bin"; pwd`
.
"
$bin
"
/config.sh
HOSTLIST
=
$
NEPHEL
E_SLAVES
HOSTLIST
=
$
STRATOSPHER
E_SLAVES
if
[
"
$HOSTLIST
"
=
""
]
;
then
HOSTLIST
=
"
${
NEPHEL
E_CONF_DIR
}
/slaves"
HOSTLIST
=
"
${
STRATOSPHER
E_CONF_DIR
}
/slaves"
fi
if
[
!
-f
$HOSTLIST
]
;
then
...
...
@@ -30,8 +30,8 @@ if [ ! -f $HOSTLIST ]; then
exit
1
fi
# cluster mode,
only
bring up job manager locally and a task manager on every slave host
$
NEPHEL
E_BIN_DIR
/jobmanager.sh start cluster
# cluster mode, bring up job manager locally and a task manager on every slave host
$
STRATOSPHER
E_BIN_DIR
/jobmanager.sh start cluster
GOON
=
true
while
$GOON
...
...
@@ -39,6 +39,6 @@ do
read
line
||
GOON
=
false
if
[
-n
"
$line
"
]
;
then
HOST
=
$(
extractHostName
$line
)
ssh
-n
$
NEPHELE_SSH_OPTS
$HOST
--
"nohup /bin/bash
$NEPHEL
E_BIN_DIR
/taskmanager.sh start &"
ssh
-n
$
STRATOSPHERE_SSH_OPTS
$HOST
--
"nohup /bin/bash
$STRATOSPHER
E_BIN_DIR
/taskmanager.sh start &"
fi
done
<
$HOSTLIST
stratosphere-dist/src/main/stratosphere-bin/bin/start-local.sh
浏览文件 @
1e2497b4
#!/bin/bash
########################################################################################################################
#
# Copyright (C) 2010 by the Stratosphere project (http://stratosphere.eu)
# Copyright (C) 2010
-2013
by the Stratosphere project (http://stratosphere.eu)
#
# 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
...
...
@@ -19,5 +19,5 @@ bin=`cd "$bin"; pwd`
.
"
$bin
"
/config.sh
# local mode, only bring up job manager. The job manager will
take care to bring a task manager internally.
$
NEPHEL
E_BIN_DIR
/jobmanager.sh start
local
# local mode, only bring up job manager. The job manager will
start an internal task manager
$
STRATOSPHER
E_BIN_DIR
/jobmanager.sh start
local
stratosphere-dist/src/main/stratosphere-bin/bin/start-webclient.sh
浏览文件 @
1e2497b4
#!/bin/bash
########################################################################################################################
#
# Copyright (C) 2010 by the Stratosphere project (http://stratosphere.eu)
# Copyright (C) 2010
-2013
by the Stratosphere project (http://stratosphere.eu)
#
# 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
...
...
@@ -19,5 +19,4 @@ bin=`cd "$bin"; pwd`
.
"
$bin
"
/config.sh
# local mode, only bring up job manager. The job manager will take care to bring a task manager internally.
$NEPHELE_BIN_DIR
/webclient.sh start
$STRATOSPHERE_BIN_DIR
/webclient.sh start
stratosphere-dist/src/main/stratosphere-bin/bin/stop-cluster.sh
浏览文件 @
1e2497b4
#!/bin/bash
########################################################################################################################
#
# Copyright (C) 2010 by the Stratosphere project (http://stratosphere.eu)
# Copyright (C) 2010
-2013
by the Stratosphere project (http://stratosphere.eu)
#
# 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
...
...
@@ -19,10 +19,10 @@ bin=`cd "$bin"; pwd`
.
"
$bin
"
/config.sh
HOSTLIST
=
$
NEPHEL
E_SLAVES
HOSTLIST
=
$
STRATOSPHER
E_SLAVES
if
[
"
$HOSTLIST
"
=
""
]
;
then
HOSTLIST
=
"
${
NEPHEL
E_CONF_DIR
}
/slaves"
HOSTLIST
=
"
${
STRATOSPHER
E_CONF_DIR
}
/slaves"
fi
if
[
!
-f
$HOSTLIST
]
;
then
...
...
@@ -30,8 +30,8 @@ if [ ! -f $HOSTLIST ]; then
exit
1
fi
# cluster mode,
only bring up job manager locally and a
task manager on every slave host
$
NEPHEL
E_BIN_DIR
/jobmanager.sh stop
# cluster mode,
stop the job manager locally and stop the
task manager on every slave host
$
STRATOSPHER
E_BIN_DIR
/jobmanager.sh stop
GOON
=
true
while
$GOON
...
...
@@ -39,6 +39,6 @@ do
read
line
||
GOON
=
false
if
[
-n
"
$line
"
]
;
then
HOST
=
$(
extractHostName
$line
)
ssh
-n
$
NEPHELE_SSH_OPTS
$HOST
--
"nohup /bin/bash
$NEPHEL
E_BIN_DIR
/taskmanager.sh stop &"
ssh
-n
$
STRATOSPHERE_SSH_OPTS
$HOST
--
"nohup /bin/bash
$STRATOSPHER
E_BIN_DIR
/taskmanager.sh stop &"
fi
done
<
$HOSTLIST
stratosphere-dist/src/main/stratosphere-bin/bin/stop-local.sh
浏览文件 @
1e2497b4
#!/bin/bash
########################################################################################################################
#
# Copyright (C) 2010 by the Stratosphere project (http://stratosphere.eu)
# Copyright (C) 2010
-2013
by the Stratosphere project (http://stratosphere.eu)
#
# 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
...
...
@@ -19,5 +19,5 @@ bin=`cd "$bin"; pwd`
.
"
$bin
"
/config.sh
# stop local job manager
. Local job manager will take care of stopping the task manager internally
$
NEPHEL
E_BIN_DIR
/jobmanager.sh stop
# stop local job manager
(has an internal task manager)
$
STRATOSPHER
E_BIN_DIR
/jobmanager.sh stop
stratosphere-dist/src/main/stratosphere-bin/bin/stop-webclient.sh
浏览文件 @
1e2497b4
#!/bin/bash
########################################################################################################################
#
# Copyright (C) 2010 by the Stratosphere project (http://stratosphere.eu)
# Copyright (C) 2010
-2013
by the Stratosphere project (http://stratosphere.eu)
#
# 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
...
...
@@ -19,5 +19,4 @@ bin=`cd "$bin"; pwd`
.
"
$bin
"
/config.sh
# local mode, only bring up job manager. The job manager will take care to bring a task manager internally.
$NEPHELE_BIN_DIR
/webclient.sh stop
$STRATOSPHERE_BIN_DIR
/webclient.sh stop
stratosphere-dist/src/main/stratosphere-bin/bin/swt-visualization.sh
浏览文件 @
1e2497b4
#!/bin/bash
########################################################################################################################
#
# Copyright (C) 2010 by the Stratosphere project (http://stratosphere.eu)
# Copyright (C) 2010
-2013
by the Stratosphere project (http://stratosphere.eu)
#
# 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
...
...
@@ -19,28 +19,27 @@ bin=`cd "$bin"; pwd`
.
"
$bin
"
/config.sh
if
[
"
$
NEPHEL
E_IDENT_STRING
"
=
""
]
;
then
NEPHEL
E_IDENT_STRING
=
"
$USER
"
if
[
"
$
STRATOSPHER
E_IDENT_STRING
"
=
""
]
;
then
STRATOSPHER
E_IDENT_STRING
=
"
$USER
"
fi
# auxilliary function to construct a lightweight classpath for the
# Nephele visualization component
# auxilliary function to construct the classpath for the swt visualization component
constructVisualizationClassPath
()
{
for
jarfile
in
$
NEPHEL
E_LIB_DIR
/
*
.jar
;
do
if
[[
$
NEPHEL
E_VS_CLASSPATH
=
""
]]
;
then
NEPHEL
E_VS_CLASSPATH
=
$jarfile
;
for
jarfile
in
$
STRATOSPHER
E_LIB_DIR
/
*
.jar
;
do
if
[[
$
STRATOSPHER
E_VS_CLASSPATH
=
""
]]
;
then
STRATOSPHER
E_VS_CLASSPATH
=
$jarfile
;
else
NEPHELE_VS_CLASSPATH
=
$NEPHEL
E_VS_CLASSPATH
:
$jarfile
STRATOSPHERE_VS_CLASSPATH
=
$STRATOSPHER
E_VS_CLASSPATH
:
$jarfile
fi
done
echo
$
NEPHEL
E_VS_CLASSPATH
echo
$
STRATOSPHER
E_VS_CLASSPATH
}
log
=
$
NEPHELE_LOG_DIR
/nephele-
$NEPHEL
E_IDENT_STRING
-visualization-
$HOSTNAME
.log
log_setting
=
"-Dlog.file="
$log
" -Dlog4j.configuration=file://"
$
NEPHEL
E_CONF_DIR
"/log4j.properties"
log
=
$
STRATOSPHERE_LOG_DIR
/stratosphere-
$STRATOSPHER
E_IDENT_STRING
-visualization-
$HOSTNAME
.log
log_setting
=
"-Dlog.file="
$log
" -Dlog4j.configuration=file://"
$
STRATOSPHER
E_CONF_DIR
"/log4j.properties"
NEPHEL
E_VS_CLASSPATH
=
$(
constructVisualizationClassPath
)
STRATOSPHER
E_VS_CLASSPATH
=
$(
constructVisualizationClassPath
)
$JAVA_RUN
$JVM_ARGS
$
NEPHELE_OPTS
$log_setting
-classpath
$NEPHELE_VS_CLASSPATH
eu.stratosphere.addons.visualization.swt.SWTVisualization
-configDir
$NEPHEL
E_CONF_DIR
$JAVA_RUN
$JVM_ARGS
$
STRATOSPHERE_OPTS
$log_setting
-classpath
$STRATOSPHERE_VS_CLASSPATH
eu.stratosphere.addons.visualization.swt.SWTVisualization
-configDir
$STRATOSPHER
E_CONF_DIR
stratosphere-dist/src/main/stratosphere-bin/bin/taskmanager.sh
浏览文件 @
1e2497b4
#!/bin/bash
########################################################################################################################
#
# Copyright (C) 2010 by the Stratosphere project (http://stratosphere.eu)
# Copyright (C) 2010
-2013
by the Stratosphere project (http://stratosphere.eu)
#
# 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
...
...
@@ -21,41 +21,41 @@ bin=`cd "$bin"; pwd`
.
"
$bin
"
/config.sh
if
[
"
$
NEPHEL
E_IDENT_STRING
"
=
""
]
;
then
NEPHEL
E_IDENT_STRING
=
"
$USER
"
if
[
"
$
STRATOSPHER
E_IDENT_STRING
"
=
""
]
;
then
STRATOSPHER
E_IDENT_STRING
=
"
$USER
"
fi
# auxilliary function to construct a lightweight classpath for the
# Nephele TaskManager
constructTaskManagerClassPath
()
{
for
jarfile
in
$
NEPHEL
E_LIB_DIR
/
*
.jar
;
do
if
[[
$
NEPHEL
E_TM_CLASSPATH
=
""
]]
;
then
NEPHEL
E_TM_CLASSPATH
=
$jarfile
;
for
jarfile
in
$
STRATOSPHER
E_LIB_DIR
/
*
.jar
;
do
if
[[
$
STRATOSPHER
E_TM_CLASSPATH
=
""
]]
;
then
STRATOSPHER
E_TM_CLASSPATH
=
$jarfile
;
else
NEPHELE_TM_CLASSPATH
=
$NEPHEL
E_TM_CLASSPATH
:
$jarfile
STRATOSPHERE_TM_CLASSPATH
=
$STRATOSPHER
E_TM_CLASSPATH
:
$jarfile
fi
done
echo
$
NEPHEL
E_TM_CLASSPATH
echo
$
STRATOSPHER
E_TM_CLASSPATH
}
NEPHEL
E_TM_CLASSPATH
=
`
manglePathList
$(
constructTaskManagerClassPath
)
`
STRATOSPHER
E_TM_CLASSPATH
=
`
manglePathList
$(
constructTaskManagerClassPath
)
`
log
=
$
NEPHELE_LOG_DIR
/nephele-
$NEPHEL
E_IDENT_STRING
-taskmanager-
$HOSTNAME
.log
out
=
$
NEPHELE_LOG_DIR
/nephele-
$NEPHEL
E_IDENT_STRING
-taskmanager-
$HOSTNAME
.out
pid
=
$
NEPHELE_PID_DIR
/nephele-
$NEPHEL
E_IDENT_STRING
-taskmanager
.pid
log_setting
=
"-Dlog.file="
$log
" -Dlog4j.configuration=file:"
$
NEPHEL
E_CONF_DIR
"/log4j.properties"
log
=
$
STRATOSPHERE_LOG_DIR
/stratosphere-
$STRATOSPHER
E_IDENT_STRING
-taskmanager-
$HOSTNAME
.log
out
=
$
STRATOSPHERE_LOG_DIR
/stratosphere-
$STRATOSPHER
E_IDENT_STRING
-taskmanager-
$HOSTNAME
.out
pid
=
$
STRATOSPHERE_PID_DIR
/stratosphere-
$STRATOSPHER
E_IDENT_STRING
-taskmanager
.pid
log_setting
=
"-Dlog.file="
$log
" -Dlog4j.configuration=file:"
$
STRATOSPHER
E_CONF_DIR
"/log4j.properties"
JVM_ARGS
=
"
$JVM_ARGS
-XX:+UseParNewGC -XX:NewRatio=8 -XX:PretenureSizeThreshold=64m -Xms"
$
NEPHELE_TM_HEAP
"m -Xmx"
$NEPHEL
E_TM_HEAP
"m"
JVM_ARGS
=
"
$JVM_ARGS
-XX:+UseParNewGC -XX:NewRatio=8 -XX:PretenureSizeThreshold=64m -Xms"
$
STRATOSPHERE_TM_HEAP
"m -Xmx"
$STRATOSPHER
E_TM_HEAP
"m"
case
$STARTSTOP
in
(
start
)
mkdir
-p
"
$
NEPHEL
E_PID_DIR
"
mkdir
-p
"
$
STRATOSPHER
E_PID_DIR
"
if
[
-f
$pid
]
;
then
if
kill
-0
`
cat
$pid
`
>
/dev/null 2>&1
;
then
echo
Nephele t
ask manager running as process
`
cat
$pid
`
on host
$HOSTNAME
.
Stop it first.
echo
T
ask manager running as process
`
cat
$pid
`
on host
$HOSTNAME
.
Stop it first.
exit
1
fi
fi
...
...
@@ -64,21 +64,21 @@ case $STARTSTOP in
rotateLogFile
$log
rotateLogFile
$out
echo
Starting
Nephele
task manager on host
$HOSTNAME
$JAVA_RUN
$JVM_ARGS
$
NEPHELE_OPTS
$log_setting
-classpath
$NEPHELE_TM_CLASSPATH
eu.stratosphere.nephele.taskmanager.TaskManager
-configDir
$NEPHEL
E_CONF_DIR
>
"
$out
"
2>&1 < /dev/null &
echo
Starting task manager on host
$HOSTNAME
$JAVA_RUN
$JVM_ARGS
$
STRATOSPHERE_OPTS
$log_setting
-classpath
$STRATOSPHERE_TM_CLASSPATH
eu.stratosphere.nephele.taskmanager.TaskManager
-configDir
$STRATOSPHER
E_CONF_DIR
>
"
$out
"
2>&1 < /dev/null &
echo
$!
>
$pid
;;
(
stop
)
if
[
-f
$pid
]
;
then
if
kill
-0
`
cat
$pid
`
>
/dev/null 2>&1
;
then
echo
Stopping
Nephele
task manager on host
$HOSTNAME
echo
Stopping task manager on host
$HOSTNAME
kill
`
cat
$pid
`
else
echo
No
Nephele
task manager to stop on host
$HOSTNAME
echo
No task manager to stop on host
$HOSTNAME
fi
else
echo
No
Nephele
task manager to stop on host
$HOSTNAME
echo
No task manager to stop on host
$HOSTNAME
fi
;;
...
...
stratosphere-dist/src/main/stratosphere-bin/bin/webclient.sh
浏览文件 @
1e2497b4
#!/bin/bash
########################################################################################################################
#
# Copyright (C) 2010 by the Stratosphere project (http://stratosphere.eu)
# Copyright (C) 2010
-2013
by the Stratosphere project (http://stratosphere.eu)
#
# 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
...
...
@@ -22,65 +22,64 @@ bin=`cd "$bin"; pwd`
# get nephele config
.
"
$bin
"
/config.sh
if
[
"
$
NEPHEL
E_IDENT_STRING
"
=
""
]
;
then
NEPHEL
E_IDENT_STRING
=
"
$USER
"
if
[
"
$
STRATOSPHER
E_IDENT_STRING
"
=
""
]
;
then
STRATOSPHER
E_IDENT_STRING
=
"
$USER
"
fi
NEPHELE_LIB_CLIENTS_DIR
=
$NEPHEL
E_ROOT_DIR
/lib_clients
STRATOSPHERE_LIB_CLIENTS_DIR
=
$STRATOSPHER
E_ROOT_DIR
/lib_clients
JVM_ARGS
=
"
$JVM_ARGS
-Xmx512m"
# auxilliary function to construct a lightweight classpath for the
# PACT Webfrontend
constructPactWebFrontendClassPath
()
{
# auxilliary function to construct the classpath for the webclient
constructWebclientClassPath
()
{
for
jarfile
in
$
NEPHEL
E_LIB_DIR
/
*
.jar
;
do
if
[[
$
PACT_WF
_CLASSPATH
=
""
]]
;
then
PACT_WF
_CLASSPATH
=
$jarfile
;
for
jarfile
in
$
STRATOSPHER
E_LIB_DIR
/
*
.jar
;
do
if
[[
$
STRATOSPHERE_WEBCLIENT
_CLASSPATH
=
""
]]
;
then
STRATOSPHERE_WEBCLIENT
_CLASSPATH
=
$jarfile
;
else
PACT_WF_CLASSPATH
=
$PACT_WF
_CLASSPATH
:
$jarfile
STRATOSPHERE_WEBCLIENT_CLASSPATH
=
$STRATOSPHERE_WEBCLIENT
_CLASSPATH
:
$jarfile
fi
done
for
jarfile
in
$
NEPHEL
E_LIB_CLIENTS_DIR
/
*
.jar
;
do
PACT_WF_CLASSPATH
=
$PACT_WF
_CLASSPATH
:
$jarfile
for
jarfile
in
$
STRATOSPHER
E_LIB_CLIENTS_DIR
/
*
.jar
;
do
STRATOSPHERE_WEBCLIENT_CLASSPATH
=
$STRATOSPHERE_WEBCLIENT
_CLASSPATH
:
$jarfile
done
echo
$
PACT_WF
_CLASSPATH
echo
$
STRATOSPHERE_WEBCLIENT
_CLASSPATH
}
PACT_WF_CLASSPATH
=
`
manglePathList
$(
constructPactWebFrontend
ClassPath
)
`
STRATOSPHERE_WEBCLIENT_CLASSPATH
=
`
manglePathList
$(
constructWebclient
ClassPath
)
`
log
=
$
NEPHELE_LOG_DIR
/nephele-
$NEPHELE_IDENT_STRING
-pact-web
-
$HOSTNAME
.log
out
=
$
NEPHELE_LOG_DIR
/nephele-
$NEPHELE_IDENT_STRING
-pact-web
-
$HOSTNAME
.out
pid
=
$
NEPHELE_PID_DIR
/nephele-
$NEPHELE_IDENT_STRING
-pact-web
.pid
log_setting
=
"-Dlog.file="
$log
" -Dlog4j.configuration=file:"
$
NEPHEL
E_CONF_DIR
"/log4j.properties"
log
=
$
STRATOSPHERE_LOG_DIR
/stratosphere-
$STRATOSPHERE_IDENT_STRING
-webclient
-
$HOSTNAME
.log
out
=
$
STRATOSPHERE_LOG_DIR
/stratosphere-
$STRATOSPHERE_IDENT_STRING
-webclient
-
$HOSTNAME
.out
pid
=
$
STRATOSPHERE_PID_DIR
/stratosphere-
$STRATOSPHERE_IDENT_STRING
-webclient
.pid
log_setting
=
"-Dlog.file="
$log
" -Dlog4j.configuration=file:"
$
STRATOSPHER
E_CONF_DIR
"/log4j.properties"
case
$STARTSTOP
in
(
start
)
mkdir
-p
"
$
NEPHEL
E_PID_DIR
"
mkdir
-p
"
$
STRATOSPHER
E_PID_DIR
"
if
[
-f
$pid
]
;
then
if
kill
-0
`
cat
$pid
`
>
/dev/null 2>&1
;
then
echo
PACT Webfrontend
running as process
`
cat
$pid
`
.
Stop it first.
echo
Stratosphere webclient
running as process
`
cat
$pid
`
.
Stop it first.
exit
1
fi
fi
echo
Starting
PACT Webfrontend
$JAVA_RUN
$JVM_ARGS
$log_setting
-classpath
$
PACT_WF_CLASSPATH
eu.stratosphere.client.WebFrontend
-configDir
$NEPHEL
E_CONF_DIR
>
"
$out
"
2>&1 < /dev/null &
echo
Starting
Stratosphere webclient
$JAVA_RUN
$JVM_ARGS
$log_setting
-classpath
$
STRATOSPHERE_WEBCLIENT_CLASSPATH
eu.stratosphere.client.WebFrontend
-configDir
$STRATOSPHER
E_CONF_DIR
>
"
$out
"
2>&1 < /dev/null &
echo
$!
>
$pid
;;
(
stop
)
if
[
-f
$pid
]
;
then
if
kill
-0
`
cat
$pid
`
>
/dev/null 2>&1
;
then
echo
Stopping
PACT Webfrontend
echo
Stopping
Stratosphere webclient
kill
`
cat
$pid
`
else
echo
No
PACT Webfrontend
to stop
echo
No
Stratosphere webclient
to stop
fi
else
echo
No
PACT Webfrontend
to stop
echo
No
Stratosphere webclient
to stop
fi
;;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录