@ 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 ; }
Write output to avro files at the given input location .