Class Commands.DumpCommand

  • All Implemented Interfaces:
    Command
    Enclosing class:
    Commands

    public static class Commands.DumpCommand
    extends CommandBase
    Information on session expirations and ephemerals. Returned map contains: - "expiry_time_to_session_ids": Map<Long, Set<Long>> time -> sessions IDs of sessions that expire at time - "session_id_to_ephemeral_paths": Map<Long, Set<String>> session ID -> ephemeral paths created by that session
    See Also:
    ZooKeeperServer.getSessionExpiryMap(), ZooKeeperServer.getEphemerals()
    • Constructor Detail

      • DumpCommand

        public DumpCommand()
    • Method Detail

      • run

        public CommandResponse run​(ZooKeeperServer zkServer,
                                   Map<String,​String> kwargs)
        Description copied from interface: Command
        Run this command. Commands take a ZooKeeperServer and String-valued keyword arguments and return a map containing any information constituting the response to the command. Commands are responsible for parsing keyword arguments and performing any error handling if necessary. Errors should be reported by setting the "error" entry of the returned map with an appropriate message rather than throwing an exception.
        kwargs - keyword -> argument value mapping
        Returns:
        Map representing response to command containing at minimum: - "command" key containing the command's primary name - "error" key containing a String error message or null if no error