Package com.cloudera.flume.handlers.text.FormatFactory

Examples of com.cloudera.flume.handlers.text.FormatFactory.OutputFormatBuilder


    int matchedLines;

    tmpFile = FileUtil.createTempFile("wackadoodleOutputFormatTest", ".tmp");
    tmpFile.deleteOnExit();

    FormatFactory.get().registerFormat(new OutputFormatBuilder() {

      @Override
      public String getName() {
        return "wackadoodle";
      }
View Full Code Here


    json.flush();
    o.write('\n');
  }

  public static OutputFormatBuilder builder() {
    return new OutputFormatBuilder() {

      @Override
      public OutputFormat build(String... args) {
        Preconditions.checkArgument(args.length == 0, "usage: avrojson");
View Full Code Here

    sink.append(ei);
    sink.flush();
  }

  public static OutputFormatBuilder builder() {
    return new OutputFormatBuilder() {

      @Override
      public OutputFormat build(String... args) {
        Preconditions.checkArgument(args.length <= 2, "usage: avrodata([codec, [compressionLevel]])");
View Full Code Here

    int matchedLines;

    tmpFile = File.createTempFile("wackadoodleOutputFormatTest", ".tmp");
    tmpFile.deleteOnExit();

    FormatFactory.get().registerFormat(new OutputFormatBuilder() {

      @Override
      public String getName() {
        return "wackadoodle";
      }
View Full Code Here

    for (String className : classes) {
      try {
        Class<?> cls = Class.forName(className);
        if (OutputFormatBuilder.class.isAssignableFrom(cls)) {
          OutputFormatBuilder builder = (OutputFormatBuilder) cls.newInstance();

          FormatFactory.get().registerFormat(builder.getName(), builder);

          LOG.info("Registered output format plugin " + className);
        } else {
          LOG.warn("Ignoring output format plugin class " + className
              + " - Does not subclass OutputFormatBuilder");
View Full Code Here

  public void close() throws IOException {
    enc.close();
  }

  public static OutputFormatBuilder builder() {
    return new OutputFormatBuilder() {
      @Override
      public OutputFormat build(String... args) {
        Preconditions.checkArgument(args.length == 0, "usage: avro");

        OutputFormat format = new AvroNativeFileOutputFormat();
View Full Code Here

TOP

Related Classes of com.cloudera.flume.handlers.text.FormatFactory.OutputFormatBuilder

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.