-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
659a889
commit 5e84902
Showing
2 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name-node=hdfs://10.128.0.4:8020 | ||
jobTracker=10.128.0.4:8050 | ||
pigOutputPath=/tmp/openflight/oozieoutput/highAltitude/ | ||
pigScript=/openflight/features/high_altitude.pig | ||
airportsLocation=/tmp/openflight/airports.dat | ||
airlinesLocation=/tmp/openflight/airlines.dat | ||
routesLocation=/tmp/openflight/routes.dat | ||
planesLocation=/tmp/openflight/planes.dat | ||
outputLocation=/tmp/openflight/output/mostConnectedAirports/ | ||
n=10 | ||
sqlScript=/openflight/SQLscripts/highAltitudesSQL.sh | ||
TableName=highAltitudes | ||
exportDir=/tmp/openflight/oozieoutput/highAltitude/part-r-00000 | ||
oozie.wf.application.path=${name-node}/tmp/deploy/ooziescripts/ooziescripts | ||
oozie.use.system.libpath=true | ||
oozie.libpath=/tmp/shared/jars | ||
oozie.action.sharelib.for.sqoop=sqoop,hcatalog,hive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<workflow-app name="OpenAnalysisWorkflow" xmlns="uri:oozie:workflow:0.4"> | ||
<start to="PigAction"/> | ||
<action name="PigAction"> | ||
<pig> | ||
<job-tracker>${jobTracker}</job-tracker> | ||
<name-node>${name-node}</name-node> | ||
<prepare> | ||
<delete path="${pigOutputPath}"> | ||
</prepare> | ||
|
||
<script>${pigScript}</script> | ||
<param>airportsLocation=${airportsLocation}</param> | ||
<param>airlinesLocation=${airlinesLocation}</param> | ||
<param>routesLocation=${routesLocation}</param> | ||
<param>planesLocation=${planesLocation}</param> | ||
<param>outputLocation=${outputLocation}</param> | ||
<param>n=${n}</param> | ||
</pig> | ||
<ok to="SQLAction"> | ||
<error to="PigKill"> | ||
</action> | ||
<action name="SQLAction"> | ||
<shell> | ||
<exec>${sqlScript}</exec> | ||
<file>${sqlScript}</file> | ||
</shell> | ||
<ok to="SqoopAction"> | ||
<error to="SQLKill"> | ||
</action> | ||
<action name="SqoopAction"> | ||
<sqoop xmlns="uri:oozie:sqoop-action:0.2"> | ||
<job-tracker>${jobTracker}</jobTracker> | ||
<name-node>${name-node}</name-node> | ||
<command>sqoop export --connect jdbc:mysql://10.128.0.4:3306/OpenAnalysis --username hive --password admin -m 1 --table ${TableName} --export-dir ${exportDir} --input-fields-terminated-by ',' --input-null-string '\\N' --input-null-non-string '\\N' | ||
</command> | ||
</sqoop> | ||
<ok to="end"> | ||
<error to="SqoopKill"> | ||
</action> | ||
<kill name="PigKill"> | ||
<message>Pig Action Failed, error message | ||
[${wf:errorMessage(wf:lastErrorNode())}] | ||
</message> | ||
</kill> | ||
<kill name="SQLKill"> | ||
<message>SQL Action Failed, error message | ||
[${wf:errorMessage(wf:lastErrorNode())}] | ||
</message> | ||
</kill> | ||
<kill name="SqoopKill"> | ||
<message>Sqoop Action Failed, error message | ||
[${wf:errorMessage(wf:lastErrorNode())}] | ||
</message> | ||
</kill> | ||
|
||
</workflow-app> |