modify README
Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/cf336609 Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/cf336609 Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/cf336609 Branch: refs/heads/master Commit: cf336609bc454c3d0292293dc1929d2ca61379e6 Parents: c97986f Author: Chul Kang <[email protected]> Authored: Wed Apr 11 17:22:28 2018 +0900 Committer: Chul Kang <[email protected]> Committed: Wed Apr 11 17:22:28 2018 +0900 ---------------------------------------------------------------------- s2jobs/README.md | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/cf336609/s2jobs/README.md ---------------------------------------------------------------------- diff --git a/s2jobs/README.md b/s2jobs/README.md index f79abb7..2315e82 100644 --- a/s2jobs/README.md +++ b/s2jobs/README.md @@ -335,6 +335,21 @@ The very basic pipeline can be illustrated in the following figure. ``` +## 3. movielens (File to S2Graph) + +You can also run an example job that parses movielens data and writes to S2graph. +The dataset includes user rating and tagging activity from MovieLens(https://movielens.org/), a movie recommendation service. + +``` +// move to example folder +$ cd ../example + +// run example job +$ ./run.sh movielens +``` + +It demonstrate how to build a graph-based data using the publicly available MovieLens dataset on graph database S2Graph, +and provides an environment that makes it easy to use various queries using GraphQL. ---------- @@ -347,13 +362,20 @@ When submitting spark job with assembly jar, use these parameters with the job d ``` // main class : org.apache.s2graph.s2jobs.JobLauncher Usage: run [file|db] [options] - -n, --name <value> job display name -Command: file [options] -get config from file - -f, --confFile <file> configuration file -Command: db [options] -get config from db - -i, --jobId <jobId> configuration file + -n, --name <value> job display name +Command: file [options] get config from file + -f, --confFile <file> configuration file +Command: db [options] get config from db + -i, --jobId <jobId> configuration file +``` + +For example, you can run your application using spark-submit as shown below. +``` +$ sbt 'project s2jobs' assembly +$ ${SPARK_HOME}/bin/spark-submit \ + --class org.apache.s2graph.s2jobs.JobLauncher \ + --master local[2] \ + s2jobs/target/scala-2.11/s2jobs-assembly-0.2.1-SNAPSHOT.jar file -f JOB_DESC.json -n JOB_NAME ```
