From e26cf308ec5c83e1238645379526ebef288f1fec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Baptiste=20Onofr=C3=A9?= Date: Fri, 6 May 2016 09:05:00 +0200 Subject: [PATCH] [BEAM-254] Add apache-rat-plugin execution and fix files with missing license header --- .github/PULL_REQUEST_TEMPLATE.md | 19 +++++++++ .travis.yml | 17 ++++++++ README.md | 19 +++++++++ examples/java/README.md | 19 +++++++++ .../apache/beam/examples/complete/README.md | 18 ++++++++ .../apache/beam/examples/cookbook/README.md | 18 ++++++++ .../beam/examples/complete/game/README.md | 18 ++++++++ pom.xml | 42 +++++++++++++++++++ runners/flink/README.md | 19 +++++++++ runners/spark/README.md | 19 +++++++++ .../src/main/resources/beam/checkstyle.xml | 15 ------- .../src/main/resources/beam/header-file.txt | 17 -------- sdks/java/core/src/main/proto/README.md | 23 +++++++++- .../org/apache/beam/sdk/sdk.properties | 19 ++++++++- sdks/java/extensions/join-library/README.md | 29 ++++++++++--- sdks/java/io/hdfs/README.md | 19 +++++++++ sdks/java/javadoc/README.md | 19 +++++++++ sdks/java/javadoc/overview.html | 26 +++++++++--- .../META-INF/maven/archetype-metadata.xml | 16 +++++++ .../projects/basic/archetype.properties | 16 +++++++ .../META-INF/maven/archetype-metadata.xml | 16 +++++++ .../resources/archetype-resources/pom.xml | 17 ++++++++ .../projects/basic/archetype.properties | 16 +++++++ .../projects/basic/reference/pom.xml | 17 ++++++++ travis/README.md | 19 +++++++++ travis/test_wordcount.sh | 16 +++++++ 26 files changed, 463 insertions(+), 45 deletions(-) delete mode 100644 sdks/java/build-tools/src/main/resources/beam/header-file.txt diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b17f620148a9..7db5d32f1007 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,3 +1,22 @@ + + Be sure to do all of the following to help us incorporate your contribution quickly and easily: diff --git a/.travis.yml b/.travis.yml index 8aad36e3b4ff..ddf32040c705 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,20 @@ +# +# 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. +# + language: java sudo: false diff --git a/README.md b/README.md index 44194648892e..fa00e82a9b2e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,22 @@ + + # Apache Beam [Apache Beam](http://beam.incubator.apache.org) is a unified model for defining both batch and streaming data-parallel processing pipelines, as well as a set of language-specific SDKs for constructing pipelines and Runners for executing them on distributed processing backends like [Apache Spark](http://spark.apache.org/), [Apache Flink](http://flink.apache.org), and [Google Cloud Dataflow](http://cloud.google.com/dataflow). diff --git a/examples/java/README.md b/examples/java/README.md index 4533303a23be..4694103488ba 100644 --- a/examples/java/README.md +++ b/examples/java/README.md @@ -1,3 +1,22 @@ + + # Example Pipelines The examples included in this module serve to demonstrate the basic diff --git a/examples/java/src/main/java/org/apache/beam/examples/complete/README.md b/examples/java/src/main/java/org/apache/beam/examples/complete/README.md index 5fba15494e9b..99c93ef4b82a 100644 --- a/examples/java/src/main/java/org/apache/beam/examples/complete/README.md +++ b/examples/java/src/main/java/org/apache/beam/examples/complete/README.md @@ -1,3 +1,21 @@ + # "Complete" Examples diff --git a/examples/java/src/main/java/org/apache/beam/examples/cookbook/README.md b/examples/java/src/main/java/org/apache/beam/examples/cookbook/README.md index 99f3080a06ba..77b72f34a697 100644 --- a/examples/java/src/main/java/org/apache/beam/examples/cookbook/README.md +++ b/examples/java/src/main/java/org/apache/beam/examples/cookbook/README.md @@ -1,3 +1,21 @@ + # "Cookbook" Examples diff --git a/examples/java8/src/main/java/org/apache/beam/examples/complete/game/README.md b/examples/java8/src/main/java/org/apache/beam/examples/complete/game/README.md index 79b55cee112a..25e31f55c975 100644 --- a/examples/java8/src/main/java/org/apache/beam/examples/complete/game/README.md +++ b/examples/java8/src/main/java/org/apache/beam/examples/complete/game/README.md @@ -1,3 +1,21 @@ + # 'Gaming' examples diff --git a/pom.xml b/pom.xml index edddc8fd2c07..2a472653b210 100644 --- a/pom.xml +++ b/pom.xml @@ -219,8 +219,49 @@ + + + org.apache.rat + apache-rat-plugin + 0.11 + + + verify + + check + + + + + ${project.build.directory}/${project.build.finalName}.rat + false + true + + + **/target/**/* + **/dependency-reduced-pom.xml + **/*.iml + **/package-list + **/user.avsc + **/test/resources/**/*.txt + **/test/**/.placeholder + .repository/**/* + + + + + + + org.apache.rat + apache-rat-plugin + + + org.apache.maven.plugins + maven-assembly-plugin + + @@ -233,6 +274,7 @@ -Xdoclint:-missing + diff --git a/runners/flink/README.md b/runners/flink/README.md index 457e2a655988..8256c046b95d 100644 --- a/runners/flink/README.md +++ b/runners/flink/README.md @@ -1,3 +1,22 @@ + + Flink Beam Runner (Flink-Runner) ------------------------------- diff --git a/runners/spark/README.md b/runners/spark/README.md index 5b2e73232ec3..457f0a99a726 100644 --- a/runners/spark/README.md +++ b/runners/spark/README.md @@ -1,3 +1,22 @@ + + Spark Beam Runner (Spark-Runner) ================================ diff --git a/sdks/java/build-tools/src/main/resources/beam/checkstyle.xml b/sdks/java/build-tools/src/main/resources/beam/checkstyle.xml index 44897d3a01c1..311f599df859 100644 --- a/sdks/java/build-tools/src/main/resources/beam/checkstyle.xml +++ b/sdks/java/build-tools/src/main/resources/beam/checkstyle.xml @@ -25,21 +25,6 @@ page at http://checkstyle.sourceforge.net/config.html --> - - - - - - - diff --git a/sdks/java/build-tools/src/main/resources/beam/header-file.txt b/sdks/java/build-tools/src/main/resources/beam/header-file.txt deleted file mode 100644 index d5519133edc8..000000000000 --- a/sdks/java/build-tools/src/main/resources/beam/header-file.txt +++ /dev/null @@ -1,17 +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. - */ \ No newline at end of file diff --git a/sdks/java/core/src/main/proto/README.md b/sdks/java/core/src/main/proto/README.md index fa4e925c982c..858441b34688 100644 --- a/sdks/java/core/src/main/proto/README.md +++ b/sdks/java/core/src/main/proto/README.md @@ -1,8 +1,29 @@ -## Protocol Buffers in Google Cloud Dataflow + This directory contains the Protocol Buffer messages used in Google Cloud Dataflow. +## Protocol Buffers in Apache Beam + +This directory contains the Protocol Buffer messages used in Apache Beam. + They aren't, however, used during the Maven build process, and are included here for completeness only. Instead, the following artifact on Maven Central contains the binary version of the generated code from these Protocol Buffers: diff --git a/sdks/java/core/src/main/resources/org/apache/beam/sdk/sdk.properties b/sdks/java/core/src/main/resources/org/apache/beam/sdk/sdk.properties index 5b0a720b215d..21e314d44da8 100644 --- a/sdks/java/core/src/main/resources/org/apache/beam/sdk/sdk.properties +++ b/sdks/java/core/src/main/resources/org/apache/beam/sdk/sdk.properties @@ -1,4 +1,21 @@ -# SDK source version. +# +# 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. +# +# SDK source version + version=${pom.version} build.date=${timestamp} diff --git a/sdks/java/extensions/join-library/README.md b/sdks/java/extensions/join-library/README.md index 8e2a011c3402..fe8466a365f5 100644 --- a/sdks/java/extensions/join-library/README.md +++ b/sdks/java/extensions/join-library/README.md @@ -1,12 +1,31 @@ + + Join-library ============ Join-library provides inner join, outer left and right join functions to -Google Cloud Dataflow. The aim is to simplify the most common cases of join to a +Apache Beam. The aim is to simplify the most common cases of join to a simple function call. The functions are generic so it supports join of any types supported by -Dataflow. Input to the join functions are PCollections of Key/Values. Both the +Beam. Input to the join functions are PCollections of Key/Values. Both the left and right PCollections need the same type for the key. All the join functions return a Key/Value where Key is the join key and value is a Key/Value where the key is the left value and right is the value. @@ -25,9 +44,9 @@ Example how to use join-library: Join-library can be found on maven-central: - org.linuxalert.dataflow - google-cloud-dataflow-java-contrib-joinlibrary - 0.0.3 + org.apache.beam + join-library + 0.1-incubating-SNAPSHOT Questions or comments: `M.Runesson [at] gmail [dot] com` diff --git a/sdks/java/io/hdfs/README.md b/sdks/java/io/hdfs/README.md index 7149cdaf273e..1c6134f34d5a 100644 --- a/sdks/java/io/hdfs/README.md +++ b/sdks/java/io/hdfs/README.md @@ -1,3 +1,22 @@ + + # HDFS IO This library provides HDFS sources and sinks to make it possible to read and diff --git a/sdks/java/javadoc/README.md b/sdks/java/javadoc/README.md index 8240d3ce00e8..bb17c3f331f3 100644 --- a/sdks/java/javadoc/README.md +++ b/sdks/java/javadoc/README.md @@ -1,3 +1,22 @@ + + # SDK Javadoc This directory contains package-info files for external javadoc we would like diff --git a/sdks/java/javadoc/overview.html b/sdks/java/javadoc/overview.html index 0c9bd1768840..511eeb428964 100644 --- a/sdks/java/javadoc/overview.html +++ b/sdks/java/javadoc/overview.html @@ -1,20 +1,34 @@ + - Google Cloud Dataflow Java SDK + Apache Beam Java SDK -

