keith-turner commented on a change in pull request #1: Initial implementation of Apache Fluo YARN launcher URL: https://github.com/apache/fluo-yarn/pull/1#discussion_r131766475
########## File path: distribution/bin/fluo-yarn ########## @@ -0,0 +1,103 @@ +#! /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. + +SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SOURCE" ]; do + bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + SOURCE="$(readlink "$SOURCE")" + [[ $SOURCE != /* ]] && SOURCE="$bin/$SOURCE" +done +# Set up variables needed by fluo-env.sh +export bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )" +export basedir="$( cd -P ${bin}/.. && pwd )" +export conf="$basedir/conf" +export lib="$basedir/lib" +export cmd="$1" +case "$cmd" in + start) export app="$2" ;; +esac +export FLUO_YARN_VERSION=${project.version} + +if [ ! -f "$conf/fluo-yarn-env.sh" ]; then + echo "fluo-yarn-env.sh must exist in $conf" + exit 1 +fi +source "$conf/fluo-yarn-env.sh" +export CLASSPATH + +# stop if any command fails +set -e + +function print_usage { + echo -e "Usage: fluo-yarn <command> (<argument> ...)\n" + echo -e "Possible commands:\n" + echo " classpath Prints the classpath setup by fluo-yarn-env.sh" + echo " start <app> <yarnProps> Starts Fluo <app> in YARN using <yarnProps>" + echo " version Prints the version of Fluo YARN launcher" + echo " " + exit 1 +} + +function build_bundled_jar { + app_dir=$lib/apps/$app + mkdir -p "$app_dir/lib" + + java org.apache.fluo.command.FluoGetJars "$FLUO_CONN_PROPS" "$app" "$app_dir/lib" Review comment: What happens if this fails for some reason? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services