public static Token<? extends AbstractDelegationTokenIdentifier> extractThriftToken(
    String tokenStrForm, String tokenSignature) throws MetaException,
    TException, IOException {
    // LOG.info("extractThriftToken("+tokenStrForm+","+tokenSignature+")");
    Token<? extends AbstractDelegationTokenIdentifier> t = new Token<DelegationTokenIdentifier>();
    t.decodeFromUrlString(tokenStrForm);
    t.setService(new Text(tokenSignature));
    // LOG.info("returning "+t);
    return t;
  }
Ensure that read or write permissions are not granted without also
granting execute permissions. Essentially, r-- , rw- and -w- are invalid,
r-x, -wx, rwx, ---, --x are valid

@param perms The FsAction to verify
@return true if the presence of read or write permission is accompanied
        by execute permissions
hcatalog/core/src/main/java/org/apache/hive/hcatalog/common/HCatUtil.java