accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Elser (JIRA)" <>
Subject [jira] [Commented] (ACCUMULO-4444) NullPointerException when password not given to TraceTableStats
Date Fri, 16 Sep 2016 16:45:20 GMT


Josh Elser commented on ACCUMULO-4444:

bq. Like if the tool isn't mentioned specifically in the User guide or printed by accumulo
script, how will they find it?

Yeah, this is definitely a hold-out from the old Hadoop days IMO where {{accumulo <classname>}}
and {{hadoop jar classname}} were very prominent. [~ctubbsii]'s use of AutoService was nice
in giving us a way to easily list out "utilities" which can be invoked. I think this is a
big improvement over what we had before.

bq. Yeah I thought of that as well yesterday when looking at how to get ClientOpts to prompt
for a password. The ChangeSecret tool does it by passing empty "--" parameters to JCommander
and lets JCommander prompt for the password. 

Hah, quirky. Two thoughts on approaches...

# We pull out what ChangeSecret does with JCommander to a utility that can be re-used by other
# We encapsulate the functionality in ClientOpts so that all utilities that use ClientOpts
will automagically prompt for a password if one is not provided

Both have their edge cases, but either would be a great improvement if you'd like to take
that on :)

> NullPointerException when password not given to TraceTableStats
> ---------------------------------------------------------------
>                 Key: ACCUMULO-4444
>                 URL:
>             Project: Accumulo
>          Issue Type: Bug
>          Components: trace
>    Affects Versions: 1.7.2, 1.8.0
>         Environment: 1.7.2 cluster
>            Reporter: Sean Busbey
>            Assignee: Michael Miller
>            Priority: Critical
>             Fix For: 1.7.3, 1.8.1, 2.0.0
>          Time Spent: 20m
>  Remaining Estimate: 0h
> I'm trying to follow the [admin guide on tracing|],
specifically with the {{TraceTableStats}} command.
> In attempting to get prompted for the password, I provided a username and no password,
which resulted in a NullPointerException.
> {code}
> $ accumulo org.apache.accumulo.tracer.TraceTableStats -i accumulo -u foobar
> 2016-09-01 11:05:47,420 [conf.ConfigSanityCheck] WARN : Use of instance.dfs.uri and instance.dfs.dir
are deprecated. Consider using instance.volumes instead.
> 2016-09-01 11:05:47,564 [client.ClientConfiguration] WARN : Found no client.conf in default
paths. Using default client configuration values.
> 2016-09-01 11:05:47,567 [client.ClientConfiguration] WARN : Found no client.conf in default
paths. Using default client configuration values.
> 2016-09-01 11:05:47,720 [start.Main] ERROR: Thread 'org.apache.accumulo.tracer.TraceTableStats'
> java.lang.NullPointerException
>         at org.apache.accumulo.core.client.impl.ConnectorImpl.<init>(
>         at org.apache.accumulo.core.client.ZooKeeperInstance.getConnector(
>         at org.apache.accumulo.core.cli.ClientOpts.getConnector(
>         at org.apache.accumulo.tracer.TraceTableStats.count(
>         at org.apache.accumulo.tracer.TraceTableStats.main(
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>         at java.lang.reflect.Method.invoke(
>         at org.apache.accumulo.start.Main$
>         at
> {code}
> The impacted line is checking to see if the credential has expired, without checking
to see if there is a credential in the first place, I think?
> {code}
> 57  public ConnectorImpl(final ClientContext context) throws AccumuloException, AccumuloSecurityException
> 58    checkArgument(context != null, "context is null");
> 59    if (context.getCredentials().getToken().isDestroyed())
> 60      throw new AccumuloSecurityException(context.getCredentials().getPrincipal(),
> {code}

This message was sent by Atlassian JIRA

View raw message