-
Notifications
You must be signed in to change notification settings - Fork 50
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
Kamil Breguła
committed
Apr 25, 2019
1 parent
147ca1c
commit 2b935ab
Showing
20 changed files
with
868 additions
and
16 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,23 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2019 Google LLC | ||
# | ||
# Licensed 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. | ||
"""Custom exceptions""" | ||
|
||
|
||
class O2AException(Exception): | ||
"""Base class for all exceptions raised by Oozie-to-Airflow.""" | ||
|
||
|
||
class ParseException(O2AException): | ||
"""Raised when an error occurs in the parsing phase.""" |
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
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
36 changes: 36 additions & 0 deletions
36
oozie-to-airflow/examples/fs/configuration.template.properties
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,36 @@ | ||
# Copyright 2019 Google LLC | ||
# | ||
# Licensed 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. | ||
|
||
# | ||
# 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. | ||
# | ||
|
||
dataproc_cluster={{DATAPROC_CLUSTER_NAME}} | ||
gcp_conn_id=google_cloud_default | ||
gcp_region={{GCP_REGION}} | ||
gcp_uri_prefix=gs://{{COMPOSER_DAG_BUCKET}}/dags |
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,20 @@ | ||
# Copyright 2019 Google LLC | ||
# | ||
# Licensed 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. | ||
|
||
nameNode=hdfs://localhost:8020 | ||
resourceManager=localhost:8032 | ||
queueName=default | ||
examplesRoot=examples | ||
|
||
oozie.wf.application.path=${nameNode}/user/${user.name}/${examplesRoot}/apps/shell |
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,85 @@ | ||
<!-- | ||
Copyright 2019 Google LLC | ||
Licensed 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 xmlns="uri:oozie:workflow:1.0" name="fs-wf"> | ||
<start to="fs-node"/> | ||
<fork name="fs-node"> | ||
<path start="mkdir"/> | ||
<path start="delete"/> | ||
<path start="move"/> | ||
<path start="chmod"/> | ||
<path start="touchz"/> | ||
<path start="chgrp"/> | ||
</fork> | ||
<action name="mkdir"> | ||
<fs> | ||
<mkdir path='${nameNode}/user/fs/examples/test-mkdir-1'/> | ||
</fs> | ||
<ok to="end"/> | ||
<error to="fail"/> | ||
</action> | ||
<action name="delete"> | ||
<fs> | ||
<mkdir path='${nameNode}/user/fs/examples/test-delete-1'/> | ||
<delete path='${nameNode}/user/fs/examples/test-delete-1'/> | ||
</fs> | ||
<ok to="end"/> | ||
<error to="fail"/> | ||
</action> | ||
<action name="move"> | ||
<fs> | ||
<mkdir path='${nameNode}/user/fs/examples/test-move-1'/> | ||
<move source='${nameNode}/user/fs/examples/test-move-1' target='/user/fs/examples/test-move-2' /> | ||
</fs> | ||
<ok to="end"/> | ||
<error to="fail"/> | ||
</action> | ||
<action name="chmod"> | ||
<fs> | ||
<mkdir path='${nameNode}/user/fs/examples/test-chmod-1'/> | ||
<mkdir path='${nameNode}/user/fs/examples/test-chmod-2'/> | ||
<mkdir path='${nameNode}/user/fs/examples/test-chmod-3'/> | ||
<mkdir path='${nameNode}/user/fs/examples/test-chmod-4'/> | ||
<chmod path='${nameNode}/user/fs/examples/test-chmod-1' permissions='777' dir-files='false' /> | ||
<chmod path='${nameNode}/user/fs/examples/test-chmod-2' permissions='777' dir-files='true' /> | ||
<chmod path='${nameNode}/user/fs/examples/test-chmod-3' permissions='777' /> | ||
<chmod path='${nameNode}/user/fs/examples/test-chmod-4' permissions='777' dir-files='false' > | ||
<recursive/> | ||
</chmod> | ||
</fs> | ||
<ok to="end"/> | ||
<error to="fail"/> | ||
</action> | ||
<action name="touchz"> | ||
<fs> | ||
<touchz path='${nameNode}/user/fs/examples/test-touchz-1' /> | ||
</fs> | ||
<ok to="end"/> | ||
<error to="fail"/> | ||
</action> | ||
<action name="chgrp"> | ||
<fs> | ||
<mkdir path='${nameNode}/user/fs/examples/test-chgrp-1'/> | ||
<chgrp path='${nameNode}/user/fs/examples/test-chgrp-1' group='hadoop' /> | ||
</fs> | ||
<ok to="end"/> | ||
<error to="fail"/> | ||
</action> | ||
<kill name="fail"> | ||
<message>Fs workflow failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message> | ||
</kill> | ||
<end name="end"/> | ||
</workflow-app> |
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
Oops, something went wrong.