Uploaded image for project: 'Accumulo'
  1. Accumulo
  2. ACCUMULO-4444

NullPointerException when password not given to TraceTableStats

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.7.2, 1.8.0
    • 1.7.3, 1.8.1, 2.0.0
    • trace
    • None
    • 1.7.2 cluster

    Description

      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.

      $ 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' died.
      java.lang.NullPointerException
              at org.apache.accumulo.core.client.impl.ConnectorImpl.<init>(ConnectorImpl.java:59)
              at org.apache.accumulo.core.client.ZooKeeperInstance.getConnector(ZooKeeperInstance.java:248)
              at org.apache.accumulo.core.cli.ClientOpts.getConnector(ClientOpts.java:315)
              at org.apache.accumulo.tracer.TraceTableStats.count(TraceTableStats.java:75)
              at org.apache.accumulo.tracer.TraceTableStats.main(TraceTableStats.java:71)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.apache.accumulo.start.Main$2.run(Main.java:157)
              at java.lang.Thread.run(Thread.java:745)
      
      

      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?

      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(), SecurityErrorCode.TOKEN_EXPIRED);
      

      Attachments

        Issue Links

          Activity

            People

              milleruntime Michael Miller
              busbey Sean Busbey
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h