Examples of AvroFileTarget


Examples of org.apache.crunch.io.avro.AvroFileTarget

   *
   * @param path The {@code Path} to write the data to
   * @return A new {@code Target} instance
   */
  public static Target avroFile(Path path) {
    return new AvroFileTarget(path);
  }
View Full Code Here

Examples of org.apache.crunch.io.avro.AvroFileTarget

  public TrevniKeySourceTarget(Path path, AvroType<T> atype) {
    this(path, atype, new SequentialFileNamingScheme());
  }

  public TrevniKeySourceTarget(Path path, AvroType<T> atype, FileNamingScheme fileNamingScheme) {
    super(new TrevniKeySource(path, atype), new AvroFileTarget(path), fileNamingScheme);
  }
View Full Code Here

Examples of org.apache.crunch.io.avro.AvroFileTarget

   *
   * @param path The {@code Path} to write the data to
   * @return A new {@code Target} instance
   */
  public static Target avroFile(Path path) {
    return new AvroFileTarget(path);
  }
View Full Code Here

Examples of org.apache.crunch.io.avro.AvroFileTarget

      @Override
      public Pair<String, Person> map(final String input) {
        return new Pair<String, Person>("first name", null);
      }
    }, Avros.tableOf(Avros.strings(), Avros.records(Person.class)))
        .write(new AvroFileTarget(outDir), Target.WriteMode.APPEND);

    p.done();
  }
View Full Code Here

Examples of org.apache.crunch.io.avro.AvroFileTarget

  public TrevniKeySourceTarget(Path path, AvroType<T> atype) {
    this(path, atype, SequentialFileNamingScheme.getInstance());
  }

  public TrevniKeySourceTarget(Path path, AvroType<T> atype, FileNamingScheme fileNamingScheme) {
    super(new TrevniKeySource(path, atype), new AvroFileTarget(path), fileNamingScheme);
  }
View Full Code Here

Examples of org.apache.crunch.io.avro.AvroFileTarget

  public static Target avroFile(String pathName) {
    return avroFile(new Path(pathName));
  }

  public static Target avroFile(Path path) {
    return new AvroFileTarget(path);
  }
View Full Code Here

Examples of org.apache.crunch.io.avro.AvroFileTarget

   *
   * @param path The {@code Path} to write the data to
   * @return A new {@code Target} instance
   */
  public static Target avroFile(Path path) {
    return new AvroFileTarget(path);
  }
View Full Code Here

Examples of org.apache.crunch.io.avro.AvroFileTarget

    if (directory != null) {
      final Format format = dataset.getDescriptor().getFormat();
      if (Formats.PARQUET.equals(format)) {
        return new AvroParquetFileTarget(directory);
      } else if (Formats.AVRO.equals(format)) {
        return new AvroFileTarget(directory);
      } else {
        throw new UnsupportedOperationException(
            "Not a supported format: " + format);
      }
    }
View Full Code Here

Examples of org.apache.crunch.io.avro.AvroFileTarget

  public static Target avroFile(String pathName) {
    return avroFile(new Path(pathName));
  }

  public static Target avroFile(Path path) {
    return new AvroFileTarget(path);
  }
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.