Examples of ZNRecordJsonSerializer


Examples of com.linkedin.helix.store.ZNRecordJsonSerializer

      String path = PropertyPathConfig.getPath(PropertyType.PROPERTYSTORE, _clusterName);

      // reuse the existing zkClient because its serializer will use raw serialization
      // for paths of the property store.
      _propertyStore =
          new ZKPropertyStore<ZNRecord>(_zkClient, new ZNRecordJsonSerializer(), path);
    }

    return _propertyStore;
  }
View Full Code Here

Examples of com.linkedin.helix.store.ZNRecordJsonSerializer

      String path = PropertyPathConfig.getPath(PropertyType.PROPERTYSTORE, _clusterName);

      // reuse the existing zkClient because its serializer will use raw serialization
      // for paths of the property store.
      _propertyStore =
          new ZKPropertyStore<ZNRecord>(_zkClient, new ZNRecordJsonSerializer(), path);
    }

    return _propertyStore;
  }
View Full Code Here

Examples of org.apache.helix.store.ZNRecordJsonSerializer

  // save ideal state
  BaseDataAccessor<ZNRecord> baseAccessor = new ZkBaseDataAccessor<ZNRecord>(_gZkClient);
  HelixDataAccessor accessor = new ZKHelixDataAccessor(clusterName, baseAccessor);
  IdealState idealState = accessor.getProperty(accessor.keyBuilder().idealStates("db_11"));
  ZNRecordJsonSerializer serializer = new ZNRecordJsonSerializer();

  String tmpDir = System.getProperty("java.io.tmpdir");
  if (tmpDir == null) {
      tmpDir = "/tmp";
  }
  final String tmpIdealStateFile = tmpDir + "/" + clusterName + "_idealState.log";
  FileWriter fos = new FileWriter(tmpIdealStateFile);
  PrintWriter pw = new PrintWriter(fos);
  pw.write(new String(serializer.serialize(idealState.getRecord())));
  pw.close();

  command = "-zkSvr localhost:2183 -dropResource " + clusterName + " db_11 ";
  ClusterSetup.processCommandLineArgs(command.split("\\s+"));
View Full Code Here

Examples of org.apache.helix.store.ZNRecordJsonSerializer

    // save ideal state
    BaseDataAccessor<ZNRecord> baseAccessor = new ZkBaseDataAccessor<ZNRecord>(_gZkClient);
    HelixDataAccessor accessor = new ZKHelixDataAccessor(clusterName, baseAccessor);
    IdealState idealState = accessor.getProperty(accessor.keyBuilder().idealStates("db_11"));
    ZNRecordJsonSerializer serializer = new ZNRecordJsonSerializer();

    String tmpDir = System.getProperty("java.io.tmpdir");
    if (tmpDir == null) {
      tmpDir = "/tmp";
    }
    final String tmpIdealStateFile = tmpDir + "/" + clusterName + "_idealState.log";
    FileWriter fos = new FileWriter(tmpIdealStateFile);
    PrintWriter pw = new PrintWriter(fos);
    pw.write(new String(serializer.serialize(idealState.getRecord())));
    pw.close();

    command = "-zkSvr " + ZK_ADDR + " -dropResource " + clusterName + " db_11 ";
    ClusterSetup.processCommandLineArgs(command.split("\\s+"));
View Full Code Here

Examples of org.apache.helix.store.ZNRecordJsonSerializer

    // save ideal state
    BaseDataAccessor<ZNRecord> baseAccessor = new ZkBaseDataAccessor<ZNRecord>(_zkclient);
    HelixDataAccessor accessor = new ZKHelixDataAccessor(clusterName, baseAccessor);
    IdealState idealState = accessor.getProperty(accessor.keyBuilder().idealStates("db_11"));
    ZNRecordJsonSerializer serializer = new ZNRecordJsonSerializer();

    String tmpDir = System.getProperty("java.io.tmpdir");
    if (tmpDir == null) {
      tmpDir = "/tmp";
    }
    final String tmpIdealStateFile = tmpDir + "/" + clusterName + "_idealState.log";
    FileWriter fos = new FileWriter(tmpIdealStateFile);
    PrintWriter pw = new PrintWriter(fos);
    pw.write(new String(serializer.serialize(idealState.getRecord())));
    pw.close();

    command = "-zkSvr " + _zkaddr + " -dropResource " + clusterName + " db_11 ";
    ClusterSetup.processCommandLineArgs(command.split("\\s+"));
View Full Code Here

Examples of org.apache.helix.store.ZNRecordJsonSerializer

    public StatusDumpTimerTask(ClusterId clusterId, HelixDataAccessor accessor,
        long thresholdNoChangeInMs) {
      _accessor = accessor;
      _keyBuilder = accessor.keyBuilder();
      _baseAccessor = accessor.getBaseDataAccessor();
      _serializer = new ZNRecordJsonSerializer();
      _thresholdNoChangeInMs = thresholdNoChangeInMs;
      _clusterId = clusterId;
    }
View Full Code Here

Examples of org.apache.helix.store.ZNRecordJsonSerializer

    // save ideal state
    BaseDataAccessor<ZNRecord> baseAccessor = new ZkBaseDataAccessor<ZNRecord>(_gZkClient);
    HelixDataAccessor accessor = new ZKHelixDataAccessor(clusterName, baseAccessor);
    IdealState idealState = accessor.getProperty(accessor.keyBuilder().idealStates("db_11"));
    ZNRecordJsonSerializer serializer = new ZNRecordJsonSerializer();

    String tmpDir = System.getProperty("java.io.tmpdir");
    if (tmpDir == null) {
      tmpDir = "/tmp";
    }
    final String tmpIdealStateFile = tmpDir + "/" + clusterName + "_idealState.log";
    FileWriter fos = new FileWriter(tmpIdealStateFile);
    PrintWriter pw = new PrintWriter(fos);
    pw.write(new String(serializer.serialize(idealState.getRecord())));
    pw.close();

    command = "-zkSvr " + ZK_ADDR + " -dropResource " + clusterName + " db_11 ";
    ClusterSetup.processCommandLineArgs(command.split("\\s+"));
View Full Code Here

Examples of org.apache.helix.store.ZNRecordJsonSerializer

        _gZkClient);
    HelixDataAccessor accessor = new ZKHelixDataAccessor(clusterName,
        baseAccessor);
    IdealState idealState = accessor.getProperty(accessor.keyBuilder()
        .idealStates("db_11"));
    ZNRecordJsonSerializer serializer = new ZNRecordJsonSerializer();

    String tmpDir = System.getProperty("java.io.tmpdir");
    if (tmpDir == null)
    {
      tmpDir = "/tmp";
    }
    final String tmpIdealStateFile = tmpDir + "/" + clusterName
        + "_idealState.log";
    FileWriter fos = new FileWriter(tmpIdealStateFile);
    PrintWriter pw = new PrintWriter(fos);
    pw.write(new String(serializer.serialize(idealState.getRecord())));
    pw.close();

    command = "-zkSvr localhost:2183 -dropResource " + clusterName + " db_11 ";
    ClusterSetup.processCommandLineArgs(command.split("\\s+"));
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.