Skip to content

Commit

Permalink
Merge pull request #8 from MBtech/master
Browse files Browse the repository at this point in the history
Fix for Apache Mirror URLs
  • Loading branch information
revans2 committed Jan 22, 2016
2 parents ced7406 + e02580f commit a140e1c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions stream-bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ KAFKA_DIR="kafka_$SCALA_BIN_VERSION-$KAFKA_VERSION"
FLINK_DIR="flink-$FLINK_VERSION"
SPARK_DIR="spark-$SPARK_VERSION-bin-hadoop2.6"

#Get one of the closet apache mirrors
APACHE_MIRROR=$(curl 'https://www.apache.org/dyn/closer.cgi' | grep -o '<strong>[^<]*</strong>' | sed 's/<[^>]*>//g' | head -1)

ZK_HOST="localhost"
ZK_PORT="2181"
ZK_CONNECTIONS="$ZK_HOST:$ZK_PORT"
Expand Down Expand Up @@ -133,19 +136,19 @@ run() {

#Fetch Kafka
KAFKA_FILE="$KAFKA_DIR.tgz"
fetch_untar_file "$KAFKA_FILE" "http://mirrors.advancedhosters.com/apache/kafka/$KAFKA_VERSION/$KAFKA_FILE"
fetch_untar_file "$KAFKA_FILE" "$APACHE_MIRROR/kafka/$KAFKA_VERSION/$KAFKA_FILE"

#Fetch Storm
STORM_FILE="$STORM_DIR.tar.gz"
fetch_untar_file "$STORM_FILE" "http://www.interior-dsgn.com/apache/storm/$STORM_DIR/$STORM_FILE"
fetch_untar_file "$STORM_FILE" "$APACHE_MIRROR/storm/$STORM_DIR/$STORM_FILE"

#Fetch Flink
FLINK_FILE="$FLINK_DIR-bin-hadoop27-scala_${SCALA_BIN_VERSION}.tgz"
fetch_untar_file "$FLINK_FILE" "http://apache.mirrorcatalogs.com/flink/flink-$FLINK_VERSION/$FLINK_FILE"
fetch_untar_file "$FLINK_FILE" "$APACHE_MIRROR/flink/flink-$FLINK_VERSION/$FLINK_FILE"

#Fetch Spark
SPARK_FILE="$SPARK_DIR.tgz"
fetch_untar_file "$SPARK_FILE" "http://mirror.nexcess.net/apache/spark/spark-$SPARK_VERSION/$SPARK_FILE"
fetch_untar_file "$SPARK_FILE" "$APACHE_MIRROR/spark/spark-$SPARK_VERSION/$SPARK_FILE"

elif [ "START_ZK" = "$OPERATION" ];
then
Expand Down

0 comments on commit a140e1c

Please sign in to comment.