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

dynamically load command objects in zk

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Not A Problem
    • None
    • 3.4.5
    • java client

    Description

      In class org.apache.zookeeper.ZooKeeperMain.java,
      new CloseCommand().addToMap(commandMapCli);
      new CreateCommand().addToMap(commandMapCli);
      new DeleteCommand().addToMap(commandMapCli);
      new DeleteAllCommand().addToMap(commandMapCli);
      // Depricated: rmr
      new DeleteAllCommand("rmr").addToMap(commandMapCli);
      new SetCommand().addToMap(commandMapCli);
      new GetCommand().addToMap(commandMapCli);
      new LsCommand().addToMap(commandMapCli);
      new Ls2Command().addToMap(commandMapCli);
      new GetAclCommand().addToMap(commandMapCli);
      new SetAclCommand().addToMap(commandMapCli);
      new StatCommand().addToMap(commandMapCli);
      new SyncCommand().addToMap(commandMapCli);
      new SetQuotaCommand().addToMap(commandMapCli);
      new ListQuotaCommand().addToMap(commandMapCli);
      new DelQuotaCommand().addToMap(commandMapCli);
      new AddAuthCommand().addToMap(commandMapCli);

      The above code is not flexible for command object scalability. It's better to refine the code to load and create the command objects dynamically.

      Attachments

        1. zookeeper.patch
          3 kB
          Tian Hong Wang

        Activity

          People

            tianhonglouis Tian Hong Wang
            tianhonglouis Tian Hong Wang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: