mikewalch commented on a change in pull request #904: Fixes #897 added context 
to application docs and moved some docs from?
URL: https://github.com/apache/fluo/pull/904#discussion_r132262567
 
 

 ##########
 File path: docs/applications.md
 ##########
 @@ -140,12 +135,123 @@ To create an observer, follow these steps:
 
 3.  Build a jar containing these classes and include this jar in the `lib/` 
directory of your Fluo
     application.
-4.  Configure your Fluo instance to use this observer provider by modifying 
the Application section of
-    [fluo-app.properties].
-5.  Initialize Fluo.  During initialization Fluo will obtain the observed 
columns from the 
-    ObserverProvider and persist the columns in Zookeeper.  These columns 
persisted in Zookeeper
-    are used by transactions to know when to trigger observers.
-6.  Start your Fluo instance so that your Fluo workers load the new observer.
+4.  Configure your Fluo application to use this observer provider by modifying 
the Application section of
+    [fluo-app.properties]. Set `fluo.observer.provider` to the observer 
provider class name.
+5.  Initialize your Fluo application as described in the next section.  During 
initialization Fluo
+    will obtain the observed columns from the ObserverProvider and persist the 
columns in Zookeeper.
+    These columns persisted in Zookeeper are used by transactions to know when 
to trigger observers.
+
+## Initializing a Fluo Application
+
+Before a Fluo Application can run, it must be initiaized.  Below is an 
overview of what
+initialization does and some of the properties that may be set for 
initialization.
+
+ * **Initialize ZooKeeper** : Each application has its own area in ZooKeeper 
used for configuration,
+   Oracle state, and worker coordination. All properties, except 
`fluo.connections.*`, are copied
+   into ZooKeeper. For example, if `fluo.worker.num.threads=128` was set, then 
when a worker process
+   starts it will read this from ZooKeeper.
+ * **Copy Observer jars to DFS** : Fluo workers processes need the jars 
containing observers. These
+   are provided in one of the following ways.
+   * Set the property `fluo.observer.init.dir` to a local directory containing 
observer jars. The
+     jars in this directory are copied to DFS under `<fluo.dfs.root>/<app 
name>`. When a worker is
+     started, the jars are pulled from DFS and added to its classpath.
+   * Set the property `fluo.observer.jars.url` to a directory in DFS 
containing observer jars.  No
+     copying is done. When a worker is started, the jars are pulled from this 
location and added to
+     its classpath.
+   * Do not set any of the properties above and have the mechanism that starts 
the worker process
+     add the needed jars to the classpath.
+ * **Create Accumulo table** : Each Fluo application creates and configures an 
Accumulo table. The
+   `fluo.accumulo.*` properties determine which Accumulo instance is used. For 
performance reasons,
+   Fluo runs its own code in Accumulo tablet servers. Fluo attempts to copy 
Fluo jars into DFS and
+   configure Accumulo to use them. Fluo first checks the property 
`fluo.accumulo.jars` and if set,
+   copies the jars listed there. If that property is not set, then Fluo looks 
on the classpath to
+   find jars. Jars are copied to a location under `<fluo.dfs.root>/<app name>`.
+
+Below are the steps to initialize an application from the command line. It is 
also possible to
+initialize an application using Fluo's Java API.
+
+1. Create a copy of [fluo-app.properties] for your Fluo application. 
+
+        cp $FLUO_HOME/conf/fluo-app.properties 
/path/to/myapp/fluo-app.properties
+
+2. Edit your copy of [fluo-app.properties] and make sure to set the following:
+
+    * Class name of your ObserverProvider
+    * Paths to your Fluo observer jars
+    * Accumulo configuration
+    * DFS configuration
+
+   When configuring the observer section of fluo-app.properties, you can 
configure your instance for the
+   [phrasecount] application if you have not created your own application. See 
the [phrasecount]
+   example for instructions. You can also choose not to configure any 
observers but your workers will
+   be idle when started.
+
+3. Run the command below to initialize your Fluo application. Change `myapp` 
to your application name:
+
+        fluo init myapp /path/to/myapp/fluo-app.properties
+
+   A Fluo application only needs to be initialized once. After initialization, 
the Fluo application
+   name is used to start/stop the application and scan the Fluo table.
+
+4. Run `fluo list` which connects to Fluo and lists applications to verify 
initialization.
+
+5. Run `fluo config myapp` to see what configuration is stored in ZooKeeper.
+
+## Starting your Fluo application
+
+Follow the instructions below to start a Fluo application which contains an 
oracle and multiple workers.
+
+1. Configure [fluo-env.sh] and [fluo-conn.properties] if you have not already.
 
 Review comment:
   No link at bottom of page for fluo-env.sh
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to