Examples of notifyNewTableLayout()


Examples of org.kiji.schema.layout.impl.ZooKeeperMonitor.notifyNewTableLayout()

    final String layout1 = "layout-id-1";
    final String layout2 = "layout-id-2";
    ZooKeeperMonitor zkMonitor =
        new ZooKeeperMonitor(ZooKeeperClient.getZooKeeperClient(getZKAddress()));

    zkMonitor.notifyNewTableLayout(tableURI, Bytes.toBytes(layout1), -1);

    BlockingQueue<String> layoutQueue = Queues.newSynchronousQueue();
    TableLayoutTracker tracker = new TableLayoutTracker(mZKClient, tableURI,
        new QueuingTableLayoutUpdateHandler(layoutQueue));
    try {
View Full Code Here

Examples of org.kiji.schema.layout.impl.ZooKeeperMonitor.notifyNewTableLayout()

        new QueuingTableLayoutUpdateHandler(layoutQueue));
    try {
      tracker.start();
      Assert.assertEquals(layout1, layoutQueue.poll(5, TimeUnit.SECONDS));

      zkMonitor.notifyNewTableLayout(tableURI, Bytes.toBytes(layout2), -1);
      Assert.assertEquals(layout2, layoutQueue.poll(5, TimeUnit.SECONDS));
    } finally {
      tracker.close();
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.