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

Zookeeper session ids created as unsigned long, parsed in ZooUtils.java as signed long

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4.2
    • Fix Version/s: 1.4.3, 1.5.0
    • Component/s: start
    • Labels:
      None
    • Environment:

      Hadoop 0.20, ZooKeeper 3.4.3, CentOS 2.6, x64 CPU, Java 1.6.0_24

      Description

      Seems like this may be a bug. I looked at
      LiveTServerSet.assignTablet() it eventually calls Long.toHexString().
      The javadoc for toHexString() says the following.

      Returns a string representation of the <code>long</code>
      argument as an unsigned integer in base 16.
      

      However, the method we are using to parse the Long can not handle
      unsigned longs greater than MAX_LONG. There does not seem to be a
      method in long that can parse the output of toHexString(). For
      example the following will fail, any negative number will fail.

      Long.parseLong(Long.toHexString(-1), 16);

      Original Stack Dump:

      java.lang.NumberFormatException: For input string: "b53c3a3610ce0001"
      	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
      	at java.lang.Long.parseLong(Long.java:422)
      	at org.apache.accumulo.core.zookeeper.ZooUtil$LockID.<init>(ZooUtil.java:64)
      	at org.apache.accumulo.server.tabletserver.TabletServer$ThriftClientHandler.checkPermission(TabletServer.java:1794)
      	at org.apache.accumulo.server.tabletserver.TabletServer$ThriftClientHandler.loadTablet(TabletServer.java:1814)
      	at org.apache.accumulo.core.tabletserver.thrift.TabletClientService$Processor.process(TabletClientService.java:2037)
      	at org.apache.accumulo.server.util.TServerUtils$TimedProcessor.process(TServerUtils.java:154)
      	at org.apache.thrift.server.TNonblockingServer$FrameBuffer.invoke(TNonblockingServer.java:631)
      	at org.apache.accumulo.server.util.TServerUtils$THsHaServer$Invocation.run(TServerUtils.java:202)
      

        Attachments

          Activity

            People

            • Assignee:
              ecn Eric Newton
              Reporter:
              ralberth Rich Alberth
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: