Examples of writeData()


Examples of org.apache.helix.manager.zk.ZkClient.writeData()

        {
          Thread.sleep(3000);
          final ZkClient zkClient = new ZkClient(ZK_ADDR);
          zkClient.setZkSerializer(new ZNRecordSerializer());
          zkClient.createPersistent(pathChild1, true);
          zkClient.writeData(pathChild1, record);
        }
        catch (InterruptedException e)
        {
          // TODO Auto-generated catch block
          e.printStackTrace();
View Full Code Here

Examples of org.apache.helix.manager.zk.ZkClient.writeData()

      smallRecord.setSimpleField(i + "", bufStr);
    }

    String path1 = "/" + root + "/test1";
    zkClient.createPersistent(path1, true);
    zkClient.writeData(path1, smallRecord);

    ZNRecord record = zkClient.readData(path1);
    Assert.assertTrue(serializer.serialize(record).length > 900 * 1024);

    // oversized data doesn't create any data on zk
View Full Code Here

Examples of org.apache.helix.manager.zk.ZkClient.writeData()

    }
    String path2 = "/" + root + "/test2";
    zkClient.createPersistent(path2, true);
    try
    {
      zkClient.writeData(path2, largeRecord);
      Assert.fail("Should fail because data size is larger than 1M");
    }
    catch (HelixException e)
    {
      // OK
View Full Code Here

Examples of org.apache.helix.manager.zk.ZkClient.writeData()

    // oversized write doesn't overwrite existing data on zk
    record = zkClient.readData(path1);
    try
    {
      zkClient.writeData(path1, largeRecord);
      Assert.fail("Should fail because data size is larger than 1M");
    }
    catch (HelixException e)
    {
      // OK
View Full Code Here

Examples of org.apache.helix.manager.zk.ZkClient.writeData()

      smallRecord.setSimpleField(i + "", bufStr);
    }

    String path1 = "/" + root + "/test1";
    zkClient.createPersistent(path1, true);
    zkClient.writeData(path1, smallRecord);

    ZNRecord record = zkClient.readData(path1);
    Assert.assertTrue(serializer.serialize(record).length > 900 * 1024);

    // oversized data doesn't create any data on zk
View Full Code Here

Examples of org.apache.helix.manager.zk.ZkClient.writeData()

    }
    String path2 = "/" + root + "/test2";
    zkClient.createPersistent(path2, true);
    try
    {
      zkClient.writeData(path2, largeRecord);
      Assert.fail("Should fail because data size is larger than 1M");
    }
    catch (HelixException e)
    {
      // OK
View Full Code Here

Examples of org.apache.helix.manager.zk.ZkClient.writeData()

    // oversized write doesn't overwrite existing data on zk
    record = zkClient.readData(path1);
    try
    {
      zkClient.writeData(path1, largeRecord);
      Assert.fail("Should fail because data size is larger than 1M");
    }
    catch (HelixException e)
    {
      // OK
View Full Code Here

Examples of org.apache.helix.manager.zk.ZkClient.writeData()

      smallRecord.setSimpleField(i + "", bufStr);
    }

    String path1 = "/" + root + "/test1";
    zkClient.createPersistent(path1, true);
    zkClient.writeData(path1, smallRecord);

    ZNRecord record = zkClient.readData(path1);
    Assert.assertTrue(serializer.serialize(record).length > 900 * 1024);

    // oversized data doesn't create any data on zk
View Full Code Here

Examples of org.apache.helix.manager.zk.ZkClient.writeData()

      largeRecord.setSimpleField(i + "", bufStr);
    }
    String path2 = "/" + root + "/test2";
    zkClient.createPersistent(path2, true);
    try {
      zkClient.writeData(path2, largeRecord);
      Assert.fail("Should fail because data size is larger than 1M");
    } catch (HelixException e) {
      // OK
    }
    record = zkClient.readData(path2);
View Full Code Here

Examples of org.apache.helix.manager.zk.ZkClient.writeData()

    Assert.assertNull(record);

    // oversized write doesn't overwrite existing data on zk
    record = zkClient.readData(path1);
    try {
      zkClient.writeData(path1, largeRecord);
      Assert.fail("Should fail because data size is larger than 1M");
    } catch (HelixException e) {
      // OK
    }
    ZNRecord recordNew = zkClient.readData(path1);
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.