Package com.cloudera.flume.handlers.text.output

Examples of com.cloudera.flume.handlers.text.output.OutputFormat


      @Override
      public EventSink build(Context context, String... argv) {
        Preconditions.checkArgument(argv.length <= 1,
            "usage: console[(format)]");
        OutputFormat fmt = DebugOutputFormat.builder().build();
        if (argv.length >= 1) {
          // TODO (jon) handle formats with arguments. Requires language update.
          try {
            fmt = FormatFactory.get().getOutputFormat(argv[0]);
          } catch (FlumeSpecException e) {
View Full Code Here


          throw new IllegalArgumentException(
          "usage: customdfs(\"[(hdfs|file|s3n|...)://namenode[:port]]/path\", \"format\")");
        }

        String format = (args.length == 1) ? null : args[1];
        OutputFormat fmt;
        try {
          fmt = FormatFactory.get().getOutputFormat(format);
        } catch (FlumeSpecException e) {
          LOG.error("failed to load format " + format, e);
          throw new IllegalArgumentException("failed to load format " + format);
View Full Code Here

    return new SinkBuilder() {
      @Override
      public EventSink build(Context context, String... args) {
        Preconditions.checkArgument(args.length >= 1 && args.length <= 2,
            "usage: text(filename[,format])");
        OutputFormat fmt = DebugOutputFormat.builder().build();
        if (args.length >= 2) {
          try {
            fmt = FormatFactory.get().getOutputFormat(args[1]);
          } catch (FlumeSpecException e) {
            LOG.error("Illegal output format " + args[1], e);
View Full Code Here

TOP

Related Classes of com.cloudera.flume.handlers.text.output.OutputFormat

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.