[jira] [Commented] (HDFS-14060) HDFS fetchdt command to return error codes on success/failure

2018-11-12 Thread Steve Loughran (JIRA)


[ 
https://issues.apache.org/jira/browse/HDFS-14060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16683562#comment-16683562
 ] 

Steve Loughran commented on HDFS-14060:
---

+[~daryn]

Looking at Daryn's comments there, we could think about having something better 
in the "hadoop" command and do it based on our experiences of this one.

* take list of FS URLs, collect DT for each
* support appending to existing token file (or make the ability to merge TFs a 
separate option. 
* if you add the -print option, print out the issued tokens, not the existing 
contents of the output file (today's behaviour)

FWIW, one nice thing about fetchdt is that it doesn't require Kerberos to be 
enabled: good for testing

> HDFS fetchdt command to return error codes on success/failure
> -
>
> Key: HDFS-14060
> URL: https://issues.apache.org/jira/browse/HDFS-14060
> Project: Hadoop HDFS
>  Issue Type: Improvement
>  Components: tools
>Affects Versions: 3.3.0
>Reporter: Steve Loughran
>Assignee: Kitti Nanasi
>Priority: Major
>
> The {{hdfs fetchdt}} command always returns 0, even when there's been an 
> error (no token issued, no file to load, usage, etc). This means its not that 
> useful as a command line tool for testing or in scripts.
> Proposed: exit non-zero for errors; reuse LaucherExitCodes for these



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Commented] (HDFS-14060) HDFS fetchdt command to return error codes on success/failure

2018-11-12 Thread Steve Loughran (JIRA)


[ 
https://issues.apache.org/jira/browse/HDFS-14060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16683553#comment-16683553
 ] 

Steve Loughran commented on HDFS-14060:
---

Thx for picking this up

I think it's best to have a simple exit code model of
* command failed with error: -1
* command didn't fail: 0

Most ambiguous is this: if an FS didn't issue a token, is that an error or not? 
I'd argue "yes, it's an error", but there's a risk of breaking workflows. Even 
changing the exit codes here has a bit of a risk



* trunk has some changes to its fetchdt for better testability (HDFS-13951); 
that's the one to work on. If you want this for earlier 3.x branches, that can 
be backported.
* if you actually want to see if the fetched DTs can be used, the latest 
version of https://github.com/steveloughran/cloudstore can take a token file 
{{-tokenfile }} and load it; if you log out of kerberos after collecting 
the token then it'll verify things worked.

> HDFS fetchdt command to return error codes on success/failure
> -
>
> Key: HDFS-14060
> URL: https://issues.apache.org/jira/browse/HDFS-14060
> Project: Hadoop HDFS
>  Issue Type: Improvement
>  Components: tools
>Affects Versions: 3.3.0
>Reporter: Steve Loughran
>Assignee: Kitti Nanasi
>Priority: Major
>
> The {{hdfs fetchdt}} command always returns 0, even when there's been an 
> error (no token issued, no file to load, usage, etc). This means its not that 
> useful as a command line tool for testing or in scripts.
> Proposed: exit non-zero for errors; reuse LaucherExitCodes for these



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org