Repository: incubator-gobblin
Updated Branches:
  refs/heads/master 574d3e471 -> 381316ad9


add documentation for launching gobblin in oozie MR mode


Project: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/commit/a4eddfba
Tree: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/tree/a4eddfba
Diff: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/diff/a4eddfba

Branch: refs/heads/master
Commit: a4eddfbaaea6d7b22eeb290b113f33eeec802da1
Parents: 542757a
Author: Clemens Valiente <[email protected]>
Authored: Wed Jul 19 16:48:15 2017 +0200
Committer: Clemens Valiente <[email protected]>
Committed: Wed Jul 19 16:48:15 2017 +0200

----------------------------------------------------------------------
 gobblin-docs/user-guide/Gobblin-Schedulers.md   | 16 ++++-
 ...obblin-oozie-mr-example-sysconfig.properties | 62 ++++++++++++++++++++
 ...gobblin-oozie-mr-example-workflow.properties | 29 +++++++++
 .../gobblin-oozie-mr-example-workflow.xml       | 43 ++++++++++++++
 4 files changed, 148 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/a4eddfba/gobblin-docs/user-guide/Gobblin-Schedulers.md
----------------------------------------------------------------------
diff --git a/gobblin-docs/user-guide/Gobblin-Schedulers.md 
b/gobblin-docs/user-guide/Gobblin-Schedulers.md
index 5cfd8f5..b0c1022 100644
--- a/gobblin-docs/user-guide/Gobblin-Schedulers.md
+++ b/gobblin-docs/user-guide/Gobblin-Schedulers.md
@@ -38,7 +38,7 @@ This guide focuses on getting Gobblin to run in as a stand 
alone Java Process. T
 
 #### Example Config Files
 