The Google Cloud Dataflow SDK for Java provides a simple and elegant +

The Apache Beam SDK for Java provides a simple and elegant programming model to express your data processing pipelines; see our product page for more information and getting started instructions.

-

The easiest way to use the Google Cloud Dataflow SDK for Java is via +

The easiest way to use the Apache Beam SDK for Java is via one of the released artifacts from the - + Maven Central Repository. - See our - release notes for more information about each released version.

Version numbers use the form major.minor.incremental and are incremented as follows:

diff --git a/sdks/java/maven-archetypes/examples/src/main/resources/META-INF/maven/archetype-metadata.xml b/sdks/java/maven-archetypes/examples/src/main/resources/META-INF/maven/archetype-metadata.xml index 7742af4e7242..a130b65f5612 100644 --- a/sdks/java/maven-archetypes/examples/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/sdks/java/maven-archetypes/examples/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -1,4 +1,20 @@ + + + diff --git a/sdks/java/maven-archetypes/starter/src/test/resources/projects/basic/archetype.properties b/sdks/java/maven-archetypes/starter/src/test/resources/projects/basic/archetype.properties index c59e77a9d55b..35eb1b31cec6 100644 --- a/sdks/java/maven-archetypes/starter/src/test/resources/projects/basic/archetype.properties +++ b/sdks/java/maven-archetypes/starter/src/test/resources/projects/basic/archetype.properties @@ -1,3 +1,19 @@ +# +# 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. +# package=it.pkg version=0.1-SNAPSHOT groupId=archetype.it diff --git a/sdks/java/maven-archetypes/starter/src/test/resources/projects/basic/reference/pom.xml b/sdks/java/maven-archetypes/starter/src/test/resources/projects/basic/reference/pom.xml index d29424afbf31..c9217c9f0d1a 100644 --- a/sdks/java/maven-archetypes/starter/src/test/resources/projects/basic/reference/pom.xml +++ b/sdks/java/maven-archetypes/starter/src/test/resources/projects/basic/reference/pom.xml @@ -1,3 +1,20 @@ + + diff --git a/travis/README.md b/travis/README.md index f7d89999b3d9..e0c13f2c6fd1 100644 --- a/travis/README.md +++ b/travis/README.md @@ -1,3 +1,22 @@ + + # Travis Scripts This directory contains scripts used for [Travis CI](https://travis-ci.org/GoogleCloudPlatform/DataflowJavaSDK) diff --git a/travis/test_wordcount.sh b/travis/test_wordcount.sh index 89657a935f78..3efd37c9ff00 100755 --- a/travis/test_wordcount.sh +++ b/travis/test_wordcount.sh @@ -1,4 +1,20 @@ #!/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: