Uploaded image for project: 'Apache Curator'
  1. Apache Curator
  2. CURATOR-532

Manually configurable ZooKeeper 3.4.x compatibility

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • Client, Framework
    • None

    Description

      Currently, Curator auto detect whether it is in a zookeeper 3.4.x environment by

      static {
              boolean localHasZooKeeperAdmin;
              try
              {
                  Class.forName("org.apache.zookeeper.admin.ZooKeeperAdmin");
                  localHasZooKeeperAdmin = true;
              }
              catch ( ClassNotFoundException e )
              {
                  localHasZooKeeperAdmin = false;
                  logger.info("Running in ZooKeeper 3.4.x compatibility mode");
              }
              hasZooKeeperAdmin = localHasZooKeeperAdmin;
      }
      

      However, for some projects such as FLINK, both zookeeper and curator are relocated. Thus org.apache.zookeeper.admin.ZooKeeperAdmin is shaded as org.apache.flink.shaded.zookeeper.org.apache.zookeeper.admin.ZooKeeperAdmin. So the detection fails.

      A manually configurable compatibility option might solve this problem.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tison Zili Chen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: