org.apache.gobblin.writer.WriterOutputFormat.name()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(123)

本文整理了Java中org.apache.gobblin.writer.WriterOutputFormat.name()方法的一些代码示例,展示了WriterOutputFormat.name()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WriterOutputFormat.name()方法的具体详情如下:
包路径:org.apache.gobblin.writer.WriterOutputFormat
类名称:WriterOutputFormat
方法名:name

WriterOutputFormat.name介绍

暂无

代码示例

代码示例来源:origin: apache/incubator-gobblin

/**
 * Get the output format of the writer of type {@link WriterOutputFormat}.
 *
 * @param branches number of forked branches
 * @param index branch index
 * @return output format of the writer
 */
public WriterOutputFormat getWriterOutputFormat(int branches, int index) {
 String writerOutputFormatValue = this.taskState.getProp(
   ForkOperatorUtils.getPropertyNameForBranch(ConfigurationKeys.WRITER_OUTPUT_FORMAT_KEY, branches, index),
   WriterOutputFormat.OTHER.name());
 log.debug("Found writer output format value = {}", writerOutputFormatValue);
 WriterOutputFormat wof = Enums.getIfPresent(WriterOutputFormat.class, writerOutputFormatValue.toUpperCase())
   .or(WriterOutputFormat.OTHER);
 log.debug("Returning writer output format = {}", wof);
 return wof;
}

代码示例来源:origin: apache/incubator-gobblin

/**
 * Write output to avro files at the given input location.
 */
@CliObjectOption(description = "Write output to Avro files. Specify the output directory as argument.")
public EmbeddedWikipediaExample avroOutput(String outputPath) {
 this.setConfiguration(ConfigurationKeys.WRITER_BUILDER_CLASS, AvroDataWriterBuilder.class.getName());
 this.setConfiguration(ConfigurationKeys.WRITER_DESTINATION_TYPE_KEY, Destination.DestinationType.HDFS.name());
 this.setConfiguration(ConfigurationKeys.WRITER_OUTPUT_FORMAT_KEY, WriterOutputFormat.AVRO.name());
 this.setConfiguration(ConfigurationKeys.WRITER_PARTITIONER_CLASS, WikipediaPartitioner.class.getName());
 this.setConfiguration(ConfigurationKeys.JOB_DATA_PUBLISHER_TYPE, BaseDataPublisher.class.getName());
 this.setConfiguration(ConfigurationKeys.CONVERTER_CLASSES_KEY, WikipediaConverter.class.getName());
 this.setConfiguration(ConfigurationKeys.DATA_PUBLISHER_FINAL_DIR, outputPath);
 return this;
}

代码示例来源:origin: apache/incubator-gobblin

jobProps.setProperty(ConfigurationKeys.TASK_LEVEL_POLICY_LIST_TYPE + ".0", "OPTIONAL,OPTIONAL");
jobProps.setProperty(ConfigurationKeys.TASK_LEVEL_POLICY_LIST_TYPE + ".1", "OPTIONAL,OPTIONAL");
jobProps.setProperty(ConfigurationKeys.WRITER_OUTPUT_FORMAT_KEY + ".0", WriterOutputFormat.AVRO.name());
jobProps.setProperty(ConfigurationKeys.WRITER_OUTPUT_FORMAT_KEY + ".1", WriterOutputFormat.AVRO.name());
jobProps.setProperty(ConfigurationKeys.WRITER_DESTINATION_TYPE_KEY + ".0", Destination.DestinationType.HDFS.name());
jobProps.setProperty(ConfigurationKeys.WRITER_DESTINATION_TYPE_KEY + ".1", Destination.DestinationType.HDFS.name());

代码示例来源:origin: apache/incubator-gobblin

jobProps.setProperty(ConfigurationKeys.TASK_LEVEL_POLICY_LIST_TYPE + ".0", "OPTIONAL,OPTIONAL");
jobProps.setProperty(ConfigurationKeys.TASK_LEVEL_POLICY_LIST_TYPE + ".1", "OPTIONAL,OPTIONAL");
jobProps.setProperty(ConfigurationKeys.WRITER_OUTPUT_FORMAT_KEY + ".0", WriterOutputFormat.AVRO.name());
jobProps.setProperty(ConfigurationKeys.WRITER_OUTPUT_FORMAT_KEY + ".1", WriterOutputFormat.AVRO.name());
jobProps.setProperty(ConfigurationKeys.WRITER_DESTINATION_TYPE_KEY + ".0", Destination.DestinationType.HDFS.name());
jobProps.setProperty(ConfigurationKeys.WRITER_DESTINATION_TYPE_KEY + ".1", Destination.DestinationType.HDFS.name());

代码示例来源:origin: org.apache.gobblin/gobblin-runtime

/**
 * Get the output format of the writer of type {@link WriterOutputFormat}.
 *
 * @param branches number of forked branches
 * @param index branch index
 * @return output format of the writer
 */
public WriterOutputFormat getWriterOutputFormat(int branches, int index) {
 String writerOutputFormatValue = this.taskState.getProp(
   ForkOperatorUtils.getPropertyNameForBranch(ConfigurationKeys.WRITER_OUTPUT_FORMAT_KEY, branches, index),
   WriterOutputFormat.OTHER.name());
 log.debug("Found writer output format value = {}", writerOutputFormatValue);
 WriterOutputFormat wof = Enums.getIfPresent(WriterOutputFormat.class, writerOutputFormatValue.toUpperCase())
   .or(WriterOutputFormat.OTHER);
 log.debug("Returning writer output format = {}", wof);
 return wof;
}

代码示例来源:origin: org.apache.gobblin/gobblin-example

/**
 * Write output to avro files at the given input location.
 */
@CliObjectOption(description = "Write output to Avro files. Specify the output directory as argument.")
public EmbeddedWikipediaExample avroOutput(String outputPath) {
 this.setConfiguration(ConfigurationKeys.WRITER_BUILDER_CLASS, AvroDataWriterBuilder.class.getName());
 this.setConfiguration(ConfigurationKeys.WRITER_DESTINATION_TYPE_KEY, Destination.DestinationType.HDFS.name());
 this.setConfiguration(ConfigurationKeys.WRITER_OUTPUT_FORMAT_KEY, WriterOutputFormat.AVRO.name());
 this.setConfiguration(ConfigurationKeys.WRITER_PARTITIONER_CLASS, WikipediaPartitioner.class.getName());
 this.setConfiguration(ConfigurationKeys.JOB_DATA_PUBLISHER_TYPE, BaseDataPublisher.class.getName());
 this.setConfiguration(ConfigurationKeys.CONVERTER_CLASSES_KEY, WikipediaConverter.class.getName());
 this.setConfiguration(ConfigurationKeys.DATA_PUBLISHER_FINAL_DIR, outputPath);
 return this;
}

相关文章