You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by ke...@apache.org on 2016/08/10 16:21:05 UTC

[1/3] incubator-beam git commit: Relocate Travis utilities to .travis

Repository: incubator-beam
Updated Branches:
  refs/heads/master a035796c2 -> 6a5310a56


Relocate Travis utilities to .travis


Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/5e1185d6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/5e1185d6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/5e1185d6

Branch: refs/heads/master
Commit: 5e1185d67cea4112bb08251de72f513dc9b4b871
Parents: 7136616
Author: Kenneth Knowles <kl...@google.com>
Authored: Thu Aug 4 19:35:39 2016 -0700
Committer: Kenneth Knowles <kl...@google.com>
Committed: Tue Aug 9 09:59:05 2016 -0700

----------------------------------------------------------------------
 .travis.yml                      |   2 +-
 .travis/README.md                |  23 +++++++
 .travis/test_wordcount.sh        | 125 ++++++++++++++++++++++++++++++++++
 testing/travis/README.md         |  23 -------
 testing/travis/test_wordcount.sh | 125 ----------------------------------
 5 files changed, 149 insertions(+), 149 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/5e1185d6/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 4674bf3..656aba0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -53,7 +53,7 @@ install:
 
 script:
   - travis_retry mvn --settings .travis/settings.xml --batch-mode --update-snapshots $MAVEN_OVERRIDE verify
