You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by mc...@apache.org on 2021/04/19 15:55:08 UTC

[cassandra] branch cassandra-2.2 updated: Fix rat checking for files with missing license headers

This is an automated email from the ASF dual-hosted git repository.

mck pushed a commit to branch cassandra-2.2
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cassandra-2.2 by this push:
     new 53b0661  Fix rat checking for files with missing license headers
53b0661 is described below

commit 53b0661cbbe705901d7a891c9c6ba34a42f07427
Author: Mick Semb Wever <mc...@apache.org>
AuthorDate: Fri Apr 2 12:08:44 2021 +0200

    Fix rat checking for files with missing license headers
    
     patch by Mick Semb Wever; reviewed by Brandon Williams, Ekaterina Dimitrova for CASSANDRA-16558
---
 .build/build-rat.xml                               | 94 ++++++++++++++++++++++
 .circleci/config-2_1.yml                           | 18 +++++
 .circleci/config.yml                               | 18 +++++
 .circleci/generate.sh                              | 17 ++++
 .circleci/readme.md                                | 20 +++++
 .gitignore                                         |  9 ++-
 .rat-excludes                                      | 34 --------
 CONTRIBUTING.md                                    | 20 +++++
 build.xml                                          | 91 +--------------------
 debian/cassandra.in.sh                             | 17 ++++
 doc/cql3/CQL.textile                               | 20 +++++
 doc/native_protocol_v1.spec                        | 17 ++++
 doc/native_protocol_v2.spec                        | 17 ++++
 doc/native_protocol_v3.spec                        | 17 ++++
 doc/native_protocol_v4.spec                        | 17 ++++
 pylib/cqlshlib/test/test_keyspace_init.cql         | 18 +++++
 redhat/README.md                                   | 20 +++++
 redhat/cassandra.in.sh                             | 17 ++++
 redhat/cassandra.spec                              | 18 +++++
 test/conf/cassandra_pig.yaml                       | 18 +++++
 test/conf/commitlog_compression.yaml               | 18 +++++
 test/resources/byteman/stream_failure.btm          | 17 ++++
 .../org/apache/cassandra/stress/WorkManager.java   | 17 ++++
 23 files changed, 446 insertions(+), 123 deletions(-)

