accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubbsii <...@git.apache.org>
Subject [GitHub] accumulo pull request #136: Accumulo 2971: improvements to ChangeSecret Tool
Date Thu, 28 Jul 2016 17:57:38 GMT
Github user ctubbsii commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/136#discussion_r72670184
  
    --- Diff: server/base/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java
---
    @@ -63,12 +66,15 @@ public static void main(String[] args) throws Exception {
         Instance inst = opts.getInstance();
         if (!verifyAccumuloIsDown(inst, opts.oldPass))
           System.exit(-1);
    -    String instanceId = rewriteZooKeeperInstance(inst, opts.oldPass, opts.newPass);
    -    updateHdfs(fs, inst, instanceId);
    +    if (!verifyHdfsWritePermission(fs))
    +      System.exit(-1);
    --- End diff --
    
    Might be better to print a message first.
    
    Also (and this is perhaps a minor nit), negative exit codes should not be used. They aren't
cross-platform. Also, the special exit codes defined in sysexits.h should be avoided, so best
to stick with values `[1,63]`. I'd probably just stick with `1` for this (and the other places
in this class, which currently use `-1`).


---
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