-  - travis_retry testing/travis/test_wordcount.sh
+  - travis_retry .travis/test_wordcount.sh
 
 cache:
   directories:

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/5e1185d6/.travis/README.md
----------------------------------------------------------------------
diff --git a/.travis/README.md b/.travis/README.md
new file mode 100644
index 0000000..e0c13f2
--- /dev/null
+++ b/.travis/README.md
@@ -0,0 +1,23 @@
+<!--
+    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.
+-->
+
+# Travis Scripts
+
+This directory contains scripts used for [Travis CI](https://travis-ci.org/GoogleCloudPlatform/DataflowJavaSDK)
+testing.

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/5e1185d6/.travis/test_wordcount.sh
----------------------------------------------------------------------
diff --git a/.travis/test_wordcount.sh b/.travis/test_wordcount.sh
new file mode 100755
index 0000000..e059a35
--- /dev/null
+++ b/.travis/test_wordcount.sh
@@ -0,0 +1,125 @@
+#!/bin/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.
+#
+
+# This script runs WordCount example locally in a few different ways.
+# Specifically, all combinations of:
+#  a) using mvn exec, or java -cp with a bundled jar file;
+#  b) input filename with no directory component, with a relative directory, or
+#     with an absolute directory; AND
+#  c) input filename containing wildcards or not.
+#
+# The one optional parameter is a path from the directory containing the script
+# to the directory containing the top-level (parent) pom.xml.  If no parameter
+# is provided, the script assumes that directory is equal to the directory
+# containing the script itself.
+#
+# The exit-code of the script indicates success or a failure.
+
+set -e
+set -o pipefail
+
+PASS=1
+VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\[')
+JAR_FILE=examples/java/target/beam-examples-java-bundled-${VERSION}.jar
+
+function check_result_hash {
+  local name=$1
+  local outfile_prefix=$2
+  local expected=$3
+
+  local actual=$(LC_ALL=C sort $outfile_prefix-* | md5sum | awk '{print $1}' \
+    || LC_ALL=C sort $outfile_prefix-* | md5 -q) || exit 2  # OSX
+  if [[ "$actual" != "$expected" ]]
+  then
+    echo "FAIL $name: Output hash mismatch.  Got $actual, expected $expected."
+    PASS=""
+    echo "head hexdump of actual:"
+    head $outfile_prefix-* | hexdump -c
+  else
+    echo "pass $name"
+    # Output files are left behind in /tmp
+  fi
+}
+
+function get_outfile_prefix {
+  local name=$1
+  # NOTE: mktemp on OSX doesn't support --tmpdir
+  mktemp -u "/tmp/$name.out.XXXXXXXXXX"
+}
+
+function run_via_mvn {
+  local name=$1
+  local input=$2
+  local expected_hash=$3
+
+  local outfile_prefix="$(get_outfile_prefix "$name")" || exit 2
+  local cmd='mvn exec:java -f pom.xml -pl examples/java \
+    -Dexec.mainClass=org.apache.beam.examples.WordCount \
+    -Dexec.args="--runner=DirectRunner --inputFile='"$input"' --output='"$outfile_prefix"'"'
+  echo "$name: Running $cmd" >&2
+  sh -c "$cmd"
+  check_result_hash "$name" "$outfile_prefix" "$expected_hash"
+}
+
+function run_bundled {
+  local name=$1
+  local input=$2
+  local expected_hash=$3
+
+  local outfile_prefix="$(get_outfile_prefix "$name")" || exit 2
+  local cmd='java -cp '"$JAR_FILE"' \
+    org.apache.beam.examples.WordCount \
+    --runner=DirectRunner \
+    --inputFile='"'$input'"' \
+    --output='"$outfile_prefix"
+  echo "$name: Running $cmd" >&2
+  sh -c "$cmd"
+  check_result_hash "$name" "$outfile_prefix" "$expected_hash"
+}
+
+function run_all_ways {
+  local name=$1
+  local input=$2
+  local expected_hash=$3
+
+  run_via_mvn ${name}a "$input" $expected_hash
+  check_for_jar_file
+  run_bundled ${name}b "$input" $expected_hash
+}
+
+function check_for_jar_file {
+  if [[ ! -f $JAR_FILE ]]
+  then
+    echo "Jar file $JAR_FILE not created" >&2
+    exit 2
+  fi
+}
+
+run_all_ways wordcount1 "LICENSE" c5350a5ad4bb51e3e018612b4b044097
+run_all_ways wordcount2 "./LICENSE" c5350a5ad4bb51e3e018612b4b044097
+run_all_ways wordcount3 "$PWD/LICENSE" c5350a5ad4bb51e3e018612b4b044097
+run_all_ways wordcount4 "L*N?E*" c5350a5ad4bb51e3e018612b4b044097
+run_all_ways wordcount5 "./LICE*N?E" c5350a5ad4bb51e3e018612b4b044097
+run_all_ways wordcount6 "$PWD/*LIC?NSE" c5350a5ad4bb51e3e018612b4b044097
+
+if [[ ! "$PASS" ]]
+then
+  echo "One or more tests FAILED."
+  exit 1
+fi
+echo "All tests PASS"

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/5e1185d6/testing/travis/README.md
----------------------------------------------------------------------
diff --git a/testing/travis/README.md b/testing/travis/README.md
deleted file mode 100644
index e0c13f2..0000000
--- a/testing/travis/README.md
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
-    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.
--->
-
-# Travis Scripts
-
-This directory contains scripts used for [Travis CI](https://travis-ci.org/GoogleCloudPlatform/DataflowJavaSDK)
-testing.

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/5e1185d6/testing/travis/test_wordcount.sh
----------------------------------------------------------------------
diff --git a/testing/travis/test_wordcount.sh b/testing/travis/test_wordcount.sh
deleted file mode 100755
index e059a35..0000000
--- a/testing/travis/test_wordcount.sh
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/bin/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.
-#
-
-# This script runs WordCount example locally in a few different ways.
-# Specifically, all combinations of:
-#  a) using mvn exec, or java -cp with a bundled jar file;
-#  b) input filename with no directory component, with a relative directory, or
-#     with an absolute directory; AND
-#  c) input filename containing wildcards or not.
-#
-# The one optional parameter is a path from the directory containing the script
-# to the directory containing the top-level (parent) pom.xml.  If no parameter
-# is provided, the script assumes that directory is equal to the directory
-# containing the script itself.
-#
-# The exit-code of the script indicates success or a failure.
-
-set -e
-set -o pipefail
-
-PASS=1
-VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\[')
-JAR_FILE=examples/java/target/beam-examples-java-bundled-${VERSION}.jar
-
-function check_result_hash {
-  local name=$1
-  local outfile_prefix=$2
-  local expected=$3
-
-  local actual=$(LC_ALL=C sort $outfile_prefix-* | md5sum | awk '{print $1}' \
-    || LC_ALL=C sort $outfile_prefix-* | md5 -q) || exit 2  # OSX
-  if [[ "$actual" != "$expected" ]]
-  then
-    echo "FAIL $name: Output hash mismatch.  Got $actual, expected $expected."
-    PASS=""
-    echo "head hexdump of actual:"
-    head $outfile_prefix-* | hexdump -c
-  else
-    echo "pass $name"
-    # Output files are left behind in /tmp
-  fi
-}
-
-function get_outfile_prefix {
-  local name=$1
-  # NOTE: mktemp on OSX doesn't support --tmpdir
-  mktemp -u "/tmp/$name.out.XXXXXXXXXX"
-}
-
-function run_via_mvn {
-  local name=$1
-  local input=$2
-  local expected_hash=$3
-
-  local outfile_prefix="$(get_outfile_prefix "$name")" || exit 2
-  local cmd='mvn exec:java -f pom.xml -pl examples/java \
-    -Dexec.mainClass=org.apache.beam.examples.WordCount \
-    -Dexec.args="--runner=DirectRunner --inputFile='"$input"' --output='"$outfile_prefix"'"'
-  echo "$name: Running $cmd" >&2
-  sh -c "$cmd"
-  check_result_hash "$name" "$outfile_prefix" "$expected_hash"
-}
-
-function run_bundled {
-  local name=$1
-  local input=$2
-  local expected_hash=$3
-
-  local outfile_prefix="$(get_outfile_prefix "$name")" || exit 2
-  local cmd='java -cp '"$JAR_FILE"' \
-    org.apache.beam.examples.WordCount \
-    --runner=DirectRunner \
-    --inputFile='"'$input'"' \
-    --output='"$outfile_prefix"
-  echo "$name: Running $cmd" >&2
-  sh -c "$cmd"
-  check_result_hash "$name" "$outfile_prefix" "$expected_hash"
-}
-
-function run_all_ways {
-  local name=$1
-  local input=$2
-  local expected_hash=$3
-
-  run_via_mvn ${name}a "$input" $expected_hash
-  check_for_jar_file
-  run_bundled ${name}b "$input" $expected_hash
-}
-
-function check_for_jar_file {
-  if [[ ! -f $JAR_FILE ]]
-  then
-    echo "Jar file $JAR_FILE not created" >&2
-    exit 2
-  fi
-}
-
-run_all_ways wordcount1 "LICENSE" c5350a5ad4bb51e3e018612b4b044097
-run_all_ways wordcount2 "./LICENSE" c5350a5ad4bb51e3e018612b4b044097
-run_all_ways wordcount3 "$PWD/LICENSE" c5350a5ad4bb51e3e018612b4b044097
-run_all_ways wordcount4 "L*N?E*" c5350a5ad4bb51e3e018612b4b044097
-run_all_ways wordcount5 "./LICE*N?E" c5350a5ad4bb51e3e018612b4b044097
-run_all_ways wordcount6 "$PWD/*LIC?NSE" c5350a5ad4bb51e3e018612b4b044097
-
-if [[ ! "$PASS" ]]
-then
-  echo "One or more tests FAILED."
-  exit 1
-fi
-echo "All tests PASS"


[3/3] incubator-beam git commit: This closes #792

Posted by ke...@apache.org.
This closes #792


Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/6a5310a5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/6a5310a5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/6a5310a5

Branch: refs/heads/master
Commit: 6a5310a560e67743873b7b046951f27ef3b67ed9
Parents: a035796 5e1185d
Author: Kenneth Knowles <kl...@google.com>
Authored: Wed Aug 10 09:20:52 2016 -0700
Committer: Kenneth Knowles <kl...@google.com>
Committed: Wed Aug 10 09:20:52 2016 -0700

----------------------------------------------------------------------
 .travis.yml                      |   4 +-
 .travis/README.md                |  23 +++++++
 .travis/settings.xml             |  33 +++++++++
 .travis/test_wordcount.sh        | 125 ++++++++++++++++++++++++++++++++++
 testing/travis/README.md         |  23 -------
 testing/travis/test_wordcount.sh | 125 ----------------------------------
 6 files changed, 183 insertions(+), 150 deletions(-)
----------------------------------------------------------------------



[2/3] incubator-beam git commit: Lower maven central timeouts on Travis-CI

Posted by ke...@apache.org.
Lower maven central timeouts on Travis-CI


Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/71366165
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/71366165
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/71366165

Branch: refs/heads/master
Commit: 713661651befe72a844a181a33884d5f6c1e72e9
Parents: 7da1a3d
Author: Kenneth Knowles <kl...@google.com>
Authored: Thu Aug 4 15:18:13 2016 -0700
Committer: Kenneth Knowles <kl...@google.com>
Committed: Tue Aug 9 09:59:05 2016 -0700

----------------------------------------------------------------------
 .travis.yml          |  2 +-
 .travis/settings.xml | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/71366165/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 43ae7de..4674bf3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -52,7 +52,7 @@ install:
   - rm -rf "$HOME/.m2/repository/org/apache/beam"
 
 script:
-  - travis_retry mvn --batch-mode --update-snapshots $MAVEN_OVERRIDE verify
+  - travis_retry mvn --settings .travis/settings.xml --batch-mode --update-snapshots $MAVEN_OVERRIDE verify
   - travis_retry testing/travis/test_wordcount.sh
 
 cache:

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/71366165/.travis/settings.xml
----------------------------------------------------------------------
diff --git a/.travis/settings.xml b/.travis/settings.xml
new file mode 100644
index 0000000..e086aec
--- /dev/null
+++ b/.travis/settings.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+-->
+<settings>
+  <servers>
+    <server>
+      <id>central</id>
+      <configuration>
+        <httpConfiguration>
+          <all>
+            <connectionTimeout>1000</connectionTimeout>
+          </all>
+        </httpConfiguration>
+        <timeout>5000</timeout>
+      </configuration>
+    </server>
+  </servers>
+</settings>