SPOI-6684 #resolve Modifying referneces for applications and platform to Apache Apex
Project: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/commit/57340bcc Tree: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/tree/57340bcc Diff: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/diff/57340bcc Branch: refs/heads/master Commit: 57340bcc75a1dfb52a52a8ec1485c62fc00e984b Parents: 841e482 Author: sashadt <[email protected]> Authored: Tue Nov 3 18:55:32 2015 -0800 Committer: Thomas Weise <[email protected]> Committed: Sun Feb 28 22:46:34 2016 -0800 ---------------------------------------------------------------------- apex.md | 6 ++-- application_packages.md | 62 ++++++++++++++++-------------------------- configuration_packages.md | 46 ++++++++++++------------------- 3 files changed, 46 insertions(+), 68 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/57340bcc/apex.md ---------------------------------------------------------------------- diff --git a/apex.md b/apex.md index f06bdb1..b6813a5 100644 --- a/apex.md +++ b/apex.md @@ -1,7 +1,7 @@ Apache Apex ================================================================================ -Apache Apex (incubating) is the industryâs only Apache 2.0 licensed open source enterprise grade unified stream and batch processing engine. Project Apex includes key features requested by open source developer community that are not available in current open source technologies. +Apache Apex (incubating) is the industryâs only open source, enterprise-grade unified stream and batch processing engine. Apache Apex includes key features requested by open source developer community that are not available in current open source technologies. * Event processing guarantees * In-memory performance & scalability @@ -9,4 +9,6 @@ Apache Apex (incubating) is the industryâs only Apache 2.0 licensed open sourc * Native rolling and tumbling window support * Hadoop-native YARN & HDFS implementation -For additional information visit [Apache Apex](http://apex.incubator.apache.org/). \ No newline at end of file +For additional information visit [Apache Apex](http://apex.incubator.apache.org/). + + http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/57340bcc/application_packages.md ---------------------------------------------------------------------- diff --git a/application_packages.md b/application_packages.md index 1d6f6e8..3e58038 100644 --- a/application_packages.md +++ b/application_packages.md @@ -24,15 +24,11 @@ an Apex application project using Maven by running the following command. Replace "com.example", "mydtapp" and "1.0-SNAPSHOT" with the appropriate values (make sure this is all on one line): -``` - $ mvn archetype:generate - -DarchetypeRepository=https://www.datatorrent.com/maven/content/reposito - ries/releases - -DarchetypeGroupId=com.datatorrent - -DarchetypeArtifactId=apex-app-archetype -DarchetypeVersion=3.2.0 - -DgroupId=com.example -Dpackage=com.example.mydtapp -DartifactId=mydtapp - -Dversion=1.0-SNAPSHOT -``` + $ mvn archetype:generate \ + -DarchetypeGroupId=org.apache.apex \ + -DarchetypeArtifactId=apex-app-archetype -DarchetypeVersion=3.2.0-incubating \ + -DgroupId=com.example -Dpackage=com.example.mydtapp -DartifactId=mydtapp \ + -Dversion=1.0-SNAPSHOT This creates a Maven project named "mydtapp". Open it with your favorite IDE (e.g. NetBeans, Eclipse, IntelliJ IDEA). In the project, there is a @@ -44,9 +40,8 @@ runs the unit test for the DAG is in src/test/java/com/example/mydtapp/ApplicationTest.java. Try it out by running the following command: -``` - $cd mydtapp; mvn package -``` + $cd mydtapp; mvn package + This builds the App Package runs the unit test of the DAG. You should be getting test output similar to this: @@ -95,19 +90,16 @@ Then fill the Group ID, Artifact ID, Version and Repository entries as shown bel  -Group ID: com.datatorrent +Group ID: org.apache.apex Artifact ID: apex-app-archetype -Version: 3.0.0 (or any later version) - -Repository: -[https://www.datatorrent.com/maven/content/repositories/releases](https://www.datatorrent.com/maven/content/repositories/releases) +Version: 3.2.0-incubating (or any later version) Press Next and fill out the rest of the required information. For example:  -Click Finish, and now you have created your own DataTorrent App Package +Click Finish, and now you have created your own Apache Apex App Package project, with a default unit test. You can run the unit test, make code changes or make dependency changes within your IDE. The procedure for other IDEs, like Eclipse or IntelliJ, is similar. @@ -115,7 +107,7 @@ other IDEs, like Eclipse or IntelliJ, is similar. # Writing Your Own App Package -Please refer to the [Application Developer Guide](https://www.datatorrent.com/docs/guides/ApplicationDeveloperGuide.html) on the basics on how to write a DataTorrent application. In your AppPackage project, you can add custom operators (refer to [Operator Developer Guide](https://www.datatorrent.com/docs/guides/OperatorDeveloperGuide.html)), project dependencies, default and required configuration properties, pre-set configurations and other metadata. +Please refer to the [Creating Apps](create.md) on the basics on how to write an Apache Apex application. In your AppPackage project, you can add custom operators (refer to [Operator Development Guide](https://www.datatorrent.com/docs/guides/OperatorDeveloperGuide.html)), project dependencies, default and required configuration properties, pre-set configurations and other metadata. ## Adding (and removing) project dependencies @@ -126,9 +118,9 @@ the default pom.xml: <dependencies> <!-- add your dependencies here --> <dependency> - <groupId>com.datatorrent</groupId> + <groupId>org.apache.apex</groupId> <artifactId>malhar-library</artifactId> - <version>${datatorrent.version}</version> + <version>${apex.version}</version> <!-- If you know your application do not need the transitive dependencies that are pulled in by malhar-library, Uncomment the following to reduce the size of your app package. @@ -143,9 +135,9 @@ the default pom.xml: --> </dependency> <dependency> - <groupId>com.datatorrent</groupId> - <artifactId>dt-engine</artifactId> - <version>${datatorrent.version}</version> + <groupId>org.apache.apex</groupId> + <artifactId>apex-engine</artifactId> + <version>${apex.version}</version> <scope>provided</scope> </dependency> <dependency> @@ -176,7 +168,7 @@ warnings similar to the following: ``` [WARNING] 'dependencies.dependency.exclusions.exclusion.groupId' for - com.datatorrent:malhar-library:jar with value '*' does not match a + org.apache.apex:malhar-library:jar with value '*' does not match a valid id pattern. [WARNING] @@ -289,7 +281,7 @@ setHost. The method is called using JAVA reflection and the property value is passed as an argument. In the above example the method setHost will be called on the âredisâ operator with â127.0.0.1â as the argument. -## Port attributes +## Port attributes Port attributes are used to specify the platform behavior for input and output ports. They can be specified using the parameter ```dt.operator.<operator-name>.inputport.<port-name>.attr.<attribute>``` for input port and ```dt.operator.<operator-name>.outputport.<port-name>.attr.<attribute>``` @@ -464,14 +456,14 @@ section that looks like: ``` <properties> - <datatorrent.version>3.0.0</datatorrent.version> - <datatorrent.apppackage.classpath\>lib*.jar</datatorrent.apppackage.classpath> + <apex.version>3.2.0-incubating</apex.version> + <apex.apppackage.classpath\>lib*.jar</apex.apppackage.classpath> </properties> ``` -datatorrent.version is the DataTorrent RTS version that are to be used +apex.version is the Apache Apex version that are to be used with this Application Package. -datatorrent.apppackage.classpath is the classpath that is used when +apex.apppackage.classpath is the classpath that is used when launching the application in the Application Package. The default is lib/\*.jar, where lib is where all the dependency jars are kept within the Application Package. One reason to change this field is when your @@ -499,7 +491,7 @@ that file is only used for the unit test. # Zip Structure of Application Package -DataTorrent Application Package files are zip files. You can examine the content of any Application Package by using unzip -t on your Linux command line. +Apache Apex Application Package files are zip files. You can examine the content of any Application Package by using unzip -t on your Linux command line. There are four top level directories in an Application Package: @@ -673,12 +665,6 @@ You can launch an application within an Application Package. ``` dt> launch [-D property-name=property-value, ...] [-conf config-name] [-apconf config-file-within-app-package] <app-package-file> - [matching-app-name] + [matching-app-name] ``` Note that -conf expects a configuration file in the file system, while -apconf expects a configuration file within the app package. - - - - - - http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/57340bcc/configuration_packages.md ---------------------------------------------------------------------- diff --git a/configuration_packages.md b/configuration_packages.md index 27d3978..331abd1 100644 --- a/configuration_packages.md +++ b/configuration_packages.md @@ -3,7 +3,7 @@ Apache Apex Configuration Packages An Apache Apex Application Configuration Package is a zip file that contains configuration files and additional files to be launched with an -[Application Package](https://www.datatorrent.com/docs/guides/ApplicationPackages.html) using +[Application Package](application_packages.md) using DTCLI or REST API. This guide assumes the readerâs familiarity of Application Package. Please read the Application Package document to get yourself familiar with the concept first if you have not done so. @@ -28,28 +28,23 @@ DT configuration project using Maven by running the following command. Replace "com.example", "mydtconfig" and "1.0-SNAPSHOT" with the appropriate values: -``` - $ mvn archetype:generate - -DarchetypeRepository=https://www.datatorrent.com/maven/content/reposito - ries/releases - -DarchetypeGroupId=com.datatorrent - -DarchetypeArtifactId=apex-conf-archetype -DarchetypeVersion=3.0.0 - -DgroupId=com.example -Dpackage=com.example.mydtconfig - -DartifactId=mydtconfig -Dversion=1.0-SNAPSHOT - -``` + $ mvn archetype:generate \ + -DarchetypeGroupId=org.apache.apex \ + -DarchetypeArtifactId=apex-conf-archetype -DarchetypeVersion=3.2.0-incubating \ + -DgroupId=com.example -Dpackage=com.example.mydtconfig -DartifactId=mydtconfig \ + -Dversion=1.0-SNAPSHOT This creates a Maven project named "mydtconfig". Open it with your favorite IDE (e.g. NetBeans, Eclipse, IntelliJ IDEA). Try it out by running the following command: + ``` $ mvn package ``` The "mvn package" command creates the Config Package file in target directory as target/mydtconfig.apc. You will be able to use that -Configuration Package file to launch an application in your actual -DataTorrent RTS installation. +Configuration Package file to launch an Apache Apex application. ## Using IDE @@ -64,14 +59,9 @@ shown below.  -Group ID: com.datatorrent +Group ID: org.apache.apex Artifact ID: apex-conf-archetype -Version: 3.0.0 (or any later version) - -Repository: -[https://www.datatorrent.com/maven/content/repositories/releases](https://www.datatorrent.com/maven/content/repositories/releases) - -[](https://www.datatorrent.com/maven/content/repositories/releases) +Version: 3.2.0-incubating (or any later version) Press Next and fill out the rest of the required information. For example: @@ -82,19 +72,19 @@ Click Finish, and now you have created your own Apex Configuration Package project. The procedure for other IDEs, like Eclipse or IntelliJ, is similar. -#Assembling your own configuration package + +# Assembling your own configuration package Inside the project created by the archetype, these are the files that you should know about when assembling your own configuration package: - ./pom.xml - ./src/main/resources/classpath - ./src/main/resources/files - -./src/main/resources/META-INF/properties.xml -./src/main/resources/META-INF/properties-{appname}.xml + ./pom.xml + ./src/main/resources/classpath + ./src/main/resources/files + ./src/main/resources/META-INF/properties.xml + ./src/main/resources/META-INF/properties-{appname}.xml -##pom.xml +## pom.xml Example:
