提交 ee6515c4 编写于 作者: R Robert Metzger

[dist] deploy yarn in a separate compressed file

上级 70b35d92
......@@ -128,6 +128,7 @@
</archive>
<descriptors>
<descriptor>src/main/assemblies/yarn-uberjar.xml</descriptor>
<descriptor>src/main/assemblies/yarn.xml</descriptor>
</descriptors>
</configuration>
</execution>
......
......@@ -4,7 +4,6 @@
<!-- Note: This file has been copied and adapted from: http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html#jar-with-dependencies -->
<!-- TODO: a jarjar format would be better -->
<id>yarn-uberjar</id>
<formats>
<format>jar</format>
......
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>bin</id>
<formats>
<format>tar.gz</format>
<!--
<format>tar.gz</format>
<format>zip</format>
-->
</formats>
<includeBaseDirectory>true</includeBaseDirectory>
<baseDirectory>stratosphere-yarn-${project.version}</baseDirectory>
<files>
<!-- copy default configuration -->
<file>
<source>src/main/stratosphere-bin/conf/stratosphere-conf.yaml</source>
<outputDirectory>conf</outputDirectory>
<fileMode>0644</fileMode>
</file>
<file>
<source>src/main/stratosphere-bin/conf/log4j.properties</source>
<outputDirectory>conf</outputDirectory>
<fileMode>0644</fileMode>
</file>
<!-- copy uberjar -->
<file>
<source>target/stratosphere-dist-${project.version}-yarn-uberjar.jar</source>
<outputDirectory>lib/</outputDirectory>
<fileMode>0644</fileMode>
</file>
<!-- copy stratosphere client -->
<file>
<source>src/main/stratosphere-bin/bin/stratosphere</source>
<outputDirectory>bin/</outputDirectory>
<fileMode>0644</fileMode>
</file>
<file>
<source>src/main/stratosphere-bin/bin/config.sh</source>
<outputDirectory>bin/</outputDirectory>
<fileMode>0644</fileMode>
</file>
</files>
<fileSets>
<fileSet>
<!-- copy start scripts -->
<directory>src/main/stratosphere-bin/yarn-bin</directory>
<outputDirectory>bin</outputDirectory>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<!-- create an empty log directory -->
<directory>src/main/stratosphere-bin/</directory>
<outputDirectory>log</outputDirectory>
<fileMode>0644</fileMode>
<excludes>
<exclude>**/*</exclude>
</excludes>
</fileSet>
<fileSet>
<!-- copy *.txt files -->
<directory>src/main/stratosphere-bin/</directory>
<outputDirectory></outputDirectory>
<fileMode>0644</fileMode>
<includes>
<include>*.txt</include>
<include>*.properties</include>
</includes>
</fileSet>
<!-- copy the tools -->
<fileSet>
<directory>src/main/stratosphere-bin/tools</directory>
<outputDirectory>tools</outputDirectory>
<fileMode>0644</fileMode>
</fileSet>
<fileSet>
<!-- copy jar files of java examples -->
<directory>../stratosphere-examples/stratosphere-java-examples/target</directory>
<outputDirectory>examples</outputDirectory>
<fileMode>0644</fileMode>
<includes>
<include>*.jar</include>
</includes>
<excludes>
<exclude>stratosphere-java-examples-${project.version}.jar</exclude>
<exclude>stratosphere-java-examples-${project.version}-sources.jar</exclude>
</excludes>
</fileSet>
<fileSet>
<!-- copy jar files of scala examples -->
<directory>../stratosphere-examples/stratosphere-scala-examples/target</directory>
<outputDirectory>examples</outputDirectory>
<fileMode>0644</fileMode>
<includes>
<include>*.jar</include>
</includes>
<excludes>
<exclude>stratosphere-scala-examples-${project.version}.jar</exclude>
<exclude>stratosphere-scala-examples-${project.version}-sources.jar</exclude>
</excludes>
</fileSet>
</fileSets>
</assembly>
#!/bin/bash
########################################################################################################################
#
# Copyright (C) 2014 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
#
# 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.
#
########################################################################################################################
bin=`dirname "$0"`
bin=`cd "$bin"; pwd`
# get stratosphere config
. "$bin"/config.sh
if [ "$STRATOSPHERE_IDENT_STRING" = "" ]; then
STRATOSPHERE_IDENT_STRING="$USER"
fi
JVM_ARGS="$JVM_ARGS -Xmx512m"
# auxilliary function to construct a lightweight classpath for the
# Stratosphere CLI client
constructCLIClientClassPath() {
for jarfile in $STRATOSPHERE_LIB_DIR/*.jar ; do
if [[ $CC_CLASSPATH = "" ]]; then
CC_CLASSPATH=$jarfile;
else
CC_CLASSPATH=$CC_CLASSPATH:$jarfile
fi
done
echo $CC_CLASSPATH
}
CC_CLASSPATH=`manglePathList $(constructCLIClientClassPath)`
log=$STRATOSPHERE_LOG_DIR/stratosphere-$STRATOSPHERE_IDENT_STRING-yarn-session-$HOSTNAME.log
log_setting="-Dlog.file="$log" -Dlog4j.configuration=file:"$STRATOSPHERE_CONF_DIR"/log4j.properties"
export STRATOSPHERE_CONF_DIR
$JAVA_RUN $JVM_ARGS $log_setting -classpath $CC_CLASSPATH eu.stratosphere.yarn.Client -j $STRATOSPHERE_LIB_DIR/*yarn-uberjar.jar -c $STRATOSPHERE_CONF_DIR/stratosphere-conf.yaml $*
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册