Examples of newKryo()


Examples of com.twitter.chill.KryoInstantiator.newKryo()

public class BlizzardKryoFactory implements IKryoFactory {
  public Kryo getKryo(Map conf) {
    KryoInstantiator kryoInst;
    try {
      kryoInst = new ConfiguredInstantiator(new JavaMapConfig(conf));
      return kryoInst.newKryo();
    }
    catch(ConfigurationException cx) { throw new RuntimeException(cx); }
  }
  public void preRegister(Kryo k, Map conf) { }
  public void postRegister(Kryo k, Map conf) { }
View Full Code Here

Examples of com.twitter.chill.KryoInstantiator.newKryo()

      catch(ClassNotFoundException x) {
        throw new ConfigurationException("Could not find class for: " + parts[0], x);
      }

      if(parts.length == 2) {
        delegate = deserialize(reflected.newKryo(), parts[1]);
        if(null == delegate) {
          throw new ConfigurationException("Null delegate from: " + parts[1]);
        }
      }
      else {
View Full Code Here

Examples of com.twitter.chill.KryoInstantiator.newKryo()

   * Only use this mode if reflection alone will not work.
   */
  public static void setSerialized(Config conf, Class<? extends KryoInstantiator> reflector, KryoInstantiator ki)
    throws ConfigurationException {
    KryoInstantiator refki = reflect(reflector, conf);
    String kistr = serialize(refki.newKryo(), ki);
    // Verify, that deserialization works:
    KryoInstantiator deser = deserialize(refki.newKryo(), kistr); // ignore the result, just see if it throws
    deser.newKryo(); // just see if we can still create it
    conf.set(KEY, reflector.getName() + ":" + kistr);
  }
View Full Code Here

Examples of com.twitter.chill.KryoInstantiator.newKryo()

    throws ConfigurationException {
    KryoInstantiator refki = reflect(reflector, conf);
    String kistr = serialize(refki.newKryo(), ki);
    // Verify, that deserialization works:
    KryoInstantiator deser = deserialize(refki.newKryo(), kistr); // ignore the result, just see if it throws
    deser.newKryo(); // just see if we can still create it
    conf.set(KEY, reflector.getName() + ":" + kistr);
  }

  protected static KryoInstantiator deserialize(Kryo k, String base64Value) throws ConfigurationException {
    try {
View Full Code Here

Examples of com.twitter.chill.KryoInstantiator.newKryo()

    @Override
    public void setConf(Configuration conf) {
      try {
        KryoInstantiator kryoInst = new ConfiguredInstantiator(new HadoopConfig(conf));
        testKryo = kryoInst.newKryo();
        kryoPool = KryoPool.withByteArrayOutputStream(MAX_CACHED_KRYO, kryoInst);
      }
      catch(ConfigurationException cx) {
        // This interface can't throw
        throw new RuntimeException(cx);
View Full Code Here

Examples of com.twitter.chill.config.ConfiguredInstantiator.newKryo()

    @Override
    public void setConf(Configuration conf) {
      try {
        KryoInstantiator kryoInst = new ConfiguredInstantiator(new HadoopConfig(conf));
        testKryo = kryoInst.newKryo();
        kryoPool = KryoPool.withByteArrayOutputStream(MAX_CACHED_KRYO, kryoInst);
      }
      catch(ConfigurationException cx) {
        // This interface can't throw
        throw new RuntimeException(cx);
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.