Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-780

zkCli.sh generates a ArrayIndexOutOfBoundsException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Invalid
    • 3.3.1
    • 3.5.0
    • scripts
    • None
    • Linux Ubuntu running in VMPlayer on top of Windows XP

    • If no data is provided for the new node when using the "create" zkCli.sh command assume an empty byte array.

    Description

      I'm starting to play with Zookeeper so I'm still running it in standalone mode. This is not a big issue, but here it goes for the records.

      I've run zkCli.sh to run some commands in the server. I created a znode /groups. When I tried to create a znode client_1 inside /groups, I forgot to include the data: an exception was generated and zkCli-sh crashed, instead of just showing an error. I tried a few variations and it seems like the problem is not including the data.

      A copy of the screen:

      [zk: localhost:2181(CONNECTED) 3] create /groups firstgroup
      Created /groups
      [zk: localhost:2181(CONNECTED) 4] create -e /groups/client_1
      Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 3
      at org.apache.zookeeper.ZooKeeperMain.processZKCmd(ZooKeeperMain.java:678)
      at org.apache.zookeeper.ZooKeeperMain.processCmd(ZooKeeperMain.java:581)
      at org.apache.zookeeper.ZooKeeperMain.executeLine(ZooKeeperMain.java:353)
      at org.apache.zookeeper.ZooKeeperMain.run(ZooKeeperMain.java:311)
      at org.apache.zookeeper.ZooKeeperMain.main(ZooKeeperMain.java:270)

      Attachments

        1. ZOOKEEPER-780.patch
          3 kB
          Andrei Savu
        2. ZOOKEEPER-780.patch
          3 kB
          Andrei Savu
        3. ZOOKEEPER-780.patch
          2 kB
          Andrei Savu

        Activity

          People

            Unassigned Unassigned
            mpc Miguel Correia
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: