test_class.declarator: SES_TIMEOUT = 60_000
test_class.modifier: private static final
test_class.original_string: private static final int SES_TIMEOUT = 60_000;
test_class.type: int
test_class.var_name: SES_TIMEOUT
test_class.declarator: zkCluster
test_class.modifier: private
test_class.original_string: private TestingCluster zkCluster;
test_class.type: TestingCluster
test_class.var_name: zkCluster
test_class.file: modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperClientTest.java
test_class.identifier: ZookeeperClientTest
test_class.superclass: extends GridCommonAbstractTest
test_case.body: @Test
      public void testCreateAll() throws Exception {
          startZK(1);
  
          ZookeeperClient client = createClient(SES_TIMEOUT);
  
          client.createIfNeeded("/apacheIgnite", null, CreateMode.PERSISTENT);
  
          List<String> paths = new ArrayList<>();
  
          paths.add("/apacheIgnite/1");
          paths.add("/apacheIgnite/2");
          paths.add("/apacheIgnite/3");
  
          client.createAll(paths, CreateMode.PERSISTENT);
  
          assertEquals(3, client.getChildren("/apacheIgnite").size());
      }
test_case.class_method_signature: ZookeeperClientTest.testCreateAll()
test_case.full_signature: @Test public void testCreateAll()
test_case.identifier: testCreateAll
test_case.invocations: startZK createClient createIfNeeded add add add createAll assertEquals size getChildren
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCreateAll()
focal_class.declarator: DFLT_RETRY_TIMEOUT = 2000
focal_class.modifier: private static final
focal_class.original_string: private static final int DFLT_RETRY_TIMEOUT = 2000;
focal_class.type: int
focal_class.var_name: DFLT_RETRY_TIMEOUT
focal_class.declarator: DFLT_MAX_RETRY_COUNT = 10
focal_class.modifier: private static final
focal_class.original_string: private static final int DFLT_MAX_RETRY_COUNT = 10;
focal_class.type: int
focal_class.var_name: DFLT_MAX_RETRY_COUNT
focal_class.declarator: PINGER_ENABLED =
          IgniteSystemProperties.getBoolean("IGNITE_ZOOKEEPER_DISCOVERY_PINGER_ENABLED", false)
focal_class.modifier: private static final
focal_class.original_string: private static final boolean PINGER_ENABLED =
          IgniteSystemProperties.getBoolean("IGNITE_ZOOKEEPER_DISCOVERY_PINGER_ENABLED", false);
focal_class.type: boolean
focal_class.var_name: PINGER_ENABLED
focal_class.declarator: retryCount = new AtomicInteger()
focal_class.modifier: private final
focal_class.original_string: private final AtomicInteger retryCount = new AtomicInteger();
focal_class.type: AtomicInteger
focal_class.var_name: retryCount
focal_class.declarator: MAX_REQ_SIZE = 1048528
focal_class.modifier: private static final
focal_class.original_string: private static final int MAX_REQ_SIZE = 1048528;
focal_class.type: int
focal_class.var_name: MAX_REQ_SIZE
focal_class.declarator: ZK_ACL = ZooDefs.Ids.OPEN_ACL_UNSAFE
focal_class.modifier: private static final
focal_class.original_string: private static final List<ACL> ZK_ACL = ZooDefs.Ids.OPEN_ACL_UNSAFE;
focal_class.type: List<ACL>
focal_class.var_name: ZK_ACL
focal_class.declarator: EMPTY_BYTES = {}
focal_class.modifier: private static final
focal_class.original_string: private static final byte[] EMPTY_BYTES = {};
focal_class.type: byte[]
focal_class.var_name: EMPTY_BYTES
focal_class.declarator: zk
focal_class.modifier: private final
focal_class.original_string: private final ZooKeeper zk;
focal_class.type: ZooKeeper
focal_class.var_name: zk
focal_class.declarator: log
focal_class.modifier: private final
focal_class.original_string: private final IgniteLogger log;
focal_class.type: IgniteLogger
focal_class.var_name: log
focal_class.declarator: state = ConnectionState.Disconnected
focal_class.modifier: private
focal_class.original_string: private ConnectionState state = ConnectionState.Disconnected;
focal_class.type: ConnectionState
focal_class.var_name: state
focal_class.declarator: connLossTimeout
focal_class.modifier: private
focal_class.original_string: private long connLossTimeout;
focal_class.type: long
focal_class.var_name: connLossTimeout
focal_class.declarator: connStartTime
focal_class.modifier: private volatile
focal_class.original_string: private volatile long connStartTime;
focal_class.type: long
focal_class.var_name: connStartTime
focal_class.declarator: stateMux = new Object()
focal_class.modifier: private final
focal_class.original_string: private final Object stateMux = new Object();
focal_class.type: Object
focal_class.var_name: stateMux
focal_class.declarator: connLostC
focal_class.modifier: private final
focal_class.original_string: private final IgniteRunnable connLostC;
focal_class.type: IgniteRunnable
focal_class.var_name: connLostC
focal_class.declarator: connTimer
focal_class.modifier: private final
focal_class.original_string: private final Timer connTimer;
focal_class.type: Timer
focal_class.var_name: connTimer
focal_class.declarator: retryQ = new ArrayDeque<>()
focal_class.modifier: private final
focal_class.original_string: private final ArrayDeque<ZkAsyncOperation> retryQ = new ArrayDeque<>();
focal_class.type: ArrayDeque<ZkAsyncOperation>
focal_class.var_name: retryQ
focal_class.declarator: closing
focal_class.modifier: private volatile
focal_class.original_string: private volatile boolean closing;
focal_class.type: boolean
focal_class.var_name: closing
focal_class.declarator: pinger
focal_class.modifier: private volatile
focal_class.original_string: private volatile ZkPinger pinger;
focal_class.type: ZkPinger
focal_class.var_name: pinger
focal_class.file: modules/zookeeper/src/main/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperClient.java
focal_class.identifier: ZookeeperClient
focal_class.interfaces: implements Watcher
focal_class.class_method_signature: ZookeeperClient.ZookeeperClient(IgniteLogger log, String connectString, int sesTimeout, IgniteRunnable connLostC)
focal_class.full_signature:   ZookeeperClient(IgniteLogger log, String connectString, int sesTimeout, IgniteRunnable connLostC)
focal_class.identifier: ZookeeperClient
focal_class.parameters: (IgniteLogger log, String connectString, int sesTimeout, IgniteRunnable connLostC)
focal_class.signature:  ZookeeperClient(IgniteLogger log, String connectString, int sesTimeout, IgniteRunnable connLostC)
focal_class.class_method_signature: ZookeeperClient.ZookeeperClient(String igniteInstanceName,
          IgniteLogger log,
          String connectString,
          int sesTimeout,
          IgniteRunnable connLostC)
focal_class.full_signature:   ZookeeperClient(String igniteInstanceName,
          IgniteLogger log,
          String connectString,
          int sesTimeout,
          IgniteRunnable connLostC)
focal_class.identifier: ZookeeperClient
focal_class.parameters: (String igniteInstanceName,
          IgniteLogger log,
          String connectString,
          int sesTimeout,
          IgniteRunnable connLostC)
focal_class.signature:  ZookeeperClient(String igniteInstanceName,
          IgniteLogger log,
          String connectString,
          int sesTimeout,
          IgniteRunnable connLostC)
focal_class.class_method_signature: ZookeeperClient.zk()
focal_class.full_signature:  ZooKeeper zk()
focal_class.identifier: zk
focal_class.parameters: ()
focal_class.return: ZooKeeper
focal_class.signature: ZooKeeper zk()
focal_class.class_method_signature: ZookeeperClient.connected()
focal_class.full_signature:  boolean connected()
focal_class.identifier: connected
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean connected()
focal_class.class_method_signature: ZookeeperClient.pingerEnabled()
focal_class.full_signature:  boolean pingerEnabled()
focal_class.identifier: pingerEnabled
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean pingerEnabled()
focal_class.class_method_signature: ZookeeperClient.state()
focal_class.full_signature:  String state()
focal_class.identifier: state
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String state()
focal_class.class_method_signature: ZookeeperClient.process(WatchedEvent evt)
focal_class.full_signature: @Override public void process(WatchedEvent evt)
focal_class.identifier: process
focal_class.modifiers: @Override public
focal_class.parameters: (WatchedEvent evt)
focal_class.return: void
focal_class.signature: void process(WatchedEvent evt)
focal_class.class_method_signature: ZookeeperClient.notifyConnectionLost()
focal_class.full_signature: private void notifyConnectionLost()
focal_class.identifier: notifyConnectionLost
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void notifyConnectionLost()
focal_class.class_method_signature: ZookeeperClient.exists(String path)
focal_class.full_signature:  boolean exists(String path)
focal_class.identifier: exists
focal_class.parameters: (String path)
focal_class.return: boolean
focal_class.signature: boolean exists(String path)
focal_class.class_method_signature: ZookeeperClient.createAll(List<String> paths, CreateMode createMode)
focal_class.full_signature:  void createAll(List<String> paths, CreateMode createMode)
focal_class.identifier: createAll
focal_class.parameters: (List<String> paths, CreateMode createMode)
focal_class.return: void
focal_class.signature: void createAll(List<String> paths, CreateMode createMode)
focal_class.class_method_signature: ZookeeperClient.needSplitNodeData(String path, byte[] data, int overhead)
focal_class.full_signature:  boolean needSplitNodeData(String path, byte[] data, int overhead)
focal_class.identifier: needSplitNodeData
focal_class.parameters: (String path, byte[] data, int overhead)
focal_class.return: boolean
focal_class.signature: boolean needSplitNodeData(String path, byte[] data, int overhead)
focal_class.class_method_signature: ZookeeperClient.splitNodeData(String path, byte[] data, int overhead)
focal_class.full_signature:  List<byte[]> splitNodeData(String path, byte[] data, int overhead)
focal_class.identifier: splitNodeData
focal_class.parameters: (String path, byte[] data, int overhead)
focal_class.return: List<byte[]>
focal_class.signature: List<byte[]> splitNodeData(String path, byte[] data, int overhead)
focal_class.class_method_signature: ZookeeperClient.requestOverhead(String path)
focal_class.full_signature: private int requestOverhead(String path)
focal_class.identifier: requestOverhead
focal_class.modifiers: private
focal_class.parameters: (String path)
focal_class.return: int
focal_class.signature: int requestOverhead(String path)
focal_class.class_method_signature: ZookeeperClient.createIfNeeded(String path, byte[] data, CreateMode createMode)
focal_class.full_signature:  String createIfNeeded(String path, byte[] data, CreateMode createMode)
focal_class.identifier: createIfNeeded
focal_class.parameters: (String path, byte[] data, CreateMode createMode)
focal_class.return: String
focal_class.signature: String createIfNeeded(String path, byte[] data, CreateMode createMode)
focal_class.class_method_signature: ZookeeperClient.createSequential(String checkPrefix, String parentPath, String path, byte[] data, CreateMode createMode)
focal_class.full_signature:  String createSequential(String checkPrefix, String parentPath, String path, byte[] data, CreateMode createMode)
focal_class.identifier: createSequential
focal_class.parameters: (String checkPrefix, String parentPath, String path, byte[] data, CreateMode createMode)
focal_class.return: String
focal_class.signature: String createSequential(String checkPrefix, String parentPath, String path, byte[] data, CreateMode createMode)
focal_class.class_method_signature: ZookeeperClient.getChildren(String path)
focal_class.full_signature:  List<String> getChildren(String path)
focal_class.identifier: getChildren
focal_class.parameters: (String path)
focal_class.return: List<String>
focal_class.signature: List<String> getChildren(String path)
focal_class.class_method_signature: ZookeeperClient.getChildrenPaths(String path)
focal_class.full_signature:  List<String> getChildrenPaths(String path)
focal_class.identifier: getChildrenPaths
focal_class.parameters: (String path)
focal_class.return: List<String>
focal_class.signature: List<String> getChildrenPaths(String path)
focal_class.class_method_signature: ZookeeperClient.existsNoRetry(String path)
focal_class.full_signature:  boolean existsNoRetry(String path)
focal_class.identifier: existsNoRetry
focal_class.parameters: (String path)
focal_class.return: boolean
focal_class.signature: boolean existsNoRetry(String path)
focal_class.class_method_signature: ZookeeperClient.deleteIfExistsNoRetry(String path, int ver)
focal_class.full_signature:  void deleteIfExistsNoRetry(String path, int ver)
focal_class.identifier: deleteIfExistsNoRetry
focal_class.parameters: (String path, int ver)
focal_class.return: void
focal_class.signature: void deleteIfExistsNoRetry(String path, int ver)
focal_class.class_method_signature: ZookeeperClient.deleteIfExists(String path, int ver)
focal_class.full_signature:  void deleteIfExists(String path, int ver)
focal_class.identifier: deleteIfExists
focal_class.parameters: (String path, int ver)
focal_class.return: void
focal_class.signature: void deleteIfExists(String path, int ver)
focal_class.class_method_signature: ZookeeperClient.deleteAll(List<String> paths, int ver)
focal_class.full_signature:  void deleteAll(List<String> paths, int ver)
focal_class.identifier: deleteAll
focal_class.parameters: (List<String> paths, int ver)
focal_class.return: void
focal_class.signature: void deleteAll(List<String> paths, int ver)
focal_class.class_method_signature: ZookeeperClient.delete(String path, int ver)
focal_class.full_signature: private void delete(String path, int ver)
focal_class.identifier: delete
focal_class.modifiers: private
focal_class.parameters: (String path, int ver)
focal_class.return: void
focal_class.signature: void delete(String path, int ver)
focal_class.class_method_signature: ZookeeperClient.setData(String path, byte[] data, int ver)
focal_class.full_signature:  void setData(String path, byte[] data, int ver)
focal_class.identifier: setData
focal_class.parameters: (String path, byte[] data, int ver)
focal_class.return: void
focal_class.signature: void setData(String path, byte[] data, int ver)
focal_class.class_method_signature: ZookeeperClient.getData(String path, @Nullable Stat stat)
focal_class.full_signature:  byte[] getData(String path, @Nullable Stat stat)
focal_class.identifier: getData
focal_class.parameters: (String path, @Nullable Stat stat)
focal_class.return: byte[]
focal_class.signature: byte[] getData(String path, @Nullable Stat stat)
focal_class.class_method_signature: ZookeeperClient.getData(String path)
focal_class.full_signature:  byte[] getData(String path)
focal_class.identifier: getData
focal_class.parameters: (String path)
focal_class.return: byte[]
focal_class.signature: byte[] getData(String path)
focal_class.class_method_signature: ZookeeperClient.deleteIfExistsAsync(String path)
focal_class.full_signature:  void deleteIfExistsAsync(String path)
focal_class.identifier: deleteIfExistsAsync
focal_class.parameters: (String path)
focal_class.return: void
focal_class.signature: void deleteIfExistsAsync(String path)
focal_class.class_method_signature: ZookeeperClient.existsAsync(String path, Watcher watcher, AsyncCallback.StatCallback cb)
focal_class.full_signature:  void existsAsync(String path, Watcher watcher, AsyncCallback.StatCallback cb)
focal_class.identifier: existsAsync
focal_class.parameters: (String path, Watcher watcher, AsyncCallback.StatCallback cb)
focal_class.return: void
focal_class.signature: void existsAsync(String path, Watcher watcher, AsyncCallback.StatCallback cb)
focal_class.class_method_signature: ZookeeperClient.getChildrenAsync(String path, Watcher watcher, AsyncCallback.Children2Callback cb)
focal_class.full_signature:  void getChildrenAsync(String path, Watcher watcher, AsyncCallback.Children2Callback cb)
focal_class.identifier: getChildrenAsync
focal_class.parameters: (String path, Watcher watcher, AsyncCallback.Children2Callback cb)
focal_class.return: void
focal_class.signature: void getChildrenAsync(String path, Watcher watcher, AsyncCallback.Children2Callback cb)
focal_class.class_method_signature: ZookeeperClient.getDataAsync(String path, Watcher watcher, AsyncCallback.DataCallback cb)
focal_class.full_signature:  void getDataAsync(String path, Watcher watcher, AsyncCallback.DataCallback cb)
focal_class.identifier: getDataAsync
focal_class.parameters: (String path, Watcher watcher, AsyncCallback.DataCallback cb)
focal_class.return: void
focal_class.signature: void getDataAsync(String path, Watcher watcher, AsyncCallback.DataCallback cb)
focal_class.class_method_signature: ZookeeperClient.createAsync(String path, byte[] data, CreateMode createMode, AsyncCallback.StringCallback cb)
focal_class.full_signature: private void createAsync(String path, byte[] data, CreateMode createMode, AsyncCallback.StringCallback cb)
focal_class.identifier: createAsync
focal_class.modifiers: private
focal_class.parameters: (String path, byte[] data, CreateMode createMode, AsyncCallback.StringCallback cb)
focal_class.return: void
focal_class.signature: void createAsync(String path, byte[] data, CreateMode createMode, AsyncCallback.StringCallback cb)
focal_class.class_method_signature: ZookeeperClient.onCloseStart()
focal_class.full_signature:  void onCloseStart()
focal_class.identifier: onCloseStart
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void onCloseStart()
focal_class.class_method_signature: ZookeeperClient.close()
focal_class.full_signature: public void close()
focal_class.identifier: close
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: ZookeeperClient.onZookeeperError(long prevConnStartTime, Exception e)
focal_class.full_signature: private void onZookeeperError(long prevConnStartTime, Exception e)
focal_class.identifier: onZookeeperError
focal_class.modifiers: private
focal_class.parameters: (long prevConnStartTime, Exception e)
focal_class.return: void
focal_class.signature: void onZookeeperError(long prevConnStartTime, Exception e)
focal_class.class_method_signature: ZookeeperClient.needRetry(int code)
focal_class.full_signature: private boolean needRetry(int code)
focal_class.identifier: needRetry
focal_class.modifiers: private
focal_class.parameters: (int code)
focal_class.return: boolean
focal_class.signature: boolean needRetry(int code)
focal_class.class_method_signature: ZookeeperClient.closeClient()
focal_class.full_signature: private void closeClient()
focal_class.identifier: closeClient
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void closeClient()
focal_class.class_method_signature: ZookeeperClient.scheduleConnectionCheck()
focal_class.full_signature: private void scheduleConnectionCheck()
focal_class.identifier: scheduleConnectionCheck
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void scheduleConnectionCheck()
focal_class.class_method_signature: ZookeeperClient.attachPinger(ZkPinger pinger)
focal_class.full_signature:  void attachPinger(ZkPinger pinger)
focal_class.identifier: attachPinger
focal_class.parameters: (ZkPinger pinger)
focal_class.return: void
focal_class.signature: void attachPinger(ZkPinger pinger)
focal_method.body: void createAll(List<String> paths, CreateMode createMode)
          throws ZookeeperClientFailedException, InterruptedException {
          if (paths.isEmpty())
              return;
  
          List<List<Op>> batches = new LinkedList<>();
  
          int batchSize = 0;
  
          List<Op> batch = new LinkedList<>();
  
          for (String path : paths) {
              //TODO ZK: https://issues.apache.org/jira/browse/IGNITE-8187
              int size = requestOverhead(path) + 48 /* overhead */;
  
              assert size <= MAX_REQ_SIZE;
  
              if (batchSize + size > MAX_REQ_SIZE) {
                  batches.add(batch);
  
                  batch = new LinkedList<>();
  
                  batchSize = 0;
              }
  
              batch.add(Op.create(path, EMPTY_BYTES, ZK_ACL, createMode));
  
              batchSize += size;
          }
  
          batches.add(batch);
  
          for (List<Op> ops : batches) {
              for (;;) {
                  long connStartTime = this.connStartTime;
  
                  try {
                      zk.multi(ops);
  
                      break;
                  }
                  catch (KeeperException.NodeExistsException e) {
                      if (log.isDebugEnabled())
                          log.debug("Failed to create nodes using bulk operation: " + e);
  
                      for (Op op : ops)
                          createIfNeeded(op.getPath(), null, createMode);
  
                      break;
                  }
                  catch (Exception e) {
                      onZookeeperError(connStartTime, e);
                  }
              }
          }
      }
focal_method.class_method_signature: ZookeeperClient.createAll(List<String> paths, CreateMode createMode)
focal_method.full_signature:  void createAll(List<String> paths, CreateMode createMode)
focal_method.identifier: createAll
focal_method.invocations: isEmpty requestOverhead add add create add multi isDebugEnabled debug createIfNeeded getPath onZookeeperError
focal_method.parameters: (List<String> paths, CreateMode createMode)
focal_method.return: void
focal_method.signature: void createAll(List<String> paths, CreateMode createMode)