-[`gobblin-oozie/src/main/resources/`](https://github.com/linkedin/gobblin/tree/master/gobblin-oozie/src/main/resources/)
 contains sample configuration files for launching Gobblin Oozie. There are a 
number of important files in this directory:
+[`gobblin-oozie/src/main/resources/local`](https://github.com/linkedin/gobblin/tree/master/gobblin-oozie/src/main/resources/local)
 contains sample configuration files for launching Gobblin Oozie. There are a 
number of important files in this directory:
 
 `gobblin-oozie-example-system.properties` contains default system level 
properties for Gobblin. When launched with Oozie, Gobblin will run inside a map 
task; it is thus recommended to configure Gobblin to write directly to HDFS 
rather than the local file system. The property `fs.uri` in this file should be 
changed to point to the NameNode of the Hadoop File System the job should write 
to. By default, all data is written under a folder called `gobblin-out`; to 
change this modify the `gobblin.work.dir` parameter in this file.
 
@@ -60,7 +60,19 @@ Gobblin has a number of `jar` dependencies that need to be 
used when launching a
 
 Assuming one has the [Oozie 
CLI](https://oozie.apache.org/docs/3.1.3-incubating/DG_CommandLineTool.html) 
installed, the job can be launched using the following command: `oozie job 
-config gobblin-oozie-example-workflow.properties -run`.
 
-#### Debugging Tips
+### Launching Gobblin in MapReduce Mode
+
+Launching Gobblin in mapreduce Mode works quite similar to the local mode. In 
this mode, the oozie launcher action will spawn a second mapreduce process 
where gobblin will process its tasks in distributed mode across the cluster. 
Since each of the Mappers needs access to the gobblin libraries, we need to 
provide the jars via the `job.hdfs.jars` variable
+
+#### Example Config Files
+
+[`gobblin-oozie/src/main/resources/mapreduce`](https://github.com/linkedin/gobblin/tree/master/gobblin-oozie/src/main/resources/mapreduce)
 contains sample configuration files for launching Gobblin Oozie in Mapreduce 
mode. The main difference to launching Gobblin Oozie in Local mode are a view 
extra MapReduce related configuration variables in the sysconfig.properties 
file and launching CliMRJobLauncher instead CliLocalJobLauncher.
+
+#### Further steps
+
+Everything else should be working the same way as in Local mode (see above)
+
+### Debugging Tips
 
 Once the job has been launched, its status can be queried via the following 
command: `oozie job -info <oozie-job-id>` and the logs can be shown via the 
following command `oozie job -log <oozie-job-id>`.
 

http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/a4eddfba/gobblin-oozie/src/test/resources/mapreduce/gobblin-oozie-mr-example-sysconfig.properties
----------------------------------------------------------------------
diff --git 
a/gobblin-oozie/src/test/resources/mapreduce/gobblin-oozie-mr-example-sysconfig.properties
 
b/gobblin-oozie/src/test/resources/mapreduce/gobblin-oozie-mr-example-sysconfig.properties
new file mode 100644
index 0000000..a83e878
--- /dev/null
+++ 
b/gobblin-oozie/src/test/resources/mapreduce/gobblin-oozie-mr-example-sysconfig.properties
@@ -0,0 +1,62 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# An example system.properties file for Gobblin, useful for when launching 
Gobblin on Oozie
+
+# Gobblin work dir
+gobblin.work.dir=gobblin-out
+
+# Thread pool settings for the task executor
+taskexecutor.threadpool.size=2
+taskretry.threadpool.coresize=1
+taskretry.threadpool.maxsize=2
+
+# File system URIs
+fs.uri=hdfs:///
+writer.fs.uri=${fs.uri}
+state.store.fs.uri=${fs.uri}
+
+# Writer related configuration properties
+writer.destination.type=HDFS
+writer.output.format=AVRO
+writer.staging.dir=${gobblin.work.dir}/task-staging
+writer.output.dir=${gobblin.work.dir}/task-output
+
+# Data publisher related configuration properties
+data.publisher.type=gobblin.publisher.BaseDataPublisher
+data.publisher.final.dir=${gobblin.work.dir}/job-output
+data.publisher.replace.final.dir=false
+
+# Directory where job/task state files are stored
+state.store.dir=${gobblin.work.dir}/state-store
+
+# Directory where error files from the quality checkers are stored
+qualitychecker.row.err.file=${gobblin.work.dir}/err
+
+# Directory where job locks are stored
+job.lock.enabled=false
+
+# Directory where metrics log files are stored
+metrics.log.dir=${gobblin.work.dir}/metrics
+
+# Interval of task state reporting in milliseconds
+task.status.reportintervalinms=5000
+
+# MapReduce properties
+mr.job.root.dir = ${gobblin.work.dir}
+# hdfs path containing the gobblin classes
+job.hdfs.jars = /path/to/gobblin-libs
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/a4eddfba/gobblin-oozie/src/test/resources/mapreduce/gobblin-oozie-mr-example-workflow.properties
----------------------------------------------------------------------
diff --git 
a/gobblin-oozie/src/test/resources/mapreduce/gobblin-oozie-mr-example-workflow.properties
 
b/gobblin-oozie/src/test/resources/mapreduce/gobblin-oozie-mr-example-workflow.properties
new file mode 100644
index 0000000..c790b5b
--- /dev/null
+++ 
b/gobblin-oozie/src/test/resources/mapreduce/gobblin-oozie-mr-example-workflow.properties
@@ -0,0 +1,29 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# An example job.properties file for launching Gobblin jobs via Oozie
+
+# Set the Name Node URI e.g. hdfs://sandbox.hortonworks.com:8020
+name.node=hdfs://localhost:62705
+
+# Set the Resource Manager URI e.g. sandbox.hortonworks.com:8050
+resource.manager=localhost:54580
+
+nameNode=${name.node}
+jobTracker=${resource.manager}
+
+oozie.wf.application.path=${name.node}/path/to/oozie/workflows

http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/a4eddfba/gobblin-oozie/src/test/resources/mapreduce/gobblin-oozie-mr-example-workflow.xml
----------------------------------------------------------------------
diff --git 
a/gobblin-oozie/src/test/resources/mapreduce/gobblin-oozie-mr-example-workflow.xml
 
b/gobblin-oozie/src/test/resources/mapreduce/gobblin-oozie-mr-example-workflow.xml
new file mode 100644
index 0000000..83d4ca2
--- /dev/null
+++ 
b/gobblin-oozie/src/test/resources/mapreduce/gobblin-oozie-mr-example-workflow.xml
@@ -0,0 +1,43 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<workflow-app name="gobblin-oozie-mr-example-workflow" 
xmlns="uri:oozie:workflow:0.1">
+       <start to="gobblin-mr-job"/>
+       <action name="gobblin-mr-job">
+               <java>
+                       <job-tracker>${jobTracker}</job-tracker>
+                       <name-node>${nameNode}</name-node>
+                       <configuration>
+                               <property>
+                                       
<name>oozie.launcher.mapreduce.user.classpath.first</name>
+                                       <value>true</value>
+                               </property>
+                       </configuration>
+                       
<main-class>gobblin.runtime.local.CliMRJobLauncher</main-class>
+                       <arg>--jobconfig</arg>
+                       <arg>${nameNode}/path/to/jobconfig.properties</arg>
+                       <arg>--sysconfig</arg>
+                       <arg>${nameNode}/path/to/sysconfig.properties</arg>
+               </java>
+               <ok to="end"/>
+               <error to="fail"/>
+       </action>
+       <kill name="fail">
+               <message>Error Message: 
${wf:errorMessage(wf:lastErrorNode())}</message>
+       </kill>
+       <end name="end"/>
+</workflow-app>

Reply via email to