diff --git a/.build/build-rat.xml b/.build/build-rat.xml
new file mode 100644
index 0000000..81f2b94
--- /dev/null
+++ b/.build/build-rat.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+~ 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
+~
+~    https://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.
+-->
+<project basedir="." name="apache-cassandra--rat-tasks"
+         xmlns:artifact="antlib:org.apache.maven.artifact.ant"
+         xmlns:rat="antlib:org.apache.rat.anttasks">
+
+    <!--
+      License audit tool
+    -->
+    <condition property="rat.enabled">
+        <available file=".gitignore" />
+    </condition>
+
+    <target name="_rat_init" depends="maven-ant-tasks-init">
+        <artifact:dependencies pathId="rat.classpath">
+          <dependency groupId="org.apache.rat" artifactId="apache-rat-tasks" version="0.6" />
+          <remoteRepository refid="central"/>
+          <remoteRepository refid="apache"/>
+        </artifact:dependencies>
+        <typedef uri="antlib:org.apache.rat.anttasks" classpathref="rat.classpath"/>
+    </target>
+
+    <target name="rat-check" depends="_rat_init" if="${rat.enabled}" description="License checks on source" >
+        <rat:report reportFile="${build.dir}/rat.txt">
+            <fileset dir="."
+                     includes="**/*.java,**/*.py,**/*.sh,**/.xml,**/*.spec,**/*.md,**/*.iml,**/*.bat,**/*.btm,**/*.cql,**/*.css,**/*.g,**/*.hmtl,**/*.jflex,**/*.jks,**/*.mod,**/*.name,**/*.pom,**/*.textile,**/*.yml,**/*.yaml"
+                     excludesfile=".gitignore">
+                     <!-- Config files with not much creativity -->
+                     <exclude name="**/metrics-reporter-config-sample.yaml"/>
+                     <exclude name="**/cassandra.yaml"/>
+                     <exclude name="**/cassandra-murmur.yaml"/>
+                     <exclude name="**/cassandra-seeds.yaml"/>
+                     <exclude name="**/test/conf/cassandra.yaml"/>
+                     <exclude name="**/test/conf/cassandra_encryption.yaml"/>
+                     <exclude name="**/test/conf/cdc.yaml"/>
+                     <exclude name="**/test/conf/commitlog_compression_LZ4.yaml"/>
+                     <exclude name="**/test/conf/commitlog_compression_Zstd.yaml"/>
+                     <exclude name="**/test/conf/system_keyspaces_directory.yaml"/>
+                     <exclude name="**/test/conf/unit-test-conf/test-native-port.yaml"/>
+                     <exclude name="**/test/data/jmxdump/cassandra-3.0-jmx.yaml"/>
+                     <exclude name="**/test/data/jmxdump/cassandra-3.11-jmx.yaml"/>
+                     <exclude name="**/test/data/jmxdump/cassandra-4.0-jmx.yaml"/>
+                     <exclude name="**/tools/cqlstress-counter-example.yaml"/>
+                     <exclude name="**/tools/cqlstress-example.yaml"/>
+                     <exclude name="**/tools/cqlstress-insanity-example.yaml"/>
+                     <exclude name="**/tools/cqlstress-lwt-example.yaml"/>
+                     <!-- NOTICE files -->
+                     <exclude NAME="**/NOTICE.md"/>
+                     <!-- LICENSE files -->
+                     <exclude NAME="**/LICENSE.md"/>
+            </fileset>
+        </rat:report>
+        <fail message="Some files have missing or incorrect license information. Check RAT report in ${build.dir}/rat.txt for more details!">
+            <condition>
+                <and>
+                    <not>
+                        <resourcecontains resource="${build.dir}/rat.txt" substring="0 Unknown Licenses" casesensitive="false" />
+                    </not>
+                </and>
+            </condition>
+        </fail>
+    </target>
+
+    <target name="_write_java_license_headers" depends="_rat_init">
+      <java classname="org.apache.rat.Report" fork="true"
+            output="${build.dir}/rat-report.log">
+        <classpath refid="rat.classpath" />
+        <arg value="-a" />
+        <arg value="--force" />
+        <arg value="interface/thrift" />
+      </java>
+    </target>
+
+    <target name="write-java-license-headers" unless="without.rat" description="Add missing java license headers">
+      <antcall target="_write_java_license_headers" />
+    </target>
+</project>
\ No newline at end of file
diff --git a/.circleci/config-2_1.yml b/.circleci/config-2_1.yml
index fc54607..a35be23 100644
--- a/.circleci/config-2_1.yml
+++ b/.circleci/config-2_1.yml
@@ -1,3 +1,21 @@
+#
+# 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.
+#
+
 version: 2.1
 
 default_env_vars: &default_env_vars
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 8627e96..acfd6c9 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -1,3 +1,21 @@
+#
+# 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.
+#
+
 version: 2
 jobs:
   build:
diff --git a/.circleci/generate.sh b/.circleci/generate.sh
index f3f4361..0ba497b 100755
--- a/.circleci/generate.sh
+++ b/.circleci/generate.sh
@@ -1,4 +1,21 @@
 #!/bin/sh
+#
+# 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.
+#
 
 BASEDIR=`dirname $0`
 
diff --git a/.circleci/readme.md b/.circleci/readme.md
index 965eaf7..b3d5ab0 100644
--- a/.circleci/readme.md
+++ b/.circleci/readme.md
@@ -1,3 +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.
+#
+-->
+
 # CircleCI config files
 
 ## Switching to high resource settings
