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_r132493578
 
 

 ##########
 File path: distribution/lib/fetch.sh
 ##########
 @@ -0,0 +1,81 @@
+#! /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.
+
+lib_dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+maven_prefix=https://repo1.maven.org/maven2
+
+function download {
+  IFS=':' read -ra DEP <<< "$1" 
+  dir=$lib_dir/
+  if [ -n "$2" ]; then
+    dir=$lib_dir/$2
+    if [ ! -d $dir ]; then
+      mkdir $dir
+    fi
+  fi
+  group=${DEP[0]}
+  artifact=${DEP[1]}
+  ftype=${DEP[2]}
+  version=${DEP[3]}
+  fn=$artifact-$version.$ftype
+  path="${group//.//}/$artifact/$version/$fn"
+  download_url=$maven_prefix/$path
+
+  if [ -f $dir/$fn ]; then
+    echo "SUCCESS: Dependency exists - $dir/$fn"
+  else 
+    wget -q $download_url -P $dir
+    if [ $? == 0 ]; then
+      echo "SUCCESS: Dependency downloaded from $download_url"
+    else
+      echo "ERROR: Dependency download failed - $download_url"
+    fi
+  fi
+}
+
+echo "Fetching Fluo YARN launcher dependencies"
+download aopalliance:aopalliance:jar:1.0
+download ch.qos.logback:logback-classic:jar:1.1.3
+download ch.qos.logback:logback-core:jar:1.1.3
+download com.101tec:zkclient:jar:0.3
+download com.google.code.findbugs:jsr305:jar:2.0.1
+download com.google.code.gson:gson:jar:2.8.0
+download com.google.guava:guava:jar:13.0.1
+download com.yammer.metrics:metrics-annotation:jar:2.2.0
+download com.yammer.metrics:metrics-core:jar:2.2.0
+download net.sf.jopt-simple:jopt-simple:jar:3.2
+download org.apache.kafka:kafka_2.10:jar:0.8.0
+download org.apache.twill:twill-api:jar:0.11.0
+download org.apache.twill:twill-common:jar:0.11.0
+download org.apache.twill:twill-core:jar:0.11.0
+download org.apache.twill:twill-discovery-api:jar:0.11.0
+download org.apache.twill:twill-discovery-core:jar:0.11.0
+download org.apache.twill:twill-ext:jar:0.11.0
+download org.apache.twill:twill-yarn:jar:0.11.0
+download org.apache.twill:twill-zookeeper:jar:0.11.0
 
 Review comment:
   Seems like the zookeeper jar should also be in this list.
 
----------------------------------------------------------------
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

Reply via email to