- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Does anyone know how to execute aws cli fommand to remove s3 objects from within oozie workflow (would need to do something like this command within oozie workflow "aws s3 rm s3://PathToObjects --recursive")
- Labels:
-
Apache Oozie
Created ‎06-21-2017 03:27 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created ‎06-21-2017 06:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can simply run hdfs cli commands to delete objects on S3
hdfs dfs -rm -r -f -skipTrash s3a://S3_BUCKET_NAME/S3_PATH
This however will only works if you have specified S3 properties (fs.s3a.access.key, fs.s3a.secret.key) in core-site.xml
Created ‎06-21-2017 06:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can simply run hdfs cli commands to delete objects on S3
hdfs dfs -rm -r -f -skipTrash s3a://S3_BUCKET_NAME/S3_PATH
This however will only works if you have specified S3 properties (fs.s3a.access.key, fs.s3a.secret.key) in core-site.xml
Created ‎06-21-2017 07:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
so we're needing to perform the command inside an oozie workflow so am assuming the command above would work when the oozie workflow xml like what's shown below. Am I understanding that correctly?
<action name="remove-s3">
<fs>
<hdfs dfs -rm -r -f -skipTrash s3a://S3_BUCKET_NAME/S3_PATH />
</fs>
</action>
Created ‎06-21-2017 08:32 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, that is correct