diff --git a/.gitignore b/.gitignore
index 8954831..cc25cbc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -71,4 +71,11 @@ lib/jsr223/jython/*.jar
 lib/jsr223/jython/cachedir
 lib/jsr223/scala/*.jar
 
-.ant_targets
\ No newline at end of file
+.ant_targets
+
+# Python virtual environment
+venv/
+
+# build-scripts will put cassandra-builds and cassandra-dtest into the directory
+cassandra-builds/
+cassandra-dtest/
diff --git a/.rat-excludes b/.rat-excludes
deleted file mode 100644
index d95b499..0000000
--- a/.rat-excludes
+++ /dev/null
@@ -1,34 +0,0 @@
-**/*.avpr
-debian/**
-.classpath
-.rat-excludes
-**/.project
-**/.pydevproject
-CHANGES.txt
-README.asc
-.git/**
-**/*.json
-**/*.patch
-interface/*/gen-*/**
-src/gen-java/**
-build/**
-lib/licenses/*.txt
-.settings/**
-**/cassandra.yaml
-**/cassandra-topology.yaml
-**/metrics-reporter-config-sample.yaml
-**/*.db
-.externalToolBuilders/**
-test/data/serialization/*/*
-**/*.wpr
-doc/**
-build.properties.default
-test/data/**
-examples/pig/**
-examples/triggers/build.xml
-examples/triggers/conf/*
-examples/hadoop_word_count/conf/log4j.properties
-pylib/cqlshlib/test/**
-src/resources/org/apache/cassandra/config/version.properties
-conf/hotspot_compiler
-**/*-example.yaml
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 8366579..2251fdf 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,3 +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.
+#
+-->
+
 # Apache Cassandra and Pull Requests
 
 Apache Cassandra doesn't use GitHub pull requests as part of the development process.
diff --git a/build.xml b/build.xml
index 95f85c0..52ba87f 100644
--- a/build.xml
+++ b/build.xml
@@ -779,20 +779,6 @@
       <antcall target="write-java-license-headers" />
     </target>
 
-    <target name="_write-java-license-headers" depends="rat-init">
-      <java classname="org.apache.rat.Report" fork="true"
-            output="${build.dir}/rat-report.log">
-        <classpath refid="rat.classpath" />
-        <arg value="-a" />
-        <arg value="--force" />
-        <arg value="interface/thrift" />
-      </java>
-    </target>
-
-    <target name="write-java-license-headers" unless="without.rat" description="Add missing java license headers">
-      <antcall target="_write-java-license-headers" />
-    </target>
-
     <target name="gen-thrift-py" description="Generate Thrift Python artifacts">
       <echo>Generating Thrift Python code from ${basedir}/interface/cassandra.thrift...</echo>
       <exec executable="thrift" dir="${basedir}/interface" failonerror="true">
@@ -836,7 +822,7 @@
         depends="maven-ant-tasks-retrieve-build,build-project" description="Compile Cassandra classes"/>
     <target name="codecoverage" depends="jacoco-run,jacoco-report" description="Create code coverage report"/>
 
-    <target depends="init,gen-cql3-grammar,generate-cql-html,rat-report"
+    <target depends="init,gen-cql3-grammar,generate-cql-html,rat-check"
             name="build-project">
         <echo message="${ant.project.name}: ${ant.file}"/>
         <!-- Order matters! -->
@@ -1204,43 +1190,6 @@
       </checksum>
     </target>
 
