metron-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yibter <...@git.apache.org>
Subject [GitHub] incubator-metron pull request: Rerunning playbook halts due to hdf...
Date Mon, 28 Mar 2016 23:47:29 GMT
Github user yibter commented on the pull request:

    https://github.com/apache/incubator-metron/pull/62#issuecomment-202630163
  
    Sounds like a plan @dlyle65535! So, based on what you were saying about the register and
the fail block, I found this guy...
    
    http://docs.ansible.com/ansible/playbooks_error_handling.html#controlling-what-defines-failure
    
    Looks like the "ignore_errors + register + the separate fail block w/ the explicit message"
pattern can be collapsed into a "register + failed_when" pattern, so something like this maybe...
    
    ```yaml
    register: put_result
    failed_when: "put_result | failed and 'File exists' not in put_result.stderr"
    ```
    
    And then in a completely different direction, looks like the "[copyFromLocal](https://hadoop.apache.org/docs/r2.7.2/hadoop-project-dist/hadoop-common/FileSystemShell.html#copyFromLocal
    )" (instead of the put) command supports the force (-f) flag... which would just overwrite
the destination without throwing an error.
    
    So thoughts on which you'd prefer...
    1. Separate Fail Block w/ Messaging.
    2. Failed_when that will do a normal fail if it's not a fail exists issue
    3. Use a copyFromLocal w/ the override flag (instead of the put)
    
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message