Repository: incubator-predictionio
Updated Branches:
  refs/heads/develop 23c21d6ca -> 02a5655fc


http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/console/dashboard.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/io/prediction/tools/console/dashboard.scala.txt 
b/tools/src/main/twirl/io/prediction/tools/console/dashboard.scala.txt
deleted file mode 100644
index 85eacda..0000000
--- a/tools/src/main/twirl/io/prediction/tools/console/dashboard.scala.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Usage: pio dashboard [--ip <value>] [--port <value>]
-
-  --ip <value>
-      IP to bind to. Default: localhost
-  --port <value>
-      Port to bind to. Default: 9000

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/console/deploy.scala.txt
----------------------------------------------------------------------
diff --git a/tools/src/main/twirl/io/prediction/tools/console/deploy.scala.txt 
b/tools/src/main/twirl/io/prediction/tools/console/deploy.scala.txt
deleted file mode 100644
index 4ce7985..0000000
--- a/tools/src/main/twirl/io/prediction/tools/console/deploy.scala.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-Usage: pio deploy [--ip <value>] [--port <value>]
-                  [--engine-instance-id <value>]
-                  [--feedback] [--accesskey <value>]
-                  [--event-server-ip <value>] [--event-server-port <value>]
-                  [--batch <value>] [--scratch-uri <value>]
-
-Deploy an engine instance as a prediction server. This command will pass all
-pass-through arguments to its underlying spark-submit command.
-
-  --ip <value>
-      IP to bind to. Default: 0.0.0.0
-  --port <value>
-      Port to bind to. Default: 8000
-  --engine-instance-id <value>
-      Engine instance ID.
-  --feedback
-      Enable feedback loop to event server.
-  --accesskey <value>
-      Access key of the App where feedback data will be stored.
-  --event-server-ip <value>
-      Event server IP. Default: 0.0.0.0
-  --event-server-port <value>
-      Event server port. Default: 7070
-  --batch <value>
-      Batch label of the deployment.
-  --scratch-uri
-      URI of the working scratch space. Specify this when you want to have all
-      necessary files transferred to a remote location. You will usually want 
to
-      specify this when you use --deploy-mode cluster.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/console/eval.scala.txt
----------------------------------------------------------------------
diff --git a/tools/src/main/twirl/io/prediction/tools/console/eval.scala.txt 
b/tools/src/main/twirl/io/prediction/tools/console/eval.scala.txt
deleted file mode 100644
index 499498c..0000000
--- a/tools/src/main/twirl/io/prediction/tools/console/eval.scala.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-Usage: pio eval <evaluation-class> <engine-parameters-generator-class>
-                [--batch <value>]
-                [common options...]
-
-Kick off an evaluation using specified evaluation and engine parameters
-generator class. This command will pass all pass-through arguments to its
-underlying spark-submit command.
-
-  --batch <value>
-      Batch label of the run.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/console/eventserver.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/io/prediction/tools/console/eventserver.scala.txt 
b/tools/src/main/twirl/io/prediction/tools/console/eventserver.scala.txt
deleted file mode 100644
index beda337..0000000
--- a/tools/src/main/twirl/io/prediction/tools/console/eventserver.scala.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Usage: pio eventserver [--ip <value>] [--port <value>] [--stats]
-
-  --ip <value>
-      IP to bind to. Default: 0.0.0.0
-  --port <value>
-      Port to bind to. Default: 7070
-  --stats
-      Enable Event Server internal statistics and its API endpoint.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/console/export.scala.txt
----------------------------------------------------------------------
diff --git a/tools/src/main/twirl/io/prediction/tools/console/export.scala.txt 
b/tools/src/main/twirl/io/prediction/tools/console/export.scala.txt
deleted file mode 100644
index 28eb665..0000000
--- a/tools/src/main/twirl/io/prediction/tools/console/export.scala.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-Usage: pio export --appid <value> --output <value> [--format <value>] 
[--channel <value>]
-
-Exports all events of an app to a file. If Hadoop configuration is present, the
-file will be exported to HDFS instead of local filesystem.
-
-  --appid <value>
-      App ID of events to be exported.
-  --channel <value>
-      Channel Name (default if this is not specified)
-  --output <value>
-      Output path of the exported file.
-  --format <value>
-      The format of the exported file. Valid values are "json" and "parquet".
-      The default format is "json".

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/console/imprt.scala.txt
----------------------------------------------------------------------
diff --git a/tools/src/main/twirl/io/prediction/tools/console/imprt.scala.txt 
b/tools/src/main/twirl/io/prediction/tools/console/imprt.scala.txt
deleted file mode 100644
index 245d749..0000000
--- a/tools/src/main/twirl/io/prediction/tools/console/imprt.scala.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-Usage: pio import --appid <value> --input <value> [--channel <value>]
-
-Imports all events from a file to an app. Each line of the file should be a 
JSON
-object that represent a single event. If Hadoop configuration is present, the
-file will be imported from HDFS instead of local filesystem.
-
-  --appid <value>
-      App ID of events to be imported.
-  --channel <value>
-      Channel Name (default if this is not specified)
-  --input <value>
-      Input path of the import file.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/console/main.scala.txt
----------------------------------------------------------------------
diff --git a/tools/src/main/twirl/io/prediction/tools/console/main.scala.txt 
b/tools/src/main/twirl/io/prediction/tools/console/main.scala.txt
deleted file mode 100644
index a97ecb3..0000000
--- a/tools/src/main/twirl/io/prediction/tools/console/main.scala.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-Usage: pio <command> [options] <args>...
-
-Options common to all commands:
-  [--pio-home <value>] [--spark-home <value>] [--sbt <value>]
-  [-ei <value>] [-ev <value>] [-v <value>] [-m <value>]
-  [-sk | --spark-kryo] [--verbose]
-  [<args>] [-- [<args passed to Spark>] [-- [<args passed to runner]]]
-
-  --sbt <value>
-      Full path of sbt. Default: sbt
-  -ei <value> | --engine-id <value>
-      Specify an engine ID. Usually used by distributed deployment.
-  -ev <value> | --engine-version <value>
-      Specify an engine version. Usually used by distributed deployment.
-  -v <value> | --variant <value>
-      Path to an engine variant JSON file. Default: engine.json
-  -m <value> | --manifest <value>
-      Path to an engine manifest JSON file. Default: manifest.json
-  -sk | --spark-kryo
-      Shorthand for setting the spark.serializer property to
-      org.apache.spark.serializer.KryoSerializer.
-  --verbose
-      Enable third-party informational messages.
-
-Note that it is possible to supply pass-through arguments at the en
-of the command by using a '--' separator, e.g.
-
-  pio train -v my-variant -- --master spark://mycluster:7077
-
-In the example above, the '--master' argument will be passed to the underlying
-spark-submit command. Please refer to the usage section for each command for
-more information.
-
-The most commonly used pio commands are:
-    status        Displays status information about PredictionIO
-    version       Displays the version of this command line console
-    template      Creates a new engine based on an engine template
-    build         Build an engine at the current directory
-    train         Kick off a training using an engine
-    deploy        Deploy an engine as an engine server
-    eventserver   Launch an Event Server
-    app           Manage apps that are used by the Event Server
-    accesskey     Manage app access keys
-    export        Export events from the Event Server
-
-The following are experimental development commands:
-    run           Launch a driver program
-    eval          Kick off an evaluation using an engine
-    dashboard     Launch an evaluation dashboard
-    adminserver   Launch an Admin Server
-
-See 'pio help <command>' to read about a specific subcommand.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/console/run.scala.txt
----------------------------------------------------------------------
diff --git a/tools/src/main/twirl/io/prediction/tools/console/run.scala.txt 
b/tools/src/main/twirl/io/prediction/tools/console/run.scala.txt
deleted file mode 100644
index faef308..0000000
--- a/tools/src/main/twirl/io/prediction/tools/console/run.scala.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-Usage: pio run [--sbt-extra <value>] [--clean] [--no-asm]
-               [common options...] <main class>
-
-Launch a driver program. This command will pass all pass-through arguments to
-its underlying spark-submit command. In addition, it also supports a second
-level of pass-through arguments to the driver program, e.g.
-
-  pio run -- --master spark://localhost:7077 -- --driver-arg foo
-
-  <main class>
-      Main class name of the driver program.
-  --sbt-extra <value>
-      Extra command to pass to SBT when it builds your engine.
-  --clean
-      Clean build.
-  --no-asm
-      Skip building external dependencies assembly.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/console/status.scala.txt
----------------------------------------------------------------------
diff --git a/tools/src/main/twirl/io/prediction/tools/console/status.scala.txt 
b/tools/src/main/twirl/io/prediction/tools/console/status.scala.txt
deleted file mode 100644
index 3ca4af5..0000000
--- a/tools/src/main/twirl/io/prediction/tools/console/status.scala.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Usage: pio status
-
-Displays status information about the PredictionIO system.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/console/template.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/io/prediction/tools/console/template.scala.txt 
b/tools/src/main/twirl/io/prediction/tools/console/template.scala.txt
deleted file mode 100644
index f97c8ce..0000000
--- a/tools/src/main/twirl/io/prediction/tools/console/template.scala.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-Usage: pio template list
-
-Retrieves a list of available template IDs.
-
-Usage: pio template get <template ID> <new engine directory>
-                        [--version <version>]
-                        [--name <value>] [--package <value>] [--email <value>]
-
-Seeds a directory with an engine template.
-
-  <template ID>
-      Engine template ID.
-  <new engine directory>
-      Location of the new engine.
-  --version <value>
-      The template version to get. By default, the most recently tagged version
-      will be downloaded.
-  --name <value>
-      Name of the author of the new engine.
-  --package <value>
-      Scala package name of the new engine.
-  --email <value>
-      E-mail address of the author of the new engine. Specify this if you want
-      to receive updates (critical bug fixes, etc) about the engine template
-      that you are going to use.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/console/train.scala.txt
----------------------------------------------------------------------
diff --git a/tools/src/main/twirl/io/prediction/tools/console/train.scala.txt 
b/tools/src/main/twirl/io/prediction/tools/console/train.scala.txt
deleted file mode 100644
index 582e54e..0000000
--- a/tools/src/main/twirl/io/prediction/tools/console/train.scala.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-Usage: pio train [--batch <value>] [--skip-sanity-check]
-                 [--stop-after-read] [--stop-after-prepare]
-                 [--engine-factory <value>] [--engine-params-key <value>]
-                 [--scratch-uri <value>]
-                 [common options...]
-
-Kick off a training using an engine (variant) to produce an engine instance.
-This command will pass all pass-through arguments to its underlying 
spark-submit
-command.
-
-  --batch <value>
-      Batch label of the run.
-  --skip-sanity-check
-      Disable all data sanity check. Useful for speeding up training in
-      production.
-  --stop-after-read
-      Stop the training process after DataSource.read(). Useful for debugging.
-  --stop-after-prepare
-      Stop the training process after Preparator.prepare(). Useful for
-      debugging.
-  --engine-factory
-      Override engine factory class.
-  --engine-params-key
-      Retrieve engine parameters programmatically from the engine factory 
class.
-  --scratch-uri
-      URI of the working scratch space. Specify this when you want to have all
-      necessary files transferred to a remote location. You will usually want 
to
-      specify this when you use --deploy-mode cluster.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/console/upgrade.scala.txt
----------------------------------------------------------------------
diff --git a/tools/src/main/twirl/io/prediction/tools/console/upgrade.scala.txt 
b/tools/src/main/twirl/io/prediction/tools/console/upgrade.scala.txt
deleted file mode 100644
index 48ea23e..0000000
--- a/tools/src/main/twirl/io/prediction/tools/console/upgrade.scala.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-Usage: pio upgrade <from version> <to version> <old App ID> <new app ID>
-
-Migrate the event data from old App ID to new App ID which can be used with 
<to version> of PredictionIO.
-
-  <from version>
-    The version upgraded from.
-
-  <to version>
-    The version upgraded to.
-
-  <old App ID>
-    Old App ID.
-
-  <new app ID>
-    Mew App ID.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/console/version.scala.txt
----------------------------------------------------------------------
diff --git a/tools/src/main/twirl/io/prediction/tools/console/version.scala.txt 
b/tools/src/main/twirl/io/prediction/tools/console/version.scala.txt
deleted file mode 100644
index f9b2ab9..0000000
--- a/tools/src/main/twirl/io/prediction/tools/console/version.scala.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Usage: pio version
-
-Displays the version of this command line console.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/dashboard/index.scala.html
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/io/prediction/tools/dashboard/index.scala.html 
b/tools/src/main/twirl/io/prediction/tools/dashboard/index.scala.html
deleted file mode 100644
index a9cadde..0000000
--- a/tools/src/main/twirl/io/prediction/tools/dashboard/index.scala.html
+++ /dev/null
@@ -1,99 +0,0 @@
-@import io.prediction.data.storage.EvaluationInstance
-@import io.prediction.tools.dashboard.DashboardConfig
-@import org.joda.time.DateTime
-@import org.joda.time.format.DateTimeFormat
-@(dc: DashboardConfig,
-  dashboardStartTime: DateTime,
-  env: Map[String, String],
-  completedInstances: Seq[EvaluationInstance])
-<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <title>PredictionIO Dashboard at @{dc.ip}:@{dc.port}</title>
-    <link href="/assets/favicon.png" rel="shortcut icon" />
-    <link href="/assets/bootstrap-3.2.0-dist/css/bootstrap.min.css" 
rel="stylesheet">
-    <style type="text/css">
-    .string { color: green; }
-    .number { color: darkorange; }
-    .boolean { color: blue; }
-    .null { color: magenta; }
-    .key { color: red; }
-    </style>
-    <script type="text/javascript">
-      function syntaxHighlight(json) {
-        if (typeof json != 'string') {
-          json = JSON.stringify(json, undefined, 2);
-        }
-        json = json.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, 
'&gt;');
-        return 
json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,
 function (match) {
-          var cls = 'number';
-          if (/^"/.test(match)) {
-            if (/:$/.test(match)) {
-              cls = 'key';
-            } else {
-              cls = 'string';
-            }
-          } else if (/true|false/.test(match)) {
-            cls = 'boolean';
-          } else if (/null/.test(match)) {
-            cls = 'null';
-          }
-          return '<span class="' + cls + '">' + match + '</span>';
-        });
-      }
-      function shorternClassName(className) {
-        return className.replace(/(\w)\w*\./g, "$1."); 
-      }
-    </script>
-  </head>
-  <body>
-    <div class="container-fluid">
-      <div class="page-header">
-        <h1>PredictionIO Dashboard at @{dc.ip}:@{dc.port}</h1>
-        <p class="lead">Started on: 
@{DateTimeFormat.forStyle("FF").print(dashboardStartTime)}</p>
-      </div>
-      <h2>Completed Evaluations</h2>
-      <table class="table table-bordered table-striped">
-        <tr>
-          <th></th>
-          <th>Evaluator Result (One-liner)</th>
-          <th>Evaluation Class</th>
-          <th>Engine Parameters Generator Class</th>
-          <th>Start Time</th>
-          <th>End Time</th>
-          <th>Batch</th>
-        </tr>
-        @for(i <- completedInstances) {
-        <tr>
-          <td>
-            <div>
-              <a href="/engine_instances/@{i.id}/evaluator_results.html" 
class="btn btn-primary">HTML</a>
-            </div>
-          </td>
-          <td>
-            <div>@{i.evaluatorResults}</div>
-          </td>
-          <td>
-            <span title="@{i.evaluationClass}"><script 
type="text/javascript">document.write(shorternClassName("@{i.evaluationClass}"));</script></span>
-          </td>
-          <td>
-            <span title="@{i.engineParamsGeneratorClass}"><script 
type="text/javascript">document.write(shorternClassName("@{i.engineParamsGeneratorClass}"));</script></span>
-          </td>
-          <td>@{DateTimeFormat.forStyle("MM").print(i.startTime)}</td>
-          <td>@{DateTimeFormat.forStyle("MM").print(i.endTime)}</td>
-          <td>@{i.batch}</td>
-        </tr>
-        }
-      </table>
-      <h2>Environment</h2>
-      <p>The following values are accurate up to the time when the dashboard 
was launched.</p>
-      <table class="table table-bordered table-striped">
-        @for(k <- env.keys.toSeq.sorted) {
-        <tr><th>@{k}</th><td>@{env(k)}</td></tr>
-        }
-      </table>
-    </div>
-    <script src="/assets/jquery-1.11.1.min.js"></script>
-    <script src="/assets/bootstrap-3.2.0-dist/js/bootstrap.min.js"></script>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/templates/itemrank/params/algorithmsJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/io/prediction/tools/templates/itemrank/params/algorithmsJson.scala.txt
 
