You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@edgent.apache.org by dl...@apache.org on 2017/12/15 16:41:45 UTC

[07/10] incubator-edgent-website git commit: doc updates dealing with Samples repo

doc updates dealing with Samples repo


Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent-website/commit/7f0115f0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent-website/tree/7f0115f0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent-website/diff/7f0115f0

Branch: refs/heads/master
Commit: 7f0115f03521046e034cb58d16bbe4432c499e3d
Parents: d874ad3
Author: Dale LaBossiere <dl...@us.ibm.com>
Authored: Tue Dec 5 14:09:50 2017 -0500
Committer: Dale LaBossiere <dl...@us.ibm.com>
Committed: Tue Dec 5 14:09:50 2017 -0500

----------------------------------------------------------------------
 site/_data/downloads.yml                    |   8 --
 site/docs/downloads.md                      |  12 +-
 site/docs/edgent-getting-started-samples.md | 173 +++++------------------
 site/docs/edgent-getting-started.md         |   2 +-
 site/docs/power-of-edgent.md                |  25 ++--
 5 files changed, 56 insertions(+), 164 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-edgent-website/blob/7f0115f0/site/_data/downloads.yml
----------------------------------------------------------------------
diff --git a/site/_data/downloads.yml b/site/_data/downloads.yml
index 4a58c75..9237cae 100644
--- a/site/_data/downloads.yml
+++ b/site/_data/downloads.yml
@@ -55,11 +55,3 @@ edgent_1-2-0_sha_location: 'https://www.apache.org/dist/incubator/edgent/1.2.0-i
 edgent_1-2-0_zip_asc_location: 'https://www.apache.org/dist/incubator/edgent/1.2.0-incubating/apache-edgent-1.2.0-incubating-source-release.zip.asc'
 edgent_1-2-0_zip_md5_location: 'https://www.apache.org/dist/incubator/edgent/1.2.0-incubating/apache-edgent-1.2.0-incubating-source-release.zip.md5'
 edgent_1-2-0_zip_sha_location: 'https://www.apache.org/dist/incubator/edgent/1.2.0-incubating/apache-edgent-1.2.0-incubating-source-release.zip.sha'
-edgent_1-2-0_samples_release_note: 'https://www.apache.org/dist/incubator/edgent/1.2.0-incubating/RELEASE_NOTES'
-edgent_1-2-0_samples_dist_location: 'https://www.apache.org/dyn/closer.cgi/incubator/edgent/1.2.0-incubating'
-edgent_1-2-0_samples_asc_location: 'https://www.apache.org/dist/incubator/edgent/1.2.0-incubating/apache-edgent-1.2.0-incubating-samples-source-release.tar.gz.asc'
-edgent_1-2-0_samples_md5_location: 'https://www.apache.org/dist/incubator/edgent/1.2.0-incubating/apache-edgent-1.2.0-incubating-samples-source-release.tar.gz.md5'
-edgent_1-2-0_samples_sha_location: 'https://www.apache.org/dist/incubator/edgent/1.2.0-incubating/apache-edgent-1.2.0-incubating-samples-source-release.tar.gz.sha'
-edgent_1-2-0_samples_zip_asc_location: 'https://www.apache.org/dist/incubator/edgent/1.2.0-incubating/apache-edgent-1.2.0-incubating-samples-source-release.zip.asc'
-edgent_1-2-0_samples_zip_md5_location: 'https://www.apache.org/dist/incubator/edgent/1.2.0-incubating/apache-edgent-1.2.0-incubating-samples-source-release.zip.md5'
-edgent_1-2-0_samples_zip_sha_location: 'https://www.apache.org/dist/incubator/edgent/1.2.0-incubating/apache-edgent-1.2.0-incubating-samples-source-release.zip.sha'

http://git-wip-us.apache.org/repos/asf/incubator-edgent-website/blob/7f0115f0/site/docs/downloads.md
----------------------------------------------------------------------
diff --git a/site/docs/downloads.md b/site/docs/downloads.md
index 0f01a97..c497f85 100644
--- a/site/docs/downloads.md
+++ b/site/docs/downloads.md
@@ -2,11 +2,11 @@
 title: Downloads
 ---
 
