Examples of ZNRecordSerializer


Examples of org.apache.helix.manager.zk.ZNRecordSerializer

    System.out.println("START " + clusterName + " at "
        + new Date(System.currentTimeMillis()));

    // init external base data accessor
    ZkClient zkclient = new ZkClient(ZK_ADDR);
    zkclient.setZkSerializer(new ZNRecordSerializer());
    ZkBaseDataAccessor<ZNRecord> extBaseAccessor =
        new ZkBaseDataAccessor<ZNRecord>(zkclient);

    // init zkCacheDataAccessor
    String curStatePath =
View Full Code Here

Examples of org.apache.helix.manager.zk.ZNRecordSerializer

    if(!_initialized && !_shutdownFlag)
    {
      LOG.error("Initializing with port " + localWebservicePort + " zkAddress: " + zkAddress);
      _localWebservicePort = localWebservicePort;
      ZkClient zkClient = new ZkClient(zkAddress);
      zkClient.setZkSerializer(new ZNRecordSerializer());
      _accessor = new ZkBaseDataAccessor<ZNRecord>(zkClient);
      _zkAddress = zkAddress;
      startServer();
    }
    else
View Full Code Here

Examples of org.apache.helix.manager.zk.ZNRecordSerializer

  public synchronized void start() throws Exception
  {
    LOG.info("helixAdminWebApp starting");
    if(_component == null)
    {
      _zkClient = new ZkClient(_zkServerAddress,  ZkClient.DEFAULT_SESSION_TIMEOUT, ZkClient.DEFAULT_CONNECTION_TIMEOUT, new ZNRecordSerializer());
      _component =  new Component();
      _component.getServers().add(Protocol.HTTP, _helixAdminPort);
      Context applicationContext = _component.getContext().createChildContext();
      applicationContext.getAttributes().put(RestAdminApplication.ZKSERVERADDRESS, _zkServerAddress);
      applicationContext.getAttributes().put(RestAdminApplication.PORT, ""+_helixAdminPort);
View Full Code Here

Examples of org.apache.helix.manager.zk.ZNRecordSerializer

    _zkServer = TestHelper.startZkSever(ZK_ADDR);
    AssertJUnit.assertTrue(_zkServer != null);
    ZKClientPool.reset();

    _gZkClient = new ZkClient(ZK_ADDR);
    _gZkClient.setZkSerializer(new ZNRecordSerializer());
    _gSetupTool = new ClusterSetup(ZK_ADDR);
   
    // start admin
    _adminThread = new AdminThread(ZK_ADDR, ADMIN_PORT);
    _adminThread.start();
View Full Code Here

Examples of org.apache.helix.manager.zk.ZNRecordSerializer

      {
        long timeDiff = nowInMs - lastModifiedTimeInMs;
        if (timeDiff > thresholdNoChangeInMs)
        {
          logger.info("Dumping status update path " + fullPath + " " + timeDiff + "MS has passed");
          _zkClient.setZkSerializer(new ZNRecordSerializer());
          ZNRecord record = _zkClient.readData(fullPath);

          // dump the node content into log file
          ObjectMapper mapper = new ObjectMapper();
          SerializationConfig serializationConfig = mapper.getSerializationConfig();
View Full Code Here

Examples of org.apache.helix.manager.zk.ZNRecordSerializer

    // add cluster {clusterName}
    ZkClient zkclient =
        new ZkClient(zkAddr,
                     ZkClient.DEFAULT_SESSION_TIMEOUT,
                     ZkClient.DEFAULT_CONNECTION_TIMEOUT,
                     new ZNRecordSerializer());
    ZKHelixAdmin admin = new ZKHelixAdmin(zkclient);
    admin.addCluster(clusterName, true);

    // add MasterSlave state mode definition
    StateModelConfigGenerator generator = new StateModelConfigGenerator();
View Full Code Here

Examples of org.apache.helix.manager.zk.ZNRecordSerializer

  public MockController(String src, String zkServer, String cluster)
  {
    srcName = src;
    clusterName = cluster;
    client = new ZkClient(zkServer);
    client.setZkSerializer(new ZNRecordSerializer());
  }
View Full Code Here

Examples of org.apache.helix.manager.zk.ZNRecordSerializer

  }

  public static void main(String[] args) throws Exception
  {
    setup();
    zkServer.getZkClient().setZkSerializer(new ZNRecordSerializer());
    ZNRecord record = zkServer.getZkClient().readData(
        HelixUtil.getIdealStatePath(clusterName, "TestDB"));

    String externalViewPath = HelixUtil.getExternalViewPath(clusterName, "TestDB");
View Full Code Here

Examples of org.apache.helix.manager.zk.ZNRecordSerializer

    // System.out.println("Number of open zkClient before ZkUnitTests: "
    // + ZkClient.getNumberOfConnections());

    _gZkClient = new ZkClient(ZK_ADDR);
    _gZkClient.setZkSerializer(new ZNRecordSerializer());
  }
View Full Code Here

Examples of org.apache.helix.manager.zk.ZNRecordSerializer

    System.out.println("START " + clusterName + " at "
        + new Date(System.currentTimeMillis()));

    // init external base data accessor
    ZkClient extZkclient = new ZkClient(ZK_ADDR);
    extZkclient.setZkSerializer(new ZNRecordSerializer());
    ZkBaseDataAccessor<ZNRecord> extBaseAccessor =
        new ZkBaseDataAccessor<ZNRecord>(extZkclient);

    // init zkCacheBaseDataAccessor
    String curStatePath =
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.