Package com.datasalt.pangool.serialization

Examples of com.datasalt.pangool.serialization.HadoopSerialization


  public void setConf(Configuration conf) {
    buf1 = new DataOutputBuffer();
    buf2 = new DataOutputBuffer();
   
    try {
      hadoopSer = new HadoopSerialization(conf);
    } catch(IOException e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here


  public AvroRecordToTupleConverter(org.apache.avro.Schema avroSchema,Configuration conf){
    this.avroSchema = avroSchema;
    this.pangoolSchema = AvroUtils.toPangoolSchema(avroSchema);
    this.conf = conf;
    try{
      this.hadoopSer = new HadoopSerialization(conf);
    } catch(IOException e){
      throw new PangoolRuntimeException(e);
    }
   
    this.customDeserializers = SerializationInfo.getDeserializers(pangoolSchema);
View Full Code Here

  public TupleToAvroRecordConverter(Schema pangoolSchema,Configuration conf){
    this.pangoolSchema = pangoolSchema;
    this.avroSchema = AvroUtils.toAvroSchema(pangoolSchema);
    this.conf = conf;
    try{
      this.hadoopSer = new HadoopSerialization(conf);
    } catch(IOException e){
      throw new PangoolRuntimeException(e);
    }
    this.customSerializers = SerializationInfo.getSerializers(pangoolSchema);
    initBuffers();
View Full Code Here

  @Override
  public void setConf(Configuration conf) {
    this.conf = conf;
    try {
      this.ser = new HadoopSerialization(conf);
    } catch(IOException e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

  public void setConf(Configuration conf) {
    buf1 = new DataOutputBuffer();
    buf2 = new DataOutputBuffer();
   
    try {
      ser = new HadoopSerialization(conf);
    } catch(IOException e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

    Path file = getDefaultWorkFile(context, "");
    writer
        .create(avroSchema, file.getFileSystem(context.getConfiguration()).create(file));

    return new TupleRecordWriter(avroSchema, pangoolOutputSchema, writer,
        new HadoopSerialization(conf));
  }
View Full Code Here

      innerWriter = SequenceFile.createWriter(fs, conf, name, UNUSED, UNUSED, compressionType, codec, progress,metadata);
      init(conf, schema);
    }

    private void init(Configuration conf, Schema schema) throws IOException {
      HadoopSerialization hadoopSer = new HadoopSerialization(conf);
      this.ser = new SimpleTupleSerializer(schema, hadoopSer, conf);
      this.outputBuffer = new DataOutputBuffer();
      ser.open(outputBuffer);
    }
View Full Code Here

    public Reader(FileSystem fs, Schema targetSchema, Configuration conf, Path file) throws IOException {
      this.file = file;
      innerReader = new SequenceFile.Reader(fs, file, conf);
      loadSchema();

      HadoopSerialization ser = new HadoopSerialization(conf);
      if(targetSchema != null) {
        this.deser = new SimpleTupleDeserializer(schema, targetSchema, ser, conf);
        this.tuple = new Tuple(targetSchema);
      } else {
        this.deser = new SimpleTupleDeserializer(schema, ser, conf);       
View Full Code Here

  @Override
  public void setConf(Configuration conf) {
    this.conf = conf;
    try {
      this.ser = new HadoopSerialization(conf);
    } catch(IOException e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

  public AvroRecordToTupleConverter(org.apache.avro.Schema avroSchema, Configuration conf) {
    this.avroSchema = avroSchema;
    this.pangoolSchema = AvroUtils.toPangoolSchema(avroSchema);
    this.conf = conf;
    try {
      this.hadoopSer = new HadoopSerialization(conf);
    } catch(IOException e) {
      throw new PangoolRuntimeException(e);
    }

    this.customDeserializers = SerializationInfo.getDeserializers(pangoolSchema, conf);
View Full Code Here

TOP

Related Classes of com.datasalt.pangool.serialization.HadoopSerialization

Copyright © 2018 www.massapicom. 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.