Update license headers and pointers
diff --git a/.rat-excludes b/.rat-excludes
index fda2300..7ad3a76 100644
--- a/.rat-excludes
+++ b/.rat-excludes
@@ -1,6 +1,5 @@
.rat-excludes
rat.out
-README*
.gitignore
.git
target
@@ -10,10 +9,4 @@
.classpath
.project
build
-newApp.README
-RELEASE_NOTES.html
-README.md
# note: pattern with * don't seem to work, even when properly escaped
-logback.xml
-s4-checkstyle.xml
-s4-eclipse-format.xml
\ No newline at end of file
diff --git a/NOTICE.txt b/NOTICE
similarity index 100%
rename from NOTICE.txt
rename to NOTICE
diff --git a/README.md b/README.md
index 57ee04e..9f02d6e 100644
--- a/README.md
+++ b/README.md
@@ -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. -->
+
Apache S4
=========
@@ -20,7 +36,7 @@
For the latest information about S4, please visit our website at:
- http://incubator.apache.org/s4
+ http://incubator.apache.org/s4
Source code is available here: https://git-wip-us.apache.org/repos/asf?p=incubator-s4.git
@@ -39,7 +55,21 @@
released source package.
-We use gradle http://gradle.org as the build system.
+We use gradle `http://gradle.org` as the build system, and we use the gradle wrapper script (`gradlew`) in some of the S4 tools.
+
+
+### Installing the gradle wrapper
+
+> Instructions apply to source release downloads. When checking out from the git repository, the gradle wrapper is already available.
+
+
+Gradle is not shipped with the source distribution of S4, so you'll need to :
+
+1. Install gradle: follow the instructions in the [gradle web site](http://gradle.org). We tested S4 with gradle 1.4.
+2. Generate the gradle wrapper: from the root directory of the S4 project, execute: `/path/to/gradle wrapper`
+ * this will generate `gradlew` and `gradlew.bat` script and place `gradle-wrapper-1.4.jar` and `gradle-wrapper-1.4.properties` in the `lib` directory
+
+### Building the project
* From the root directory of the S4 project:
@@ -60,13 +90,24 @@
Directory structure
-------------------
-* If you have a source package:
+
+* If you checked out from the git repository:
- root directory contains build and utility scripts, as well as informative files
- config/ directory contains configuration files for source code formatting
+ - lib/ directory contains libraries for building the project and validating source headers
+ - subprojects/ directory contains the plaftorm subprojects: base, comm, core, tools,
+ as well as example (example is not fully ported to 0.5.0+)
+ - test-apps/ directory contains some examples (some of them very trivial are used
+ in regression tests)
+ - website/ directory contains the source of the website, including documentation
+
+
+
+* If you have a source package:
+
+ - root directory contains build and utility scripts, as well as informative files
- doc/ directory contains the javadoc
- - gradle/ directory contains libraries used by the gradle build tool
- - lib/ directory contains some other gradle libraries
- subproject/ directory contains the plaftorm subprojects: base, comm, core, tools,
as well as example (example is not fully ported to 0.5.0)
- test-apps/ directory contains some examples (some of them very trivial are used
@@ -82,7 +123,6 @@
* the platform libraries (prefixed with "s4")
* the dependencies
- bin/ directory contains some scripts that are used by the s4 script
- - gradle/ directory contains libraries used for building S4 projects
diff --git a/RELEASE_NOTES.html b/RELEASE_NOTES.html
index 08ca59f..5438d43 100644
--- a/RELEASE_NOTES.html
+++ b/RELEASE_NOTES.html
@@ -1,3 +1,9 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+<title>Apache S4 0.6.0 Release Notes</title>
+</head>
+<body>
<p>
Release Notes - Apache S4 - Version 0.6.0
@@ -116,4 +122,7 @@
</li>
<li>[<a href='https://issues.apache.org/jira/browse/S4-124'>S4-124</a>] - Update documentation for 0.6.0 release
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+</body>
+</html>
diff --git a/build.gradle b/build.gradle
index 6823f42..34723e2 100644
--- a/build.gradle
+++ b/build.gradle
@@ -157,7 +157,7 @@
jar {
from (rootDir) {
- include "NOTICE.txt"
+ include "NOTICE"
include "LICENSE"
into "META-INF"
}
@@ -223,9 +223,7 @@
from (rootDir) {
include "README.md"
include "DISCLAIMER"
- include "RELEASE_NOTES.html"
include "gradlew"
- include "gradle.bat"
include "s4"
}
into new File(project.rootDir.path+'/subprojects/s4-tools/src/dist/')
@@ -296,7 +294,12 @@
exclude ('**/tmp/**')
exclude ('**/bin/**')
exclude ('website/**')
- exclude ('lib/apache-rat-0.8.jar')
+ exclude ('lib')
+ exclude ('gradlew')
+ exclude ('RELEASE_NOTES.html')
+ exclude ('config')
+ exclude ('subprojects/s4-benchmarks/config/injector.config')
+ exclude ('subprojects/s4-benchmarks/config/node.config')
into (baseName+'-'+version+'-'+classifier)
}
diff --git a/config/binrelease/LICENSE b/config/binrelease/LICENSE
index b92c80c..ab8b6a3 100644
--- a/config/binrelease/LICENSE
+++ b/config/binrelease/LICENSE
@@ -202,7 +202,19 @@
----------------------------------------------------------------------------
-This product uses kryo and minlog, which use the following license:
+This product includes the following libraries, which use the Apache License,
+Version 2.0 : guava 13.0.1, guice 3.0, guice-assist 3.0, javax.inject 1,
+objenesis 1.2, zkclient 0.1, gradle-base-services 1.4, gradle-core 1.4,
+gradle-tooling-api 1.4, gradle-wrapper 1.4, metrics-core 2.1.3,
+netty 3.5.11.Final, gson 1.6
+
+----------------------------------------------------------------------------
+
+This product includes the aop-alliance 1.0 library, which is public domain
+
+----------------------------------------------------------------------------
+
+This product includes kryo 2.20 and minlog 1.2, which use the following license:
Copyright (c) 2008, Nathan Sweet All rights reserved.
@@ -230,7 +242,7 @@
----------------------------------------------------------------------------
-This product uses asm, which uses the following license:
+This product includes asm 4.0, which uses the following license:
Copyright (c) 2000-2011 INRIA, France Telecom
All rights reserved.
@@ -264,7 +276,8 @@
----------------------------------------------------------------------------
-This product uses Logback, which uses the following license (EPL1.0):
+This product includes Logback 0.9.29 (logback-core and logback-classic jars),
+which uses the following license (EPL1.0):
Logback: the reliable, generic, fast and flexible logging framework. Copyright
(C) 1999-2012, QOS.ch. All rights reserved.
@@ -492,7 +505,7 @@
----------------------------------------------------------------------------
-This product uses slf4j, which uses the following license (MIT):
+This product includes slf4j 1.6.1, which uses the following license (MIT):
Copyright (c) 2004-2011 QOS.ch
All rights reserved.
@@ -518,8 +531,8 @@
---------------------------------------------------------------------------
-This product uses jcip-annotations, copyright (c) 2005 Brian Goetz and Tim
-Peierls, using the Creative Commons Attribution License:
+This product includes jcip-annotations 1.0, copyright (c) 2005 Brian Goetz
+and Tim Peierls, using the Creative Commons Attribution License:
Attribution 2.5
diff --git a/config/binrelease/NOTICE.txt b/config/binrelease/NOTICE
similarity index 100%
rename from config/binrelease/NOTICE.txt
rename to config/binrelease/NOTICE
diff --git a/gradlew b/gradlew
index 3f041e5..c45cab2 100755
--- a/gradlew
+++ b/gradlew
@@ -1,5 +1,20 @@
#!/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.
+#
##############################################################################
##
## Gradle start up script for UN*X
diff --git a/gradlew.bat b/gradlew.bat
deleted file mode 100644
index 076e37d..0000000
--- a/gradlew.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windowz variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\lib\gradle-wrapper-1.4.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/subprojects/s4-benchmarks/README.md b/subprojects/s4-benchmarks/README.md
index 1839df3..d610215 100644
--- a/subprojects/s4-benchmarks/README.md
+++ b/subprojects/s4-benchmarks/README.md
@@ -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. -->
+
Simple S4 Benchmarking Framework
================================
@@ -31,9 +47,10 @@
## Parameters
-We provide a script for that purpose: `bench-cluster.sh`
+We provide a script for that purpose: `bench-cluster.sh`.
-You can use arbitrary numbers of injectors and processing nodes, in order to vary the load and the number of concurrent connections.
+
+We can use arbitrary numbers of injectors and processing nodes, in order to vary the load and the number of concurrent connections.
Input parameters are:
@@ -44,7 +61,9 @@
- node configuration (you __must__ specify the correct zookeeper connection string. By default, a server is created on the node where the `bench-cluster.sh` script is executed)
-Exmample configuration files are available in `/config` and you can configure :
+Example configuration files `config/injector.config` and `config/node.config` are not included in the source distribution but can be retrieved from the S4 git repository, in the `<root>/subprojects/s4-benchmarks/config` directory.
+
+You can configure :
- the number of keys
- the number of test iterations
diff --git a/subprojects/s4-benchmarks/src/main/resources/logback.xml b/subprojects/s4-benchmarks/src/main/resources/logback.xml
index ea8c85a..0f34cc7 100644
--- a/subprojects/s4-benchmarks/src/main/resources/logback.xml
+++ b/subprojects/s4-benchmarks/src/main/resources/logback.xml
@@ -1,3 +1,20 @@
+<?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.-->
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
diff --git a/subprojects/s4-core/src/main/resources/logback.xml b/subprojects/s4-core/src/main/resources/logback.xml
index ea8c85a..0f34cc7 100644
--- a/subprojects/s4-core/src/main/resources/logback.xml
+++ b/subprojects/s4-core/src/main/resources/logback.xml
@@ -1,3 +1,20 @@
+<?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.-->
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
diff --git a/subprojects/s4-example/src/main/java/org/apache/s4/example/counter/README.md b/subprojects/s4-example/src/main/java/org/apache/s4/example/counter/README.md
index ebe6228..ab9f659 100644
--- a/subprojects/s4-example/src/main/java/org/apache/s4/example/counter/README.md
+++ b/subprojects/s4-example/src/main/java/org/apache/s4/example/counter/README.md
@@ -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. -->
+
S4 Counter Example (NOT updated for 0.5.0)
==================
diff --git a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/CreateApp.java b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/CreateApp.java
index 4b2a476..64ac955 100644
--- a/subprojects/s4-tools/src/main/java/org/apache/s4/tools/CreateApp.java
+++ b/subprojects/s4-tools/src/main/java/org/apache/s4/tools/CreateApp.java
@@ -112,7 +112,9 @@
@Override
public boolean processLine(String line) throws IOException {
- System.out.println(line.replace("<appDir>", appArgs.getAppDir()));
+ if (!line.startsWith("#")) {
+ System.out.println(line.replace("<appDir>", appArgs.getAppDir()));
+ }
return true;
}
diff --git a/subprojects/s4-tools/src/main/resources/templates/newApp.README b/subprojects/s4-tools/src/main/resources/templates/newApp.README
index 69975c7..4d93aeb 100644
--- a/subprojects/s4-tools/src/main/resources/templates/newApp.README
+++ b/subprojects/s4-tools/src/main/resources/templates/newApp.README
@@ -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.
+
_____ _ _
/ ____|| || |
| (___ | || |_
diff --git a/test-apps/simple-deployable-app-1/src/main/java/org/apache/s4/deploy/SimplePE.java b/test-apps/simple-deployable-app-1/src/main/java/org/apache/s4/deploy/SimplePE.java
index 40d07aa..f83110d 100644
--- a/test-apps/simple-deployable-app-1/src/main/java/org/apache/s4/deploy/SimplePE.java
+++ b/test-apps/simple-deployable-app-1/src/main/java/org/apache/s4/deploy/SimplePE.java
@@ -45,9 +45,12 @@
try {
LoggerFactory.getLogger(getClass()).debug("processing envent {}", event.get("line"));
// test s4r resource access
- zk.create("/resourceData",
- new String(ByteStreams.toByteArray(getClass().getResourceAsStream("/resource.txt"))),
- CreateMode.PERSISTENT);
+ // need to strip ASL text from reference content file
+ String strippedContent = new String(
+ ByteStreams.toByteArray(getClass().getResourceAsStream("/resource.txt"))).substring(new String(
+ ByteStreams.toByteArray(getClass().getResourceAsStream("/ASL2.txt"))).length());
+
+ zk.create("/resourceData", strippedContent, CreateMode.PERSISTENT);
// test event processing
zk.create("/onEvent@" + event.get("line"), new byte[0], CreateMode.PERSISTENT);
zk.close();
diff --git a/test-apps/simple-deployable-app-1/src/main/resources/ASL2.txt b/test-apps/simple-deployable-app-1/src/main/resources/ASL2.txt
new file mode 100644
index 0000000..7148c46
--- /dev/null
+++ b/test-apps/simple-deployable-app-1/src/main/resources/ASL2.txt
@@ -0,0 +1,15 @@
+# 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.
+#
diff --git a/test-apps/simple-deployable-app-1/src/main/resources/resource.txt b/test-apps/simple-deployable-app-1/src/main/resources/resource.txt
index 7c8b9c8..dc6cfdc 100644
--- a/test-apps/simple-deployable-app-1/src/main/resources/resource.txt
+++ b/test-apps/simple-deployable-app-1/src/main/resources/resource.txt
@@ -1 +1,16 @@
+# 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.
+#
Salut!
\ No newline at end of file
diff --git a/website/content/doc/0.6.0/fault_tolerance.md b/website/content/doc/0.6.0/fault_tolerance.md
index 9086582..05c53b2 100644
--- a/website/content/doc/0.6.0/fault_tolerance.md
+++ b/website/content/doc/0.6.0/fault_tolerance.md
@@ -107,8 +107,10 @@
A PE can be checkpointed if:
-- the PE class provides an empty no-arg constructor (that restriction should be lifted in next releases)
-- it has non transient serializable fields (and by opposition, transient fields will never be checkpointed)
+- **the PE class provides an empty no-arg constructor** (that restriction should be lifted in next releases)
+- **it has non transient serializable fields** (and by opposition, transient fields will never be checkpointed)
+
+> For example, one must make sure fields of type `Stream` (for sending messages downstream) are transient!
##### Checkpointing application configuration
diff --git a/website/content/doc/0.6.0/overview.md b/website/content/doc/0.6.0/overview.md
index 76e70e2..fa53450 100644
--- a/website/content/doc/0.6.0/overview.md
+++ b/website/content/doc/0.6.0/overview.md
@@ -92,3 +92,7 @@
![image](/images/doc/0.6.0/S4_hierarchical_archi.png)
+## Note
+
+S4 0.6 works exclusively with TCP
+