b/tools/src/main/twirl/io/prediction/tools/templates/itemrank/params/algorithmsJson.scala.txt
deleted file mode 100644
index 02abbe5..0000000
--- 
a/tools/src/main/twirl/io/prediction/tools/templates/itemrank/params/algorithmsJson.scala.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-[
-  {
-    "name": "mahoutItemBased",
-    "params": {
-      "booleanData": true,
-      "itemSimilarity": "LogLikelihoodSimilarity",
-      "weighted": false,
-      "nearestN": 10,
-      "threshold": 4.9E-324,
-      "numSimilarItems": 50,
-      "numUserActions": 50,
-      "freshness" : 0,
-      "freshnessTimeUnit" : 86400
-    }
-  }
-]

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/templates/itemrank/params/datasourceJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/io/prediction/tools/templates/itemrank/params/datasourceJson.scala.txt
 
b/tools/src/main/twirl/io/prediction/tools/templates/itemrank/params/datasourceJson.scala.txt
deleted file mode 100644
index 7d219d3..0000000
--- 
a/tools/src/main/twirl/io/prediction/tools/templates/itemrank/params/datasourceJson.scala.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-{
-  "appId": 1,
-  "actions": [
-    "view",
-    "like",
-    "dislike",
-    "conversion",
-    "rate"
-  ],
-  "attributeNames": {
-    "user" : "pio_user",
-    "item" : "pio_item",
-    "u2iActions": [
-      "view",
-      "like",
-      "dislike",
-      "conversion",
-      "rate"
-    ],
-    "itypes" : "pio_itypes",
-    "starttime" : "pio_starttime",
-    "endtime" : "pio_endtime",
-    "inactive" : "pio_inactive",
-    "rating" : "pio_rating"
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/templates/itemrank/params/preparatorJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/io/prediction/tools/templates/itemrank/params/preparatorJson.scala.txt
 
b/tools/src/main/twirl/io/prediction/tools/templates/itemrank/params/preparatorJson.scala.txt
deleted file mode 100644
index 0f55d6e..0000000
--- 
a/tools/src/main/twirl/io/prediction/tools/templates/itemrank/params/preparatorJson.scala.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-{
-  "actions": {
-    "view": 3,
-    "like": 5,
-    "dislike": 1,
-    "conversion": 4,
-    "rate": null
-  },
-  "conflict": "latest"
-}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/templates/itemrank/params/servingJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/io/prediction/tools/templates/itemrank/params/servingJson.scala.txt
 
b/tools/src/main/twirl/io/prediction/tools/templates/itemrank/params/servingJson.scala.txt
deleted file mode 100644
index 0967ef4..0000000
--- 
a/tools/src/main/twirl/io/prediction/tools/templates/itemrank/params/servingJson.scala.txt
+++ /dev/null
@@ -1 +0,0 @@
-{}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/templates/itemrec/params/algorithmsJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/io/prediction/tools/templates/itemrec/params/algorithmsJson.scala.txt
 
b/tools/src/main/twirl/io/prediction/tools/templates/itemrec/params/algorithmsJson.scala.txt
deleted file mode 100644
index 2c58916..0000000
--- 
a/tools/src/main/twirl/io/prediction/tools/templates/itemrec/params/algorithmsJson.scala.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-[
-  {
-    "name": "ncMahoutItemBased",
-    "params": {
-      "booleanData": true,
-      "itemSimilarity": "LogLikelihoodSimilarity",
-      "weighted": false,
-      "threshold": 4.9E-324,
-      "nearestN": 10,
-      "unseenOnly": false,
-      "freshness" : 0,
-      "freshnessTimeUnit" : 86400
-    }
-  }
-]

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/templates/itemrec/params/datasourceJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/io/prediction/tools/templates/itemrec/params/datasourceJson.scala.txt
 
b/tools/src/main/twirl/io/prediction/tools/templates/itemrec/params/datasourceJson.scala.txt
deleted file mode 100644
index 8d4d010..0000000
--- 
a/tools/src/main/twirl/io/prediction/tools/templates/itemrec/params/datasourceJson.scala.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-{
-  "appId": 2,
-  "actions": [
-    "view",
-    "like",
-    "dislike",
-    "conversion",
-    "rate"
-  ],
-  "attributeNames": {
-    "user" : "pio_user",
-    "item" : "pio_item",
-    "u2iActions": [
-      "view",
-      "like",
-      "dislike",
-      "conversion",
-      "rate"
-    ],
-    "itypes" : "pio_itypes",
-    "starttime" : "pio_starttime",
-    "endtime" : "pio_endtime",
-    "inactive" : "pio_inactive",
-    "rating" : "pio_rating"
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/templates/itemrec/params/preparatorJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/io/prediction/tools/templates/itemrec/params/preparatorJson.scala.txt
 
b/tools/src/main/twirl/io/prediction/tools/templates/itemrec/params/preparatorJson.scala.txt
deleted file mode 100644
index 0f55d6e..0000000
--- 
a/tools/src/main/twirl/io/prediction/tools/templates/itemrec/params/preparatorJson.scala.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-{
-  "actions": {
-    "view": 3,
-    "like": 5,
-    "dislike": 1,
-    "conversion": 4,
-    "rate": null
-  },
-  "conflict": "latest"
-}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/templates/itemrec/params/servingJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/io/prediction/tools/templates/itemrec/params/servingJson.scala.txt
 
b/tools/src/main/twirl/io/prediction/tools/templates/itemrec/params/servingJson.scala.txt
deleted file mode 100644
index 0967ef4..0000000
--- 
a/tools/src/main/twirl/io/prediction/tools/templates/itemrec/params/servingJson.scala.txt
+++ /dev/null
@@ -1 +0,0 @@
-{}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/templates/itemsim/params/algorithmsJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/io/prediction/tools/templates/itemsim/params/algorithmsJson.scala.txt
 
b/tools/src/main/twirl/io/prediction/tools/templates/itemsim/params/algorithmsJson.scala.txt
deleted file mode 100644
index fb8e9ac..0000000
--- 
a/tools/src/main/twirl/io/prediction/tools/templates/itemsim/params/algorithmsJson.scala.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-[
-  {
-    "name": "ncMahoutItemBased",
-    "params": {
-      "booleanData": true,
-      "itemSimilarity": "LogLikelihoodSimilarity",
-      "weighted": false,
-      "threshold": 4.9E-324,
-      "freshness" : 0,
-      "freshnessTimeUnit" : 86400
-    }
-  }
-]

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/templates/itemsim/params/datasourceJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/io/prediction/tools/templates/itemsim/params/datasourceJson.scala.txt
 
b/tools/src/main/twirl/io/prediction/tools/templates/itemsim/params/datasourceJson.scala.txt
deleted file mode 100644
index 8d4d010..0000000
--- 
a/tools/src/main/twirl/io/prediction/tools/templates/itemsim/params/datasourceJson.scala.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-{
-  "appId": 2,
-  "actions": [
-    "view",
-    "like",
-    "dislike",
-    "conversion",
-    "rate"
-  ],
-  "attributeNames": {
-    "user" : "pio_user",
-    "item" : "pio_item",
-    "u2iActions": [
-      "view",
-      "like",
-      "dislike",
-      "conversion",
-      "rate"
-    ],
-    "itypes" : "pio_itypes",
-    "starttime" : "pio_starttime",
-    "endtime" : "pio_endtime",
-    "inactive" : "pio_inactive",
-    "rating" : "pio_rating"
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/templates/itemsim/params/preparatorJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/io/prediction/tools/templates/itemsim/params/preparatorJson.scala.txt
 
b/tools/src/main/twirl/io/prediction/tools/templates/itemsim/params/preparatorJson.scala.txt
deleted file mode 100644
index 0f55d6e..0000000
--- 
a/tools/src/main/twirl/io/prediction/tools/templates/itemsim/params/preparatorJson.scala.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-{
-  "actions": {
-    "view": 3,
-    "like": 5,
-    "dislike": 1,
-    "conversion": 4,
-    "rate": null
-  },
-  "conflict": "latest"
-}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/templates/itemsim/params/servingJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/io/prediction/tools/templates/itemsim/params/servingJson.scala.txt
 
b/tools/src/main/twirl/io/prediction/tools/templates/itemsim/params/servingJson.scala.txt
deleted file mode 100644
index 0967ef4..0000000
--- 
a/tools/src/main/twirl/io/prediction/tools/templates/itemsim/params/servingJson.scala.txt
+++ /dev/null
@@ -1 +0,0 @@
-{}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/templates/scala/buildSbt.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/io/prediction/tools/templates/scala/buildSbt.scala.txt 
b/tools/src/main/twirl/io/prediction/tools/templates/scala/buildSbt.scala.txt
deleted file mode 100644
index 9343010..0000000
--- 
a/tools/src/main/twirl/io/prediction/tools/templates/scala/buildSbt.scala.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-@(name: String, pioVersion: String, sparkVersion: String)
-import AssemblyKeys._
-
-assemblySettings
-
-name := "@{name}"
-
-organization := "myorg"
-
-version := "0.0.1-SNAPSHOT"
-
-libraryDependencies ++= Seq(
-  "io.prediction"    %% "core"          % "@{pioVersion}" % "provided",
-  "org.apache.spark" %% "spark-core"    % "@{sparkVersion}" % "provided")

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/templates/scala/engineJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/io/prediction/tools/templates/scala/engineJson.scala.txt 
b/tools/src/main/twirl/io/prediction/tools/templates/scala/engineJson.scala.txt
deleted file mode 100644
index c95e753..0000000
--- 
a/tools/src/main/twirl/io/prediction/tools/templates/scala/engineJson.scala.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-@(name: String, engineFactory: String)
-{
-  "id": "default",
-  "description": "@{name}",
-  "engineFactory": "@{engineFactory}",
-  "datasource": {
-    "multiplier": 2
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/templates/scala/manifestJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/io/prediction/tools/templates/scala/manifestJson.scala.txt
 
b/tools/src/main/twirl/io/prediction/tools/templates/scala/manifestJson.scala.txt
deleted file mode 100644
index 015d62b..0000000
--- 
a/tools/src/main/twirl/io/prediction/tools/templates/scala/manifestJson.scala.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-@(id: String, version: String, name: String)
-{
-  "id": "@{id}",
-  "version": "@{version}",
-  "name": "@{name}",
-  "description": "@{name}"
-  "engineFactory": "",
-  "files": []
-}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/templates/scala/project/assemblySbt.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/io/prediction/tools/templates/scala/project/assemblySbt.scala.txt
 
b/tools/src/main/twirl/io/prediction/tools/templates/scala/project/assemblySbt.scala.txt
deleted file mode 100644
index 54c3252..0000000
--- 
a/tools/src/main/twirl/io/prediction/tools/templates/scala/project/assemblySbt.scala.txt
+++ /dev/null
@@ -1 +0,0 @@
-addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.11.2")

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/io/prediction/tools/templates/scala/src/main/scala/engine.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/io/prediction/tools/templates/scala/src/main/scala/engine.scala.txt
 
b/tools/src/main/twirl/io/prediction/tools/templates/scala/src/main/scala/engine.scala.txt
deleted file mode 100644
index 2ee0f63..0000000
--- 
a/tools/src/main/twirl/io/prediction/tools/templates/scala/src/main/scala/engine.scala.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-package myorg
-
-// Pulls in necessary PredictionIO controller components
-import io.prediction.controller.EmptyActualResult
-import io.prediction.controller.EmptyEvaluationInfo
-import io.prediction.controller.IEngineFactory
-import io.prediction.controller.LAlgorithm
-import io.prediction.controller.LDataSource
-import io.prediction.controller.Params
-import io.prediction.controller.SimpleEngine
-
-// All data classes must be an instance of Serializable
-class MyTrainingData(
-  val multiplier: Int
-) extends Serializable
-
-class MyQuery(
-  val multiplicand: Int
-) extends Serializable
-
-class MyModel(
-  val multiplier: Int
-) extends Serializable {
-  override def toString = s"MyModel's multiplier: ${multiplier.toString}"
-}
-
-class MyPredictedResult(
-  val product: Int
-) extends Serializable
-
-case class MyDataSourceParams(
-  val multiplier: Int
-) extends Params
-
-// Your controller components
-class MyDataSource(val dsp: MyDataSourceParams) extends LDataSource[
-    MyTrainingData,
-    EmptyEvaluationInfo,
-    MyQuery,
-    EmptyActualResult] {
-
-  /** Implement readTraining() when you are not concerned about evaluation.
-    *
-    */
-  override def readTraining(): MyTrainingData = {
-    new MyTrainingData(dsp.multiplier)
-  }
-}
-
-class MyAlgorithm extends LAlgorithm[
-    MyTrainingData,
-    MyModel,
-    MyQuery,
-    MyPredictedResult] {
-
-  override def train(pd: MyTrainingData): MyModel = {
-    // Our model is simply one integer...
-    new MyModel(pd.multiplier)
-  }
-
-  override def predict(model: MyModel, query: MyQuery): MyPredictedResult = {
-    new MyPredictedResult(query.multiplicand * model.multiplier)
-  }
-}
-
-/** Engine factory that pieces everything together. SimpleEngine only requires
-  * one DataSource and one Algorithm. Preparator is an identity function, and
-  * Serving simply outputs Algorithm's prediction without further processing.
-  */
-object MyEngineFactory extends IEngineFactory {
-  override def apply() = {
-    new SimpleEngine(
-      classOf[MyDataSource],
-      classOf[MyAlgorithm])
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/console/accesskey.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/console/accesskey.scala.txt
 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/accesskey.scala.txt
new file mode 100644
index 0000000..651dbaf
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/accesskey.scala.txt
@@ -0,0 +1,20 @@
+Usage: pio accesskey new [--key] <app name> [<event1> <event2>...]
+
+Add allowed event(s) to an access key.
+
+  --key <value>
+      Specify a custom key.
+  <app name>
+      App to be associated with the new access key.
+  <event1> <event2>...
+      Allowed event name(s) to be added to the access key.
+
+Usage: pio accesskey list [<app name>]
+
+  <app name>
+      App name.
+
+Usage: pio accesskey delete <access key>
+
+  <access key>
+      The access key to be deleted.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/console/adminserver.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/console/adminserver.scala.txt
 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/adminserver.scala.txt
new file mode 100644
index 0000000..4ec0237
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/adminserver.scala.txt
@@ -0,0 +1,6 @@
+(Experimental Only!) Usage: pio adminserver [--ip <value>] [--port <value>]
+
+  --ip <value>
+      IP to bind to. Default: localhost
+  --port <value>
+      Port to bind to. Default: 7071

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/console/app.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/console/app.scala.txt 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/app.scala.txt
new file mode 100644
index 0000000..49f21b1
--- /dev/null
+++ b/tools/src/main/twirl/org/apache/predictionio/tools/console/app.scala.txt
@@ -0,0 +1,74 @@
+Usage: pio app new [--id <value>] [--description <value>] [--access-key 
<value>]
+                   <name>
+
+Create a new app key to app ID mapping.
+
+  --id <value>
+      Specify this if you already have data under an app ID.
+  --description <value>
+      Description of the new app.
+  --access-key <value>
+      Specify a custom default access key.
+  <name>
+      App name.
+
+
+Usage: pio app list
+
+List all apps.
+
+
+Usage: pio app show <name>
+
+Show details of an app.
+
+  <name>
+      App name.
+
+
+Usage: pio app delete <name> [--force]
+
+Name of the app to be deleted.
+
+  <name>
+      App name.
+  --force, -f
+      Delete data without prompting for confirmation
+
+
+Usage: pio app data-delete <name> [--channel <name>] [--all] [--force]
+
+Delete data of an app.
+
+  <name>
+      App name.
+  --channel <name>
+      Delete data of the specified channel (default channel if not specified)
+  --all
+      Delete all data of this app (including both default and all channels)
+  --force, -f
+      Delete data without prompting for confirmation
+
+
+Usage: pio app channel-new <name> <channel>
+
+Create a new channel for the app.
+
+  <name>
+      App name.
+
+  <channel>
+      Channel name to be created.
+
+
+Usage: pio app channel-delete <name> <channel> [--force]
+
+Delete a channel for the app.
+
+  <name>
+      App name.
+
+  <channel>
+      Channel name to be deleted.
+  --force, -f
+      Delete data without prompting for confirmation

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/console/build.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/console/build.scala.txt 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/build.scala.txt
new file mode 100644
index 0000000..be80c50
--- /dev/null
+++ b/tools/src/main/twirl/org/apache/predictionio/tools/console/build.scala.txt
@@ -0,0 +1,11 @@
+Usage: pio build [--sbt-extra <value>] [--clean] [--no-asm]
+                 [common options...]
+                 
+Build an engine at the current directory.
+
+  --sbt-extra <value>
+      Extra command to pass to SBT when it builds your engine.
+  --clean
+      Clean build.
+  --no-asm
+      Skip building external dependencies assembly.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/console/dashboard.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/console/dashboard.scala.txt
 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/dashboard.scala.txt
new file mode 100644
index 0000000..85eacda
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/dashboard.scala.txt
@@ -0,0 +1,6 @@
+Usage: pio dashboard [--ip <value>] [--port <value>]
+
+  --ip <value>
+      IP to bind to. Default: localhost
+  --port <value>
+      Port to bind to. Default: 9000

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/console/deploy.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/console/deploy.scala.txt 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/deploy.scala.txt
new file mode 100644
index 0000000..4ce7985
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/deploy.scala.txt
@@ -0,0 +1,29 @@
+Usage: pio deploy [--ip <value>] [--port <value>]
+                  [--engine-instance-id <value>]
+                  [--feedback] [--accesskey <value>]
+                  [--event-server-ip <value>] [--event-server-port <value>]
+                  [--batch <value>] [--scratch-uri <value>]
+
+Deploy an engine instance as a prediction server. This command will pass all
+pass-through arguments to its underlying spark-submit command.
+
+  --ip <value>
+      IP to bind to. Default: 0.0.0.0
+  --port <value>
+      Port to bind to. Default: 8000
+  --engine-instance-id <value>
+      Engine instance ID.
+  --feedback
+      Enable feedback loop to event server.
+  --accesskey <value>
+      Access key of the App where feedback data will be stored.
+  --event-server-ip <value>
+      Event server IP. Default: 0.0.0.0
+  --event-server-port <value>
+      Event server port. Default: 7070
+  --batch <value>
+      Batch label of the deployment.
+  --scratch-uri
+      URI of the working scratch space. Specify this when you want to have all
+      necessary files transferred to a remote location. You will usually want 
to
+      specify this when you use --deploy-mode cluster.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/console/eval.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/console/eval.scala.txt 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/eval.scala.txt
new file mode 100644
index 0000000..499498c
--- /dev/null
+++ b/tools/src/main/twirl/org/apache/predictionio/tools/console/eval.scala.txt
@@ -0,0 +1,10 @@
+Usage: pio eval <evaluation-class> <engine-parameters-generator-class>
+                [--batch <value>]
+                [common options...]
+
+Kick off an evaluation using specified evaluation and engine parameters
+generator class. This command will pass all pass-through arguments to its
+underlying spark-submit command.
+
+  --batch <value>
+      Batch label of the run.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/console/eventserver.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/console/eventserver.scala.txt
 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/eventserver.scala.txt
new file mode 100644
index 0000000..beda337
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/eventserver.scala.txt
@@ -0,0 +1,8 @@
+Usage: pio eventserver [--ip <value>] [--port <value>] [--stats]
+
+  --ip <value>
+      IP to bind to. Default: 0.0.0.0
+  --port <value>
+      Port to bind to. Default: 7070
+  --stats
+      Enable Event Server internal statistics and its API endpoint.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/console/export.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/console/export.scala.txt 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/export.scala.txt
new file mode 100644
index 0000000..28eb665
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/export.scala.txt
@@ -0,0 +1,14 @@
+Usage: pio export --appid <value> --output <value> [--format <value>] 
[--channel <value>]
+
+Exports all events of an app to a file. If Hadoop configuration is present, the
+file will be exported to HDFS instead of local filesystem.
+
+  --appid <value>
+      App ID of events to be exported.
+  --channel <value>
+      Channel Name (default if this is not specified)
+  --output <value>
+      Output path of the exported file.
+  --format <value>
+      The format of the exported file. Valid values are "json" and "parquet".
+      The default format is "json".

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/console/imprt.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/console/imprt.scala.txt 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/imprt.scala.txt
new file mode 100644
index 0000000..245d749
--- /dev/null
+++ b/tools/src/main/twirl/org/apache/predictionio/tools/console/imprt.scala.txt
@@ -0,0 +1,12 @@
+Usage: pio import --appid <value> --input <value> [--channel <value>]
+
+Imports all events from a file to an app. Each line of the file should be a 
JSON
+object that represent a single event. If Hadoop configuration is present, the
+file will be imported from HDFS instead of local filesystem.
+
+  --appid <value>
+      App ID of events to be imported.
+  --channel <value>
+      Channel Name (default if this is not specified)
+  --input <value>
+      Input path of the import file.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/console/main.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/console/main.scala.txt 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/main.scala.txt
new file mode 100644
index 0000000..a97ecb3
--- /dev/null
+++ b/tools/src/main/twirl/org/apache/predictionio/tools/console/main.scala.txt
@@ -0,0 +1,52 @@
+Usage: pio <command> [options] <args>...
+
+Options common to all commands:
+  [--pio-home <value>] [--spark-home <value>] [--sbt <value>]
+  [-ei <value>] [-ev <value>] [-v <value>] [-m <value>]
+  [-sk | --spark-kryo] [--verbose]
+  [<args>] [-- [<args passed to Spark>] [-- [<args passed to runner]]]
+
+  --sbt <value>
+      Full path of sbt. Default: sbt
+  -ei <value> | --engine-id <value>
+      Specify an engine ID. Usually used by distributed deployment.
+  -ev <value> | --engine-version <value>
+      Specify an engine version. Usually used by distributed deployment.
+  -v <value> | --variant <value>
+      Path to an engine variant JSON file. Default: engine.json
+  -m <value> | --manifest <value>
+      Path to an engine manifest JSON file. Default: manifest.json
+  -sk | --spark-kryo
+      Shorthand for setting the spark.serializer property to
+      org.apache.spark.serializer.KryoSerializer.
+  --verbose
+      Enable third-party informational messages.
+
+Note that it is possible to supply pass-through arguments at the en
+of the command by using a '--' separator, e.g.
+
+  pio train -v my-variant -- --master spark://mycluster:7077
+
+In the example above, the '--master' argument will be passed to the underlying
+spark-submit command. Please refer to the usage section for each command for
+more information.
+
+The most commonly used pio commands are:
+    status        Displays status information about PredictionIO
+    version       Displays the version of this command line console
+    template      Creates a new engine based on an engine template
+    build         Build an engine at the current directory
+    train         Kick off a training using an engine
+    deploy        Deploy an engine as an engine server
+    eventserver   Launch an Event Server
+    app           Manage apps that are used by the Event Server
+    accesskey     Manage app access keys
+    export        Export events from the Event Server
+
+The following are experimental development commands:
+    run           Launch a driver program
+    eval          Kick off an evaluation using an engine
+    dashboard     Launch an evaluation dashboard
+    adminserver   Launch an Admin Server
+
+See 'pio help <command>' to read about a specific subcommand.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/console/run.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/console/run.scala.txt 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/run.scala.txt
new file mode 100644
index 0000000..faef308
--- /dev/null
+++ b/tools/src/main/twirl/org/apache/predictionio/tools/console/run.scala.txt
@@ -0,0 +1,17 @@
+Usage: pio run [--sbt-extra <value>] [--clean] [--no-asm]
+               [common options...] <main class>
+
+Launch a driver program. This command will pass all pass-through arguments to
+its underlying spark-submit command. In addition, it also supports a second
+level of pass-through arguments to the driver program, e.g.
+
+  pio run -- --master spark://localhost:7077 -- --driver-arg foo
+
+  <main class>
+      Main class name of the driver program.
+  --sbt-extra <value>
+      Extra command to pass to SBT when it builds your engine.
+  --clean
+      Clean build.
+  --no-asm
+      Skip building external dependencies assembly.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/console/status.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/console/status.scala.txt 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/status.scala.txt
new file mode 100644
index 0000000..3ca4af5
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/status.scala.txt
@@ -0,0 +1,3 @@
+Usage: pio status
+
+Displays status information about the PredictionIO system.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/console/template.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/console/template.scala.txt 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/template.scala.txt
new file mode 100644
index 0000000..f97c8ce
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/template.scala.txt
@@ -0,0 +1,25 @@
+Usage: pio template list
+
+Retrieves a list of available template IDs.
+
+Usage: pio template get <template ID> <new engine directory>
+                        [--version <version>]
+                        [--name <value>] [--package <value>] [--email <value>]
+
+Seeds a directory with an engine template.
+
+  <template ID>
+      Engine template ID.
+  <new engine directory>
+      Location of the new engine.
+  --version <value>
+      The template version to get. By default, the most recently tagged version
+      will be downloaded.
+  --name <value>
+      Name of the author of the new engine.
+  --package <value>
+      Scala package name of the new engine.
+  --email <value>
+      E-mail address of the author of the new engine. Specify this if you want
+      to receive updates (critical bug fixes, etc) about the engine template
+      that you are going to use.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/console/train.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/console/train.scala.txt 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/train.scala.txt
new file mode 100644
index 0000000..582e54e
--- /dev/null
+++ b/tools/src/main/twirl/org/apache/predictionio/tools/console/train.scala.txt
@@ -0,0 +1,28 @@
+Usage: pio train [--batch <value>] [--skip-sanity-check]
+                 [--stop-after-read] [--stop-after-prepare]
+                 [--engine-factory <value>] [--engine-params-key <value>]
+                 [--scratch-uri <value>]
+                 [common options...]
+
+Kick off a training using an engine (variant) to produce an engine instance.
+This command will pass all pass-through arguments to its underlying 
spark-submit
+command.
+
+  --batch <value>
+      Batch label of the run.
+  --skip-sanity-check
+      Disable all data sanity check. Useful for speeding up training in
+      production.
+  --stop-after-read
+      Stop the training process after DataSource.read(). Useful for debugging.
+  --stop-after-prepare
+      Stop the training process after Preparator.prepare(). Useful for
+      debugging.
+  --engine-factory
+      Override engine factory class.
+  --engine-params-key
+      Retrieve engine parameters programmatically from the engine factory 
class.
+  --scratch-uri
+      URI of the working scratch space. Specify this when you want to have all
+      necessary files transferred to a remote location. You will usually want 
to
+      specify this when you use --deploy-mode cluster.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/console/upgrade.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/console/upgrade.scala.txt 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/upgrade.scala.txt
new file mode 100644
index 0000000..48ea23e
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/upgrade.scala.txt
@@ -0,0 +1,15 @@
+Usage: pio upgrade <from version> <to version> <old App ID> <new app ID>
+
+Migrate the event data from old App ID to new App ID which can be used with 
<to version> of PredictionIO.
+
+  <from version>
+    The version upgraded from.
+
+  <to version>
+    The version upgraded to.
+
+  <old App ID>
+    Old App ID.
+
+  <new app ID>
+    Mew App ID.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/console/version.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/console/version.scala.txt 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/version.scala.txt
new file mode 100644
index 0000000..f9b2ab9
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/console/version.scala.txt
@@ -0,0 +1,3 @@
+Usage: pio version
+
+Displays the version of this command line console.

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/dashboard/index.scala.html
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/dashboard/index.scala.html 
b/tools/src/main/twirl/org/apache/predictionio/tools/dashboard/index.scala.html
new file mode 100644
index 0000000..2e1719c
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/dashboard/index.scala.html
@@ -0,0 +1,99 @@
+@import org.apache.predictionio.data.storage.EvaluationInstance
+@import org.apache.predictionio.tools.dashboard.DashboardConfig
+@import org.joda.time.DateTime
+@import org.joda.time.format.DateTimeFormat
+@(dc: DashboardConfig,
+  dashboardStartTime: DateTime,
+  env: Map[String, String],
+  completedInstances: Seq[EvaluationInstance])
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <title>PredictionIO Dashboard at @{dc.ip}:@{dc.port}</title>
+    <link href="/assets/favicon.png" rel="shortcut icon" />
+    <link href="/assets/bootstrap-3.2.0-dist/css/bootstrap.min.css" 
rel="stylesheet">
+    <style type="text/css">
+    .string { color: green; }
+    .number { color: darkorange; }
+    .boolean { color: blue; }
+    .null { color: magenta; }
+    .key { color: red; }
+    </style>
+    <script type="text/javascript">
+      function syntaxHighlight(json) {
+        if (typeof json != 'string') {
+          json = JSON.stringify(json, undefined, 2);
+        }
+        json = json.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, 
'&gt;');
+        return 
json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,
 function (match) {
+          var cls = 'number';
+          if (/^"/.test(match)) {
+            if (/:$/.test(match)) {
+              cls = 'key';
+            } else {
+              cls = 'string';
+            }
+          } else if (/true|false/.test(match)) {
+            cls = 'boolean';
+          } else if (/null/.test(match)) {
+            cls = 'null';
+          }
+          return '<span class="' + cls + '">' + match + '</span>';
+        });
+      }
+      function shorternClassName(className) {
+        return className.replace(/(\w)\w*\./g, "$1."); 
+      }
+    </script>
+  </head>
+  <body>
+    <div class="container-fluid">
+      <div class="page-header">
+        <h1>PredictionIO Dashboard at @{dc.ip}:@{dc.port}</h1>
+        <p class="lead">Started on: 
@{DateTimeFormat.forStyle("FF").print(dashboardStartTime)}</p>
+      </div>
+      <h2>Completed Evaluations</h2>
+      <table class="table table-bordered table-striped">
+        <tr>
+          <th></th>
+          <th>Evaluator Result (One-liner)</th>
+          <th>Evaluation Class</th>
+          <th>Engine Parameters Generator Class</th>
+          <th>Start Time</th>
+          <th>End Time</th>
+          <th>Batch</th>
+        </tr>
+        @for(i <- completedInstances) {
+        <tr>
+          <td>
+            <div>
+              <a href="/engine_instances/@{i.id}/evaluator_results.html" 
class="btn btn-primary">HTML</a>
+            </div>
+          </td>
+          <td>
+            <div>@{i.evaluatorResults}</div>
+          </td>
+          <td>
+            <span title="@{i.evaluationClass}"><script 
type="text/javascript">document.write(shorternClassName("@{i.evaluationClass}"));</script></span>
+          </td>
+          <td>
+            <span title="@{i.engineParamsGeneratorClass}"><script 
type="text/javascript">document.write(shorternClassName("@{i.engineParamsGeneratorClass}"));</script></span>
+          </td>
+          <td>@{DateTimeFormat.forStyle("MM").print(i.startTime)}</td>
+          <td>@{DateTimeFormat.forStyle("MM").print(i.endTime)}</td>
+          <td>@{i.batch}</td>
+        </tr>
+        }
+      </table>
+      <h2>Environment</h2>
+      <p>The following values are accurate up to the time when the dashboard 
was launched.</p>
+      <table class="table table-bordered table-striped">
+        @for(k <- env.keys.toSeq.sorted) {
+        <tr><th>@{k}</th><td>@{env(k)}</td></tr>
+        }
+      </table>
+    </div>
+    <script src="/assets/jquery-1.11.1.min.js"></script>
+    <script src="/assets/bootstrap-3.2.0-dist/js/bootstrap.min.js"></script>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrank/params/algorithmsJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrank/params/algorithmsJson.scala.txt
 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrank/params/algorithmsJson.scala.txt
new file mode 100644
index 0000000..02abbe5
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrank/params/algorithmsJson.scala.txt
@@ -0,0 +1,16 @@
+[
+  {
+    "name": "mahoutItemBased",
+    "params": {
+      "booleanData": true,
+      "itemSimilarity": "LogLikelihoodSimilarity",
+      "weighted": false,
+      "nearestN": 10,
+      "threshold": 4.9E-324,
+      "numSimilarItems": 50,
+      "numUserActions": 50,
+      "freshness" : 0,
+      "freshnessTimeUnit" : 86400
+    }
+  }
+]

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrank/params/datasourceJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrank/params/datasourceJson.scala.txt
 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrank/params/datasourceJson.scala.txt
new file mode 100644
index 0000000..7d219d3
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrank/params/datasourceJson.scala.txt
@@ -0,0 +1,26 @@
+{
+  "appId": 1,
+  "actions": [
+    "view",
+    "like",
+    "dislike",
+    "conversion",
+    "rate"
+  ],
+  "attributeNames": {
+    "user" : "pio_user",
+    "item" : "pio_item",
+    "u2iActions": [
+      "view",
+      "like",
+      "dislike",
+      "conversion",
+      "rate"
+    ],
+    "itypes" : "pio_itypes",
+    "starttime" : "pio_starttime",
+    "endtime" : "pio_endtime",
+    "inactive" : "pio_inactive",
+    "rating" : "pio_rating"
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrank/params/preparatorJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrank/params/preparatorJson.scala.txt
 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrank/params/preparatorJson.scala.txt
new file mode 100644
index 0000000..0f55d6e
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrank/params/preparatorJson.scala.txt
@@ -0,0 +1,10 @@
+{
+  "actions": {
+    "view": 3,
+    "like": 5,
+    "dislike": 1,
+    "conversion": 4,
+    "rate": null
+  },
+  "conflict": "latest"
+}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrank/params/servingJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrank/params/servingJson.scala.txt
 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrank/params/servingJson.scala.txt
new file mode 100644
index 0000000..0967ef4
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrank/params/servingJson.scala.txt
@@ -0,0 +1 @@
+{}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrec/params/algorithmsJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrec/params/algorithmsJson.scala.txt
 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrec/params/algorithmsJson.scala.txt
new file mode 100644
index 0000000..2c58916
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrec/params/algorithmsJson.scala.txt
@@ -0,0 +1,15 @@
+[
+  {
+    "name": "ncMahoutItemBased",
+    "params": {
+      "booleanData": true,
+      "itemSimilarity": "LogLikelihoodSimilarity",
+      "weighted": false,
+      "threshold": 4.9E-324,
+      "nearestN": 10,
+      "unseenOnly": false,
+      "freshness" : 0,
+      "freshnessTimeUnit" : 86400
+    }
+  }
+]

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrec/params/datasourceJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrec/params/datasourceJson.scala.txt
 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrec/params/datasourceJson.scala.txt
new file mode 100644
index 0000000..8d4d010
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrec/params/datasourceJson.scala.txt
@@ -0,0 +1,26 @@
+{
+  "appId": 2,
+  "actions": [
+    "view",
+    "like",
+    "dislike",
+    "conversion",
+    "rate"
+  ],
+  "attributeNames": {
+    "user" : "pio_user",
+    "item" : "pio_item",
+    "u2iActions": [
+      "view",
+      "like",
+      "dislike",
+      "conversion",
+      "rate"
+    ],
+    "itypes" : "pio_itypes",
+    "starttime" : "pio_starttime",
+    "endtime" : "pio_endtime",
+    "inactive" : "pio_inactive",
+    "rating" : "pio_rating"
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrec/params/preparatorJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrec/params/preparatorJson.scala.txt
 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrec/params/preparatorJson.scala.txt
new file mode 100644
index 0000000..0f55d6e
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrec/params/preparatorJson.scala.txt
@@ -0,0 +1,10 @@
+{
+  "actions": {
+    "view": 3,
+    "like": 5,
+    "dislike": 1,
+    "conversion": 4,
+    "rate": null
+  },
+  "conflict": "latest"
+}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrec/params/servingJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrec/params/servingJson.scala.txt
 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrec/params/servingJson.scala.txt
new file mode 100644
index 0000000..0967ef4
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemrec/params/servingJson.scala.txt
@@ -0,0 +1 @@
+{}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemsim/params/algorithmsJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemsim/params/algorithmsJson.scala.txt
 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemsim/params/algorithmsJson.scala.txt
new file mode 100644
index 0000000..fb8e9ac
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemsim/params/algorithmsJson.scala.txt
@@ -0,0 +1,13 @@
+[
+  {
+    "name": "ncMahoutItemBased",
+    "params": {
+      "booleanData": true,
+      "itemSimilarity": "LogLikelihoodSimilarity",
+      "weighted": false,
+      "threshold": 4.9E-324,
+      "freshness" : 0,
+      "freshnessTimeUnit" : 86400
+    }
+  }
+]

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemsim/params/datasourceJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemsim/params/datasourceJson.scala.txt
 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemsim/params/datasourceJson.scala.txt
new file mode 100644
index 0000000..8d4d010
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemsim/params/datasourceJson.scala.txt
@@ -0,0 +1,26 @@
+{
+  "appId": 2,
+  "actions": [
+    "view",
+    "like",
+    "dislike",
+    "conversion",
+    "rate"
+  ],
+  "attributeNames": {
+    "user" : "pio_user",
+    "item" : "pio_item",
+    "u2iActions": [
+      "view",
+      "like",
+      "dislike",
+      "conversion",
+      "rate"
+    ],
+    "itypes" : "pio_itypes",
+    "starttime" : "pio_starttime",
+    "endtime" : "pio_endtime",
+    "inactive" : "pio_inactive",
+    "rating" : "pio_rating"
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemsim/params/preparatorJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemsim/params/preparatorJson.scala.txt
 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemsim/params/preparatorJson.scala.txt
new file mode 100644
index 0000000..0f55d6e
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemsim/params/preparatorJson.scala.txt
@@ -0,0 +1,10 @@
+{
+  "actions": {
+    "view": 3,
+    "like": 5,
+    "dislike": 1,
+    "conversion": 4,
+    "rate": null
+  },
+  "conflict": "latest"
+}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemsim/params/servingJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemsim/params/servingJson.scala.txt
 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemsim/params/servingJson.scala.txt
new file mode 100644
index 0000000..0967ef4
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/itemsim/params/servingJson.scala.txt
@@ -0,0 +1 @@
+{}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/templates/scala/buildSbt.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/templates/scala/buildSbt.scala.txt
 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/scala/buildSbt.scala.txt
new file mode 100644
index 0000000..9343010
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/scala/buildSbt.scala.txt
@@ -0,0 +1,14 @@
+@(name: String, pioVersion: String, sparkVersion: String)
+import AssemblyKeys._
+
+assemblySettings
+
+name := "@{name}"
+
+organization := "myorg"
+
+version := "0.0.1-SNAPSHOT"
+
+libraryDependencies ++= Seq(
+  "io.prediction"    %% "core"          % "@{pioVersion}" % "provided",
+  "org.apache.spark" %% "spark-core"    % "@{sparkVersion}" % "provided")

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/templates/scala/engineJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/templates/scala/engineJson.scala.txt
 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/scala/engineJson.scala.txt
new file mode 100644
index 0000000..c95e753
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/scala/engineJson.scala.txt
@@ -0,0 +1,9 @@
+@(name: String, engineFactory: String)
+{
+  "id": "default",
+  "description": "@{name}",
+  "engineFactory": "@{engineFactory}",
+  "datasource": {
+    "multiplier": 2
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/templates/scala/manifestJson.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/templates/scala/manifestJson.scala.txt
 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/scala/manifestJson.scala.txt
new file mode 100644
index 0000000..015d62b
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/scala/manifestJson.scala.txt
@@ -0,0 +1,9 @@
+@(id: String, version: String, name: String)
+{
+  "id": "@{id}",
+  "version": "@{version}",
+  "name": "@{name}",
+  "description": "@{name}"
+  "engineFactory": "",
+  "files": []
+}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/templates/scala/project/assemblySbt.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/templates/scala/project/assemblySbt.scala.txt
 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/scala/project/assemblySbt.scala.txt
new file mode 100644
index 0000000..54c3252
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/scala/project/assemblySbt.scala.txt
@@ -0,0 +1 @@
+addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.11.2")

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/main/twirl/org/apache/predictionio/tools/templates/scala/src/main/scala/engine.scala.txt
----------------------------------------------------------------------
diff --git 
a/tools/src/main/twirl/org/apache/predictionio/tools/templates/scala/src/main/scala/engine.scala.txt
 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/scala/src/main/scala/engine.scala.txt
new file mode 100644
index 0000000..37dcf3e
--- /dev/null
+++ 
b/tools/src/main/twirl/org/apache/predictionio/tools/templates/scala/src/main/scala/engine.scala.txt
@@ -0,0 +1,76 @@
+package myorg
+
+// Pulls in necessary PredictionIO controller components
+import org.apache.predictionio.controller.EmptyActualResult
+import org.apache.predictionio.controller.EmptyEvaluationInfo
+import org.apache.predictionio.controller.IEngineFactory
+import org.apache.predictionio.controller.LAlgorithm
+import org.apache.predictionio.controller.LDataSource
+import org.apache.predictionio.controller.Params
+import org.apache.predictionio.controller.SimpleEngine
+
+// All data classes must be an instance of Serializable
+class MyTrainingData(
+  val multiplier: Int
+) extends Serializable
+
+class MyQuery(
+  val multiplicand: Int
+) extends Serializable
+
+class MyModel(
+  val multiplier: Int
+) extends Serializable {
+  override def toString = s"MyModel's multiplier: ${multiplier.toString}"
+}
+
+class MyPredictedResult(
+  val product: Int
+) extends Serializable
+
+case class MyDataSourceParams(
+  val multiplier: Int
+) extends Params
+
+// Your controller components
+class MyDataSource(val dsp: MyDataSourceParams) extends LDataSource[
+    MyTrainingData,
+    EmptyEvaluationInfo,
+    MyQuery,
+    EmptyActualResult] {
+
+  /** Implement readTraining() when you are not concerned about evaluation.
+    *
+    */
+  override def readTraining(): MyTrainingData = {
+    new MyTrainingData(dsp.multiplier)
+  }
+}
+
+class MyAlgorithm extends LAlgorithm[
+    MyTrainingData,
+    MyModel,
+    MyQuery,
+    MyPredictedResult] {
+
+  override def train(pd: MyTrainingData): MyModel = {
+    // Our model is simply one integer...
+    new MyModel(pd.multiplier)
+  }
+
+  override def predict(model: MyModel, query: MyQuery): MyPredictedResult = {
+    new MyPredictedResult(query.multiplicand * model.multiplier)
+  }
+}
+
+/** Engine factory that pieces everything together. SimpleEngine only requires
+  * one DataSource and one Algorithm. Preparator is an identity function, and
+  * Serving simply outputs Algorithm's prediction without further processing.
+  */
+object MyEngineFactory extends IEngineFactory {
+  override def apply() = {
+    new SimpleEngine(
+      classOf[MyDataSource],
+      classOf[MyAlgorithm])
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/test/scala/io/prediction/tools/admin/AdminAPISpec.scala
----------------------------------------------------------------------
diff --git a/tools/src/test/scala/io/prediction/tools/admin/AdminAPISpec.scala 
b/tools/src/test/scala/io/prediction/tools/admin/AdminAPISpec.scala
deleted file mode 100644
index 93af23f..0000000
--- a/tools/src/test/scala/io/prediction/tools/admin/AdminAPISpec.scala
+++ /dev/null
@@ -1,66 +0,0 @@
-package io.prediction.tools.admin
-
-import akka.actor.{ActorSystem, Props}
-import akka.testkit.TestProbe
-import io.prediction.data.storage.Storage
-import org.specs2.mutable.Specification
-import spray.http._
-import spray.httpx.RequestBuilding._
-import spray.util._
-
-
-class AdminAPISpec extends Specification{
-
-  val system = ActorSystem(Utils.actorSystemNameFrom(getClass))
-  val config = AdminServerConfig(
-    ip = "localhost",
-    port = 7071)
-
-  val commandClient = new CommandClient(
-    appClient = Storage.getMetaDataApps,
-    accessKeyClient = Storage.getMetaDataAccessKeys,
-    eventClient = Storage.getLEvents()
-  )
-
-  val adminActor= system.actorOf(Props(classOf[AdminServiceActor], 
commandClient))
-
-  "GET / request" should {
-    "properly produce OK HttpResponses" in {
-      val probe = TestProbe()(system)
-      probe.send(adminActor, Get("/"))
-
-      probe.expectMsg(
-        HttpResponse(
-          200,
-          HttpEntity(
-            contentType = ContentTypes.`application/json`,
-            string = """{"status":"alive"}"""
-          )
-        )
-      )
-      success
-    }
-  }
-
-  "GET /cmd/app request" should {
-    "properly produce OK HttpResponses" in {
-      /*
-      val probe = TestProbe()(system)
-      probe.send(adminActor,Get("/cmd/app"))
-
-      //TODO: Need to convert the response string to the corresponding case 
object to assert some properties on the object
-      probe.expectMsg(
-        HttpResponse(
-          200,
-          HttpEntity(
-            contentType = ContentTypes.`application/json`,
-            string = """{"status":1}"""
-          )
-        )
-      )*/
-      pending
-    }
-  }
-
-  step(system.shutdown())
-}

http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/4f03388e/tools/src/test/scala/org/apache/predictionio/tools/admin/AdminAPISpec.scala
----------------------------------------------------------------------
diff --git 
a/tools/src/test/scala/org/apache/predictionio/tools/admin/AdminAPISpec.scala 
b/tools/src/test/scala/org/apache/predictionio/tools/admin/AdminAPISpec.scala
new file mode 100644
index 0000000..604e593
--- /dev/null
+++ 
b/tools/src/test/scala/org/apache/predictionio/tools/admin/AdminAPISpec.scala
@@ -0,0 +1,66 @@
+package org.apache.predictionio.tools.admin
+
+import akka.actor.{ActorSystem, Props}
+import akka.testkit.TestProbe
+import org.apache.predictionio.data.storage.Storage
+import org.specs2.mutable.Specification
+import spray.http._
+import spray.httpx.RequestBuilding._
+import spray.util._
+
+
+class AdminAPISpec extends Specification{
+
+  val system = ActorSystem(Utils.actorSystemNameFrom(getClass))
+  val config = AdminServerConfig(
+    ip = "localhost",
+    port = 7071)
+
+  val commandClient = new CommandClient(
+    appClient = Storage.getMetaDataApps,
+    accessKeyClient = Storage.getMetaDataAccessKeys,
+    eventClient = Storage.getLEvents()
+  )
+
+  val adminActor= system.actorOf(Props(classOf[AdminServiceActor], 
commandClient))
+
+  "GET / request" should {
+    "properly produce OK HttpResponses" in {
+      val probe = TestProbe()(system)
+      probe.send(adminActor, Get("/"))
+
+      probe.expectMsg(
+        HttpResponse(
+          200,
+          HttpEntity(
+            contentType = ContentTypes.`application/json`,
+            string = """{"status":"alive"}"""
+          )
+        )
+      )
+      success
+    }
+  }
+
+  "GET /cmd/app request" should {
+    "properly produce OK HttpResponses" in {
+      /*
+      val probe = TestProbe()(system)
+      probe.send(adminActor,Get("/cmd/app"))
+
+      //TODO: Need to convert the response string to the corresponding case 
object to assert some properties on the object
+      probe.expectMsg(
+        HttpResponse(
+          200,
+          HttpEntity(
+            contentType = ContentTypes.`application/json`,
+            string = """{"status":1}"""
+          )
+        )
+      )*/
+      pending
+    }
+  }
+
+  step(system.shutdown())
+}

Reply via email to