-Offical ASF Apache Edgent releases consist of source bundles and convenience binaries. There are two source bundles, one for the Edgent samples and one for the Edgent SDK/runtime.  Convenience binary jars for the Edgent SDK/runtime are available at the [ASF Nexus Releases Repository](https://repository.apache.org/content/repositories/releases/) and Maven Central.
+Official ASF Apache Edgent releases consist of a single Edgent SDK/runtime source bundle and convenience binaries. Convenience binary jars for the Edgent SDK/runtime are available at the [ASF Nexus Releases Repository](https://repository.apache.org/content/repositories/releases/) and Maven Central.  
 
-If you just want to use Edgent, simply download the Samples source bundle and use it to jump-start your application development, leveraging the distributed Edgent SDK/runtime jars. The samples source bundle includes additional information regarding application development and deployment, and tools. For more information, see [Quickstart with Edgent Samples](edgent-getting-started-samples).
+See [Quickstart with Edgent Samples](edgent-getting-started-samples) if you just want to use Edgent and jump-start your Edgent application development.
 
-Note, a separate binary bundle consisting of all of the Edgent jars is not released.  A tool is available in the samples source bundle that can create one.
+Note, a separate binary bundle consisting of all of the Edgent runtime jars is not released.  A tool is available in the samples that can create one.
 
 A source bundle contains a README describing how to build the sources.
 
@@ -18,7 +18,7 @@ See the [community](community) page for more information about contributing to E
 
 | Version           | Docs |
 |:-----------------:|:----:|
-| 1.2.0-incubating  | [JAVA_SUPPORT]({{ site.data.downloads.edgent_1-2-0_java_support_doc_location }}), [Javadoc]({{ site.data.downloads.edgent_1-2-0_doc_location }})  |
+| 1.2.0-incubating  | [JAVA_SUPPORT]({{ site.data.downloads.edgent_1-2-0_java_support_doc_location }}), [Javadoc]({{ site.data.downloads.edgent_1-2-0_doc_location }}), [Samples](edgent-getting-started-samples)  |
 
 It is essential that you verify the integrity of a downloaded bundle.  See [how to verify]({{ site.data.downloads.generic_how_to_verify_location }}) for details on verifying using downloaded KEYS, PGP signature, MD5, or SHA information.
 
@@ -26,9 +26,7 @@ Download the [KEYS]({{ site.data.downloads.edgent_keys_file_location }}) file fo
 
 | Version           | Date           | Bundles | Release Notes | PGP | MD5 | SHA   |
 |:-----------------:|:--------------:|:-------:|:-------------:|:---:|:---:|:-----:|
-| 1.2.0-incubating  | 2017-??-??     | [Samples]({{ site.data.downloads.edgent_1-2-0_samples_dist_location }}) | [1.2.0 Release]({{ site.data.downloads.edgent_1-2-0_samples_release_note }}) | [tar-ASC]({{ site.data.downloads.edgent_1-2-0_samples_asc_location  }}) | [tar-MD5]({{  site.data.downloads.edgent_1-2-0_samples_md5_location }}) | [tar-SHA]({{  site.data.downloads.edgent_1-2-0_samples_sha_location }}) |
-|                   |                |         |               | [zip-ASC]({{ site.data.downloads.edgent_1-2-0_samples_zip_asc_location  }}) | [zip-MD5]({{  site.data.downloads.edgent_1-2-0_samples_zip_md5_location }}) | [zip-SHA]({{  site.data.downloads.edgent_1-2-0_samples_zip_sha_location }}) |
-|                   |                | [Source]({{ site.data.downloads.edgent_1-2-0_dist_location }}) | [1.2.0 Release]({{ site.data.downloads.edgent_1-2-0_release_note }}) | [tar-ASC]({{ site.data.downloads.edgent_1-2-0_asc_location  }}) | [tar-MD5]({{  site.data.downloads.edgent_1-2-0_md5_location }}) | [tar-SHA]({{  site.data.downloads.edgent_1-2-0_sha_location }}) |
+| 1.2.0-incubating  | 2017-??-??     | [Source]({{ site.data.downloads.edgent_1-2-0_dist_location }}) | [1.2.0 Release]({{ site.data.downloads.edgent_1-2-0_release_note }}) | [tar-ASC]({{ site.data.downloads.edgent_1-2-0_asc_location  }}) | [tar-MD5]({{  site.data.downloads.edgent_1-2-0_md5_location }}) | [tar-SHA]({{  site.data.downloads.edgent_1-2-0_sha_location }}) |
 |                   |                |         |               | [zip-ASC]({{ site.data.downloads.edgent_1-2-0_zip_asc_location  }}) | [zip-MD5]({{  site.data.downloads.edgent_1-2-0_zip_md5_location }}) | [zip-SHA]({{  site.data.downloads.edgent_1-2-0_zip_sha_location }}) |
 
 ## Releases Prior to 1.2.0

http://git-wip-us.apache.org/repos/asf/incubator-edgent-website/blob/7f0115f0/site/docs/edgent-getting-started-samples.md
----------------------------------------------------------------------
diff --git a/site/docs/edgent-getting-started-samples.md b/site/docs/edgent-getting-started-samples.md
index d14ed72..14522ef 100644
--- a/site/docs/edgent-getting-started-samples.md
+++ b/site/docs/edgent-getting-started-samples.md
@@ -3,45 +3,46 @@ title: Getting started with Apache Edgent Samples
 ---
 
 Getting started with the Edgent samples is a great way to start using Edgent and
-jump-start your application development.
+jump-start your Edgent application development.
 
-Essentially, you download the samples source release, then easily build and
-run them from either the command line or from an IDE.
+Be sure to see _Additional Resources_ below for more great info!
 
-Then, see the Additional Resources section at the end of this page!
+# Quickstart
 
-See [The Power of Edgent](power-of-edgent) to help you quickly start to get a sense of Edgent's capabilities.
-If you want more of an introduction to Edgent and tutorial first, see the [Getting Started Guide](edgent-getting-started).
-
-
-Convenience binaries (jars) for the Edgent runtime releases are distributed to the ASF Nexus Repository and the Maven Central Repository. There is no need to download the Edgent runtime sources and build them unless you want to. You don't have to manually download the Edgent jars either.
+Convenience binaries (jars) for the Edgent runtime releases are distributed
+to the ASF Nexus Repository and the Maven Central Repository.  You don't have
+to manually download the Edgent jars and there is no need to download the 
+Edgent runtime sources and build them unless you want to.
 
-By default the samples depend on Java8.  Download and install Java8 if you need to.
+By default the samples depend on Java8.  Download and install Java8 if needed.
 
 ## Download the Edgent Samples
 
-1. Locate the Edgent samples release you would like to use at [downloads]({{ site.data.project.download }})
-2. In the Bundles column for the desired release:
-    * Click on the _Samples_ link
-3. Download the .tar.gz or zip file from one of the mirror sites
-4. Unpack the downloaded file using the appropriate one of:
-    * `tar zxvf apache-edgent-X.X.X-incubating-samples-source-release.tar.gz`
-    * `unzip apache-edgent-X.X.X-incubating-samples-source-release.zip`
+Get the Edgent Samples either by cloning or downloading the [Edgent Samples GitHub repository](https://github.com/apache/incubator-edgent-samples):
 
-## Quickstart: Build and run samples from the command line
+```sh
+git clone https://github.com/apache/incubator-edgent-samples
+cd incubator-edgent-samples
+git checkout develop
+```
+or to download:
 
-You must have Java 8 installed on your system. Maven will be automatically
-downloaded and installed by the maven wrapper `mvnw`.
+  + Open the _Clone or download_ pulldown at the [Edgent Samples GitHub repository](https://github.com/apache/incubator-edgent-samples)
+  + Click on _Download ZIP_
+  + Unpack the downloaded ZIP
 
-In the unpacked samples folder...
+```sh
+    unzip incubator-edgent-samples-develop.zip
+```
 
-Build the samples for Java 8
+## Build the Samples
 
 ```sh
-./mvnw clean package
+cd <the cloned or unpacked downloaded samples folder>
+./mvnw clean package  # build for Java8
 ```
 
-Run the HelloEdgent sample
+## Run the HelloEdgent sample
 
 ```sh
 cd topology
@@ -51,122 +52,14 @@ cd topology
   ...
 ```
 
-### Cloning the template
-
-For your application project, you can clone the template project.
-In the unpacked samples folder
-
-```sh
-cp -R template ~/myApp
-```
-
-Verify the setup
-
-```sh
-cd ~/myApp
-./mvnw clean package
-./app-run.sh  # prints a hello message
-```
-See `README.md` in the new project folder for more information.
-
-
-## Quickstart: Build and run samples from an IDE
-
-Here we'll use Eclipse for the development environment.  Another popular choice is the maven-integrated IntelliJ IDE.
-
-See [eclipse.org](https://www.eclipse.org) if you need to download Eclipse.
-It's easiest if you choose a package that includes the Maven integration.
-Otherwise, update your Eclipse installation with the
-[Eclipse Maven Integration](https://projects.eclipse.org/projects/technology.m2e).
-
-This remainder of this getting started information assumes a basic understanding of Eclipse.
+# Additional Resources
 
-Note: Specifics may change depending on your version of Eclipse or the 
-Eclipse Maven plugin.
-
-Import the samples into your Eclipse workspace:
-
-  1. From the Eclipse *File* menu, select *Import...*
-  2. From the *Maven* folder, select *Existing Maven Projects* and click *Next*
-    + browse to the unpacked samples folder
-      and select it.  A hierarchy of samples projects / pom.xml files will be
-      listed and all selected. 
-    + verify the *Add project(s) to working set* checkbox is checked
-    + click *Finish*.  Eclipse starts the import process and builds the workspace.
-
-Top-level artifacts such as the `README.md` file are available under the
-`edgent-samples` project.
-
-Once the samples have been imported you can run them from
-Eclipse in the usual manner. E.g.,
-
-1. From the Eclipse *Navigate* menu, select *Open Type*
-   + enter type type name `HelloEdgent` and click *OK*
-2. right click on the `HelloEdgent` class name and from the context menu
-   + click on *Run As*, then *Java application*.  
-   `HelloEdgent` runs and prints to the Console view.
-
-
-### Cloning the template
-
-To clone the template project for your application project:
-
-1. Recursively copy the template folder into a new folder from the command line, e.g.,
-   from the unpacked samples folder
-   + cp -R template ~/myApp
-2. Import the new project into your Eclipse workspace
-  1. from the Eclipse *File* menu, select *Import...*
-  2. from the *Maven* folder, select *Existing Maven Projects* and click *Next*
-  + browse to the new folder and select it.  The project's pom.xml file will be
-    listed and selected. 
-  + click *Finish*.  Eclipse starts the import process and builds the workspace.
-    Note, the new imported project's name will be `my-app`.
-    This can be renamed later.
-
-Verify you can run the imported template app:
-
-1. From the Eclipse *Navigate* menu, select *Open Type*
-   + enter type type name `TemplateApp` and click *OK*
-2. right click on the `TemplateApp` class name and from the context menu
-   + click on *Run As*, then *Java application*.  
-  `TemplateApp` runs and prints to the Console view.
-
-You can then start adding your application's java code.
-
-Review the `README.md` file in the newly imported project's folder.
-
-The project's `pom.xml` file is heavily commented to ease
-specifying dependencies to various Edgent jars.
-Open it and select the `pom.xml` tab in the Maven POM Editor to view
-the comments.  If needed, change the `edgent.runtime.version`
-property to the desired Edgent version. When needed, adjust
-the Edgent jar dependencies.
-
-Optionally, rename the Java class, Java package,
-project's folder, and change maven project information.
-
-1. In the Eclipse Project Explorer, open the `my-app` project,
-   then the `src/main/java` folder, then the `com.mycompany.app` package.
-   Right click on `TemplateApp.java` and select *Refactor* and *Rename...*
-   + enter the new name for the Java file
-2. Right click on the `com.mycompany.app` package and select *Refactor* and *Rename...*
-   + enter the new name for the package
-3. Right click on the `my-app` project select *Refactor* and *Rename...*
-   + enter the new project name
-4. Right click on the renamed project and and select *Refactor* and *Rename Maven Artifact*
-   + enter the new maven artifact coordinates information
-
-## Additional Resources
-
-You can continue to explore the samples. The README.md in the unpacked samples
-folder summarize what is available, as well as more information about
-building and running them. 
-
-As noted above, the samples include a template project that
-you can clone for your application. 
+See [The Power of Edgent](power-of-edgent) to help you quickly start to get a sense of Edgent's capabilities.
+See the [Getting Started Guide](edgent-getting-started) for a tutorial.
 
-Some additional development tools are provided with the samples, in particular,
-`get-edgent-jars.sh` and `package-app.sh`.
-See [Edgent Application Development](application-development).
+Much more information about the samples is available in the README.md at the [Edgent Samples GitHub repository](https://github.com/apache/incubator-edgent-samples), including:
 
-The [Getting Started Guide](edgent-getting-started) identifies other resources.
+  + application development and packaging
+  + application template project
+  + list of samples
+  + using an IDE

http://git-wip-us.apache.org/repos/asf/incubator-edgent-website/blob/7f0115f0/site/docs/edgent-getting-started.md
----------------------------------------------------------------------
diff --git a/site/docs/edgent-getting-started.md b/site/docs/edgent-getting-started.md
index 1a06ddb..17be55d 100644
--- a/site/docs/edgent-getting-started.md
+++ b/site/docs/edgent-getting-started.md
@@ -23,7 +23,7 @@ If you want to get a developent environment setup quickly see the [Quickstart wi
 
 The _Edgent Cookbook_ topic includes many well documented recipies that are good for learning and jump-starting the development of your application.
 
-The rest of this page is an introduction to Edgent using a simple simulated Temperature Sensor application.
+The rest of this page is a detailed introduction to Edgent using a simple simulated Temperature Sensor application.
 
 
 ## Apache Edgent and streaming analytics

http://git-wip-us.apache.org/repos/asf/incubator-edgent-website/blob/7f0115f0/site/docs/power-of-edgent.md
----------------------------------------------------------------------
diff --git a/site/docs/power-of-edgent.md b/site/docs/power-of-edgent.md
index 356a30f..619da90 100644
--- a/site/docs/power-of-edgent.md
+++ b/site/docs/power-of-edgent.md
@@ -52,12 +52,15 @@ to keep reading!
 Edgent Applications need to create streams of data from external entities,
 termed ingest, and sink streams of data to external entities.  
 There are primitives for those operations and a collection of
-connectors to common external entities.
+connectors to common external entities,
+more Connectors contributions are welcome!
 
-Connectors are just code the make it easier to for an Edgent application
+Connectors are just code that make it easier for an Edgent application
 to integrate with an external entity.  They use Edgent ingest primitives
 like (`Topology.poll()`, `Topology.events()`, etc), and `TStream.sink()`
-like any other Edgent code.  But more Connectors contributions are welcome!
+like any other Edgent code.  A connector may provide `Supplier` and 
+`Consumer` functions, for ingest and sink respectively, that an 
+application can use directly with the Edgent API.
 
 OK... fewer words, more code!
 
@@ -146,7 +149,7 @@ Want to sink to a log via slf4j or another logging system?  Just do it!
     import org.slf4j.LoggerFactory;
     private static final Logger logger = LoggerFactory.getLogger(MyClass.class);
 
-    readings.sync(reading -> logger.info("reading: {}", reading));
+    readings.sink(reading -> logger.info("reading: {}", reading));
 ```
 
 Want to publish to Elasticsearch? See [EDGENT-368](https://issues.apache.org/jira/browse/EDGENT-368) for a full code example.
@@ -172,7 +175,7 @@ Want readings from multiple sensors in a single stream tuple?
         }, 1, TimeUnit.SECONDS);
 ```
 
-Want to use define a class or use an existing one for a tuple?
+Want to define a class or use an existing one for a tuple?
 
 ```java
     public class SensorReading {
@@ -197,7 +200,7 @@ Want to use define a class or use an existing one for a tuple?
 Edgent provides some simple simulated sensors that can be helpful to get going.
 You've already seen `SimulatedTemperatureSensor` and
 `SimpleSimulatedSensor` - included in the Edgent Samples source release bundle.
-There are a couple of more in the same Java package.
+There are additional ones in the same Java package.
 
 #### Sensor library
 
@@ -231,6 +234,12 @@ Or use the [Range]({{ site.docsurl }}/index.html?org/apache/{{ site.data.project
     readings = readings.filter(reading -> !range.contains(reading));
 ```
 
+Or
+
+```java
+    readings = readings.filter(Ranges.outsideOf(Ranges.open(5, 30)));
+```
+
 That alone isn't a very compelling use of Range but consider
 a larger context.
 A Range has a simple String representation (e.g., the above is `"(5d,30d)"`)
@@ -320,7 +329,7 @@ OK, maybe that one was a bit too large a code fragment for this introduction.
 ### Windowing and aggregation
 
 Want to do signal smoothing - create a continuously aggregated average over the last 10 readings?
-Each time a tuple is added to the window a new aggregated value computed and is added to the output stream.
+Here, each time a tuple is added to the window a new aggregated value computed and is added to the output stream.
 
 ```java
     TWindow<Double,Integer> window = readings.last(10, Functions.unpartitioned());
@@ -374,7 +383,7 @@ Want to compute several basic statistics and a regression for an aggregation? Us
 ```
 
 There's also support for multi-variable aggregations - independent statistic
-aggregations for multi variables in a list of tuples.  e.g., temperatures and
+aggregations for multiple variables in a list of tuples.  e.g., temperatures and
 pressures variables in each tuple.
 
 If the objects in the window are a JsonObject, [JsonAnalytics]({{ site.docsurl }}/index.html?org/apache/{{ site.data.project.unix_name }}/analytics/math3/json/JsonAnalytics.html) can be handy.