-    <target name="rat" depends="rat-init" description="License checks on artifacts">
-      <rat:report xmlns:rat="antlib:org.apache.rat.anttasks"
-                  reportFile="${build.dir}/${final.name}-bin.rat.txt">
-        <tarfileset>
-          <gzipresource>
-            <file file="${build.dir}/${final.name}-bin.tar.gz" />
-          </gzipresource>
-        </tarfileset>
-      </rat:report>
-      <rat:report xmlns:rat="antlib:org.apache.rat.anttasks"
-                  reportFile="${build.dir}/${final.name}-src.rat.txt">
-        <tarfileset>
-          <gzipresource>
-            <file file="${build.dir}/${final.name}-src.tar.gz" />
-          </gzipresource>
-        </tarfileset>
-      </rat:report>
-    </target>
-
-    <target name="rat-report" depends="rat-init" description="License checks on source" >
-      <rat:report xmlns:rat="antlib:org.apache.rat.anttasks"
-                  reportFile="${build.dir}/src.rat.txt">
-        <fileset dir="src/java"/>
-        <fileset dir="test/unit"/>
-        <fileset dir="test/distributed"/>
-      </rat:report>
-      <fail message="Some files have missing or incorrect license information. Check RAT report in ${build.dir}/src.rat.txt for more details!">
-        <condition>
-          <and>
-            <not>
-              <resourcecontains resource="${build.dir}/src.rat.txt" substring="0 Unknown Licenses" casesensitive="false" />
-            </not>
-          </and>
-        </condition>
-      </fail>
-    </target>
-
   <target name="build-test" depends="build" description="Compile test classes">
     <javac
      debug="true"
@@ -1714,42 +1663,6 @@
       datafile="${cobertura.datafile}"/>
   </target>
 
-  <!--
-    License audit tool
-  -->
-  <target name="rat-init" depends="maven-ant-tasks-init">
-    <artifact:dependencies pathId="rat.classpath">
-      <dependency groupId="org.apache.rat" artifactId="apache-rat-tasks" version="0.6" />
-      <remoteRepository refid="central"/>
-      <remoteRepository refid="apache"/>
-    </artifact:dependencies>
-    <typedef uri="antlib:org.apache.rat.anttasks" classpathref="rat.classpath"/>
-  </target>
-
-  <target name="rat-check" depends="rat-init">
-    <rat:report xmlns:rat="antlib:org.apache.rat.anttasks"  
-                reportFile="${build.dir}/rat-report.log">
-      <fileset dir="."  excludesfile=".rat-excludes" />
-    </rat:report>
-    <condition property="rat.passed">
-      <isfileselected file="${build.dir}/rat-report.log">
-        <containsregexp expression="^0 Unknown Licenses"/>
-      </isfileselected>
-    </condition>
-    <fail unless="rat.passed">Unknown licenses: See build/rat-report.log.</fail>
-  </target>
-
-  <target name="rat-write" depends="rat-init">
-    <echo>RAT: invoking addLicense to write missing headers</echo>
-    <java classname="org.apache.rat.Report" fork="true"
-          output="${build.dir}/rat-report.log">
-      <classpath refid="rat.classpath" />
-      <arg value="-a" />
-      <arg value="--force" />
-      <arg value="." />
-    </java>
-  </target>
-
   <target name="javadoc" depends="init" description="Create javadoc" unless="no-javadoc">
     <create-javadoc destdir="${javadoc.dir}">
       <filesets>
@@ -2130,4 +2043,6 @@
     <sign-dist file="${build.dir}/${final.name}-src.tar.gz" />
 
   </target>
+
+  <import file="${basedir}/.build/build-rat.xml"/>
 </project>
diff --git a/debian/cassandra.in.sh b/debian/cassandra.in.sh
index 9f69ac9..2d15c01 100644
--- a/debian/cassandra.in.sh
+++ b/debian/cassandra.in.sh
@@ -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.
+#
 
 # The directory where Cassandra's configs live (required)
 CASSANDRA_CONF=/etc/cassandra
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index 33db748..b689532 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -1,3 +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.
+#
+-->
+
 <link rel="StyleSheet" href="CQL.css" type="text/css" media="screen">
 
 h1. Cassandra Query Language (CQL) v3.3.1
diff --git a/doc/native_protocol_v1.spec b/doc/native_protocol_v1.spec
index 9c9b6b5..c85ca6c 100644
--- a/doc/native_protocol_v1.spec
+++ b/doc/native_protocol_v1.spec
@@ -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.
+#
 
                              CQL BINARY PROTOCOL v1
 
diff --git a/doc/native_protocol_v2.spec b/doc/native_protocol_v2.spec
index b9cc51f..dbdfb55 100644
--- a/doc/native_protocol_v2.spec
+++ b/doc/native_protocol_v2.spec
@@ -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.
+#
 
                              CQL BINARY PROTOCOL v2
 
diff --git a/doc/native_protocol_v3.spec b/doc/native_protocol_v3.spec
index 087e138..36bb935 100644
--- a/doc/native_protocol_v3.spec
+++ b/doc/native_protocol_v3.spec
@@ -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.
+#
 
                              CQL BINARY PROTOCOL v3
 
diff --git a/doc/native_protocol_v4.spec b/doc/native_protocol_v4.spec
index 07ddea5..5f1d498 100644
--- a/doc/native_protocol_v4.spec
+++ b/doc/native_protocol_v4.spec
@@ -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.
+#
 
                              CQL BINARY PROTOCOL v4
 
diff --git a/pylib/cqlshlib/test/test_keyspace_init.cql b/pylib/cqlshlib/test/test_keyspace_init.cql
index c64163a..06f087b 100644
--- a/pylib/cqlshlib/test/test_keyspace_init.cql
+++ b/pylib/cqlshlib/test/test_keyspace_init.cql
@@ -1,3 +1,21 @@
+/*
+# 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.
+*/
+
 CREATE TABLE has_all_types (
     num int PRIMARY KEY,
     intcol int,
diff --git a/redhat/README.md b/redhat/README.md
index cab42a7..a1f6f15 100644
--- a/redhat/README.md
+++ b/redhat/README.md
@@ -1,3 +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.
+#
+-->
+
 # Apache Cassandra rpmbuild
 
 ### Requirements:
diff --git a/redhat/cassandra.in.sh b/redhat/cassandra.in.sh
index ca71782..d4cf3d6 100644
--- a/redhat/cassandra.in.sh
+++ b/redhat/cassandra.in.sh
@@ -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.
+#
 
 # The directory where Cassandra's configs live (required)
 CASSANDRA_CONF=/etc/cassandra/conf
diff --git a/redhat/cassandra.spec b/redhat/cassandra.spec
index 73d4a42..91115e8 100644
--- a/redhat/cassandra.spec
+++ b/redhat/cassandra.spec
@@ -1,3 +1,21 @@
+#
+# 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.
+#
+
 %define __jar_repack %{nil}
 # Turn off the brp-python-bytecompile script
 %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
diff --git a/test/conf/cassandra_pig.yaml b/test/conf/cassandra_pig.yaml
index 68615cf..9175456 100644
--- a/test/conf/cassandra_pig.yaml
+++ b/test/conf/cassandra_pig.yaml
@@ -1,4 +1,22 @@
 #
+# 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.
+#
+
+#
 # Warning!
 # Consider the effects on 'o.a.c.i.s.LegacySSTableTest' before changing schemas in this file.
 #
diff --git a/test/conf/commitlog_compression.yaml b/test/conf/commitlog_compression.yaml
index 9849d7b..d909904 100644
--- a/test/conf/commitlog_compression.yaml
+++ b/test/conf/commitlog_compression.yaml
@@ -1,2 +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.
+#
+
 commitlog_compression:
     - class_name: LZ4Compressor
diff --git a/test/resources/byteman/stream_failure.btm b/test/resources/byteman/stream_failure.btm
index e40f7fe..be4f0e5 100644
--- a/test/resources/byteman/stream_failure.btm
+++ b/test/resources/byteman/stream_failure.btm
@@ -1,4 +1,21 @@
 #
+# 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.
+#
+#
 # Inject streaming failure
 #
 # Before start streaming files in `StreamSession#prepare()` method,
diff --git a/tools/stress/src/org/apache/cassandra/stress/WorkManager.java b/tools/stress/src/org/apache/cassandra/stress/WorkManager.java
index c6a3eee..93b9835 100644
--- a/tools/stress/src/org/apache/cassandra/stress/WorkManager.java
+++ b/tools/stress/src/org/apache/cassandra/stress/WorkManager.java
@@ -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.
+ */
 package org.apache.cassandra.stress;
 
 import java.util.concurrent.atomic.AtomicLong;

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org