Examples of AvroGenericSource


Examples of com.adgear.anoa.source.avro.AvroGenericSource

  public void execute() throws IOException {
    Schema schema = null;
    List<AvroGenericSource> sources = new ArrayList<>();
    for (InputStream in : inputStreams) {
      if (schema == null) {
        AvroGenericSource source = new AvroGenericSource(in);
        schema = source.getAvroSchema();
        sources.add(source);
      } else {
        sources.add(new AvroGenericSource(in, schema));
      }
    }
    AvroSink<GenericRecord> sink = new AvroSink<>(outputStream, schema);
    for (AvroGenericSource source : sources) {
      sink.appendAll(source);
      source.close();
    }
    sink.close();
  }
View Full Code Here

Examples of com.adgear.anoa.source.avro.AvroGenericSource

    }
  }

  private AvroProvider<GenericRecord> createInducedSource() throws IOException {
    if (inFormat == Format.AVRO) {
      AvroGenericSource avroSource = new AvroGenericSource(in);
      source = avroSource;
      return avroSource;
    }
    final AvroSource<List<String>> stringListSource;
    switch (inFormat) {
View Full Code Here

Examples of com.adgear.anoa.source.avro.AvroGenericSource

  private AvroProvider<GenericRecord> createSpecifiedSource() throws IOException {
    final Schema schema = SpecificData.get().getSchema(recordClass);
    switch (inFormat) {
      case AVRO:
        return new AvroGenericSource(in, schema);
      case MSGPACK:
        return new ValueToAvro<>(new ValueSource(in), schema);
      case JSON:
        return new JsonNodeToAvro<>(new JsonNodeSource(in), schema);
      case CSV:
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.