Package com.linkedin.helix.manager.zk

Examples of com.linkedin.helix.manager.zk.ZNRecordSerializer.serialize()


    String node = "node";
    ZNRecord record = new ZNRecord(node);
    record.setSimpleFields(map);

    ZNRecordSerializer serializer = new ZNRecordSerializer();
    int bytesPerNode = serializer.serialize(record).length;
    System.out.println("use znode of size " + bytesPerNode / 1024 + "K");
    Assert.assertTrue(bytesPerNode < 1024 * 1024,
                      "zookeeper has a default 1M limit on size");

    // test getPropertyRootNamespace()
View Full Code Here


      }
      record.getMapFields().put(key, map);
    }

    ZNRecordSerializer serializer = new ZNRecordSerializer();
    System.out.println(new String(serializer.serialize(record)));
  }
}
View Full Code Here

  public static void main(String[] args)
  {
    ZNRecordSerializer serializer = new ZNRecordSerializer();
    StateModelConfigGenerator generator = new StateModelConfigGenerator();
    System.out.println(new String(serializer.serialize(generator.generateConfigForMasterSlave())));
  }

  /**
   * count -1 dont care any numeric value > 0 will be tried to be satisfied based on
   * priority N all nodes in the cluster will be assigned to this state if possible R all
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.