ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1020

Implement function in C client to determine which host you're currently connected to.

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.0
    • Component/s: c client
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      On occasion it might be useful to determine which host your Zookeeper client is currently connected to, be it for debugging purposes or otherwise. A possible signature for that function:

      const char* zoo_get_connected_host(zhandle_t *zh, char *buffer, size_t buffer_size, unsigned short *port);

      Clients could use it like below:

      char buffer[33];
      unsigned short port = 0;
      if (!zoo_get_connected_host(zh, buffer, sizeof(buffer), &port))
      return EXIT_FAILURE;

      printf("The connected host is: %s:%d\n", buffer, port);

        Activity

        Mahadev konar made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Patrick Hunt made changes -
        Fix Version/s 3.4.0 [ 12314469 ]
        Patrick Hunt made changes -
        Assignee Stephen Tyree [ tyree731 ]
        Benjamin Reed made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Stephen Tyree made changes -
        Attachment ZOOKEEPER-1020.patch [ 12473800 ]
        Stephen Tyree made changes -
        Attachment ZOOKEEPER-1020.patch [ 12473832 ]
        Stephen Tyree made changes -
        Attachment ZOOKEEPER-1020.patch [ 12473721 ]
        Stephen Tyree made changes -
        Attachment ZOOKEEPER-1020.patch [ 12473800 ]
        Benjamin Reed made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hadoop Flags [Reviewed]
        Stephen Tyree made changes -
        Attachment ZOOKEEPER-1020.patch [ 12473687 ]
        Stephen Tyree made changes -
        Attachment ZOOKEEPER-1020.patch [ 12473721 ]
        Stephen Tyree made changes -
        Attachment ZOOKEEPER-1020.patch [ 12473686 ]
        Stephen Tyree made changes -
        Attachment ZOOKEEPER-1020.patch [ 12473687 ]
        Stephen Tyree made changes -
        Field Original Value New Value
        Attachment ZOOKEEPER-1020.patch [ 12473686 ]
        Stephen Tyree created issue -

          People

          • Assignee:
            Stephen Tyree
            Reporter:
            Stephen Tyree
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development