You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Purshotam Shah (JIRA)" <ji...@apache.org> on 2016/09/27 22:49:21 UTC
[jira] [Updated] (OOZIE-2688) YAML representation of Oozie unit
testcase
[ https://issues.apache.org/jira/browse/OOZIE-2688?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Purshotam Shah updated OOZIE-2688:
----------------------------------
Description:
Eample Of Bundle Test
name: TestBundleDisableCoord
output_path: ./target/oozieyaml-sourcesjob:
properties:
raw_logs_path: "/tmp/test"
aggregated_logs_path: "/user/test"
workflowPath: "/testDirPath"
start: "2010-02-01T10:00Z"
end: "2012-02-03T23:59Z"
oozie.bundle.application.path: "/tmp/workflow-test/bundle-multiple-coord.xml"
queueName: "defult"
coord_path_1: "/tmp/workflow-test/coordinator-test-1.xml"
coord_path_2: "/tmp/workflow-test/coordinator-test-2.xml"
jobTracker: !func getJobTrackerUri()
nameNode: !func getNameNodeUri()
hdfs:
touchz:
- /tmp/test/2010/02/01/09/_SUCCESS
- /tmp/test/2010/02/01/10/_SUCCESS
- /tmp/test/2010/02/01/11/_SUCCESS
- /tmp/test/2010/02/01/12/_SUCCESS
copyFromLocal:
- source: bundle-multiple-coord.xml
destination: "/tmp/workflow-test/bundle-multiple-coord.xml"
- source: coordinator-test-1.xml
destination: /tmp/workflow-test/coordinator-test-1.xml
- source: coordinator-test-2.xml
skip:
coordinators:
- coordinator: coord_1
validations:
validate_job:
sleep: 6000
status: RUNNING
coordinators:
- coordinator: coord_2
not_status: PREP
coordinator_actions:
- coordinator_action : "@2"
not_status: WAITING
nominal_time: 2010-02-01T11:00Z
Coordinator test
name: TestCoordinator
output_path: ./target/oozieyaml-sourcesjob:
properties:
raw_logs_path: "/tmp/test"
aggregated_logs_path: "/user/test"
workflowPath: "/testDirPath"
start: "2010-02-01T10:00Z"
end: "2012-02-03T23:59Z"
oozie.coord.application.path: "/tmp/workflow-test/coordinator.xml"
queueName: "defult"
jobTracker: !func getJobTrackerUri()
nameNode: !func getNameNodeUri()
hdfs:
touchz:
- /tmp/test/2010/02/01/09/_SUCCESS
- /tmp/test/2010/02/01/10/_SUCCESS
- /tmp/test/2010/02/01/11/_SUCCESS
- /tmp/test/2010/02/01/12/_SUCCESS
copyFromLocal:
- source: coordinator-test.xml
destination: "/tmp/workflow-test/coordinator.xml"
validations:
validate_job:
sleep: 6000
job_conf:
- key: queueName
expected_value: defult
coordinator_actions:
- coordinator_action : "@2"
not_status: WAITING
nominal_time: 2010-02-01T11:00Z
Coordinator test with HCat
name: TestCoordinatorWithHcat
output_path: ./target/oozieyaml-sourcesjob:
properties:
raw_logs_path: "/tmp/test"
aggregated_logs_path: "/user/test"
workflowAppUri: "/testDirPath"
start: "2010-02-01T10:00Z"
end: "2012-02-03T23:59Z"
oozie.coord.application.path: "/tmp/workflow-test/coordinator.xml"
queueName: "defult"
db: db_test
table: table_test
dataOut: dataOut
jobTracker: !func getJobTrackerUri()
nameNode: !func getNameNodeUri()
hcatNode: !func \"hcat://\" + getMetastoreAuthority()
hdfs:
mkdir:
- "/tmp/workflow-test/"
copyFromLocal:
- source: coordinator-hcat-test.xml
destination: "/tmp/workflow-test/coordinator.xml"
hcat:
create:
databases:
- database: db_test
tables:
- table: table_test
columns: "dt,country"
partitions:
- dt=20100201;country=usa
validations:
validate_job:
sleep: 6000
coordinator_actions:
- coordinator_action : "@1"
not_status: WAITING
nominal_time: 2010-02-01T10:00Z
Workflow Test
name: TestWorkflowWithPig
output_path: ./target/oozieyaml-sources
copy_dependencies_files_hdfs:
- /tmp/workflow-test/libjob:
properties:
INPUT: "/tmp/input/dummp.txt"
oozie.wf.application.path: "/tmp/workflow-test/"
queueName: "defult"
OUTPUT: "/tmp/output"
jobTracker: !func getJobTrackerUri()
nameNode: !func getNameNodeUri()
hdfs:
mkdir:
- "/tmp/workflow-test/"
touchz:
- /tmp/input/dummp.txt
copyFromLocal:
- source: echo.pig
destination: "/tmp/workflow-test/echo.pig"
- source: workflow-test-with-pig.xml
destination: "/tmp/workflow-test/workflow.xml"
validations:
validate_job:
sleep: 60000
status: SUCCEEDED
workflow_actions:
- workflow_action : pig
status: OK
Workflow Test with skip Job submission
name: TestWorkflowJobStatus
output_path: ./target/oozieyaml-sources
copy_dependencies_files_hdfs:
- /tmp/workflow-test/libjob:
properties:
INPUT: "/tmp/input/dummp.txt"
oozie.wf.application.path: "/tmp/workflow-test/"
queueName: "defult"
OUTPUT: "/tmp/output"
jobTracker: !func getJobTrackerUri()
nameNode: !func getNameNodeUri()
hdfs:
mkdir:
- "/tmp/workflow-test/"
touchz:
- /tmp/input/dummp.txt
copyFromLocal:
- source: echo.pig
destination: "/tmp/workflow-test/echo.pig"
- source: workflow-test-with-output.xml
destination: "/tmp/workflow-test/workflow.xml"
skip:
workflow_actions:
- workflow_action : pig
skip_job_submission: true
status: OK
output:
- source: /tmp/workflow-test/echo.pig
destination: "/tmp/workflow-test/dummy.pig"
- workflow_action : pig_2
skip_job_submission: true
status: ERROR
validations:
validate_job:
wait_for_status: KILLED
workflow_actions:
- workflow_action : pig
status: OK
- workflow_action : pig_1
status: OK
- workflow_action : pig_2
status: ERROR
> YAML representation of Oozie unit testcase
> ------------------------------------------
>
> Key: OOZIE-2688
> URL: https://issues.apache.org/jira/browse/OOZIE-2688
> Project: Oozie
> Issue Type: Bug
> Reporter: Purshotam Shah
> Assignee: Purshotam Shah
>
> Eample Of Bundle Test
> name: TestBundleDisableCoord
> output_path: ./target/oozieyaml-sourcesjob:
> properties:
> raw_logs_path: "/tmp/test"
> aggregated_logs_path: "/user/test"
> workflowPath: "/testDirPath"
> start: "2010-02-01T10:00Z"
> end: "2012-02-03T23:59Z"
> oozie.bundle.application.path: "/tmp/workflow-test/bundle-multiple-coord.xml"
> queueName: "defult"
> coord_path_1: "/tmp/workflow-test/coordinator-test-1.xml"
> coord_path_2: "/tmp/workflow-test/coordinator-test-2.xml"
> jobTracker: !func getJobTrackerUri()
> nameNode: !func getNameNodeUri()
> hdfs:
> touchz:
> - /tmp/test/2010/02/01/09/_SUCCESS
> - /tmp/test/2010/02/01/10/_SUCCESS
> - /tmp/test/2010/02/01/11/_SUCCESS
> - /tmp/test/2010/02/01/12/_SUCCESS
> copyFromLocal:
> - source: bundle-multiple-coord.xml
> destination: "/tmp/workflow-test/bundle-multiple-coord.xml"
> - source: coordinator-test-1.xml
> destination: /tmp/workflow-test/coordinator-test-1.xml
> - source: coordinator-test-2.xml
> skip:
> coordinators:
> - coordinator: coord_1
> validations:
> validate_job:
> sleep: 6000
> status: RUNNING
> coordinators:
> - coordinator: coord_2
> not_status: PREP
> coordinator_actions:
> - coordinator_action : "@2"
> not_status: WAITING
> nominal_time: 2010-02-01T11:00Z
> Coordinator test
> name: TestCoordinator
> output_path: ./target/oozieyaml-sourcesjob:
> properties:
> raw_logs_path: "/tmp/test"
> aggregated_logs_path: "/user/test"
> workflowPath: "/testDirPath"
> start: "2010-02-01T10:00Z"
> end: "2012-02-03T23:59Z"
> oozie.coord.application.path: "/tmp/workflow-test/coordinator.xml"
> queueName: "defult"
> jobTracker: !func getJobTrackerUri()
> nameNode: !func getNameNodeUri()
> hdfs:
> touchz:
> - /tmp/test/2010/02/01/09/_SUCCESS
> - /tmp/test/2010/02/01/10/_SUCCESS
> - /tmp/test/2010/02/01/11/_SUCCESS
> - /tmp/test/2010/02/01/12/_SUCCESS
> copyFromLocal:
> - source: coordinator-test.xml
> destination: "/tmp/workflow-test/coordinator.xml"
> validations:
> validate_job:
> sleep: 6000
> job_conf:
> - key: queueName
> expected_value: defult
> coordinator_actions:
> - coordinator_action : "@2"
> not_status: WAITING
> nominal_time: 2010-02-01T11:00Z
> Coordinator test with HCat
> name: TestCoordinatorWithHcat
> output_path: ./target/oozieyaml-sourcesjob:
> properties:
> raw_logs_path: "/tmp/test"
> aggregated_logs_path: "/user/test"
> workflowAppUri: "/testDirPath"
> start: "2010-02-01T10:00Z"
> end: "2012-02-03T23:59Z"
> oozie.coord.application.path: "/tmp/workflow-test/coordinator.xml"
> queueName: "defult"
> db: db_test
> table: table_test
> dataOut: dataOut
> jobTracker: !func getJobTrackerUri()
> nameNode: !func getNameNodeUri()
> hcatNode: !func \"hcat://\" + getMetastoreAuthority()
> hdfs:
> mkdir:
> - "/tmp/workflow-test/"
> copyFromLocal:
> - source: coordinator-hcat-test.xml
> destination: "/tmp/workflow-test/coordinator.xml"
> hcat:
> create:
> databases:
> - database: db_test
> tables:
> - table: table_test
> columns: "dt,country"
> partitions:
> - dt=20100201;country=usa
> validations:
> validate_job:
> sleep: 6000
> coordinator_actions:
> - coordinator_action : "@1"
> not_status: WAITING
> nominal_time: 2010-02-01T10:00Z
> Workflow Test
> name: TestWorkflowWithPig
> output_path: ./target/oozieyaml-sources
> copy_dependencies_files_hdfs:
> - /tmp/workflow-test/libjob:
> properties:
> INPUT: "/tmp/input/dummp.txt"
> oozie.wf.application.path: "/tmp/workflow-test/"
> queueName: "defult"
> OUTPUT: "/tmp/output"
> jobTracker: !func getJobTrackerUri()
> nameNode: !func getNameNodeUri()
> hdfs:
> mkdir:
> - "/tmp/workflow-test/"
> touchz:
> - /tmp/input/dummp.txt
> copyFromLocal:
> - source: echo.pig
> destination: "/tmp/workflow-test/echo.pig"
> - source: workflow-test-with-pig.xml
> destination: "/tmp/workflow-test/workflow.xml"
> validations:
> validate_job:
> sleep: 60000
> status: SUCCEEDED
> workflow_actions:
> - workflow_action : pig
> status: OK
> Workflow Test with skip Job submission
> name: TestWorkflowJobStatus
> output_path: ./target/oozieyaml-sources
> copy_dependencies_files_hdfs:
> - /tmp/workflow-test/libjob:
> properties:
> INPUT: "/tmp/input/dummp.txt"
> oozie.wf.application.path: "/tmp/workflow-test/"
> queueName: "defult"
> OUTPUT: "/tmp/output"
> jobTracker: !func getJobTrackerUri()
> nameNode: !func getNameNodeUri()
> hdfs:
> mkdir:
> - "/tmp/workflow-test/"
> touchz:
> - /tmp/input/dummp.txt
> copyFromLocal:
> - source: echo.pig
> destination: "/tmp/workflow-test/echo.pig"
> - source: workflow-test-with-output.xml
> destination: "/tmp/workflow-test/workflow.xml"
> skip:
> workflow_actions:
> - workflow_action : pig
> skip_job_submission: true
> status: OK
> output:
> - source: /tmp/workflow-test/echo.pig
> destination: "/tmp/workflow-test/dummy.pig"
> - workflow_action : pig_2
> skip_job_submission: true
> status: ERROR
> validations:
> validate_job:
> wait_for_status: KILLED
> workflow_actions:
> - workflow_action : pig
> status: OK
> - workflow_action : pig_1
> status: OK
> - workflow_action : pig_2
> status: ERROR
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)