Package org.apache.flume.sink

Examples of org.apache.flume.sink.FlumeFormatter


        BucketWriter bucketWriter = sfWriters.get(realPath);

        // we haven't seen this file yet, so open it and cache the handle
        if (bucketWriter == null) {
          HDFSWriter hdfsWriter = writerFactory.getWriter(fileType);
          FlumeFormatter formatter = HDFSFormatterFactory
              .getFormatter(writeFormat);

          WriterCallback idleCallback = null;
          if(idleTimeout != 0) {
            idleCallback = new WriterCallback() {
View Full Code Here


        BucketWriter bucketWriter = sfWriters.get(realPath);

        // we haven't seen this file yet, so open it and cache the handle
        if (bucketWriter == null) {
          HDFSWriter hdfsWriter = writerFactory.getWriter(fileType);
          FlumeFormatter formatter = HDFSFormatterFactory
              .getFormatter(writeFormat);

          bucketWriter = new BucketWriter(rollInterval, rollSize, rollCount,
              batchSize, context, realPath, codeC, compType, hdfsWriter,
              formatter, timedRollerPool, proxyTicket, sinkCounter);
View Full Code Here

        BucketWriter bw = sfWriters.get(realPath);

        // we haven't seen this file yet, so open it and cache the handle
        if (bw == null) {
          HDFSWriter writer = myWriterFactory.getWriter(fileType);
          FlumeFormatter formatter = HDFSFormatterFactory
              .getFormatter(writeFormat);
          bw = new BucketWriter(rollInterval, rollSize, rollCount, batchSize);
          bw.open(realPath, codeC, compType, writer, formatter);
          sfWriters.put(realPath, bw);
        }
View Full Code Here

        BucketWriter bw = sfWriters.get(realPath);

        // we haven't seen this file yet, so open it and cache the handle
        if (bw == null) {
          HDFSWriter writer = myWriterFactory.getWriter(fileType);
          FlumeFormatter formatter = HDFSFormatterFactory
              .getFormatter(writeFormat);
          bw = new BucketWriter(rollInterval, rollSize, rollCount, batchSize);
          bw.open(realPath, codeC, compType, writer, formatter);
          sfWriters.put(realPath, bw);
        }
View Full Code Here

    Path path = new Path(fileURI);
    FileSystem fs = path.getFileSystem(conf); // get FS with our conf cached
    CompressionCodecFactory factory = new CompressionCodecFactory(conf);

    HDFSCompressedDataStream writer = new HDFSCompressedDataStream();
    FlumeFormatter fmt = new HDFSTextFormatter();
    writer.open(fileURI, factory.getCodec(new Path(fileURI)),
        SequenceFile.CompressionType.BLOCK, fmt);
    String body = "yarf!";
    Event evt = EventBuilder.withBody(body, Charsets.UTF_8);
    writer.append(evt, fmt);
View Full Code Here

        // we haven't seen this file yet, so open it and cache the handle
        if (bucketWriter == null) {

          HDFSWriter hdfsWriter = writerFactory.getWriter(fileType);
          FlumeFormatter formatter = HDFSFormatterFactory
              .getFormatter(writeFormat);

          bucketWriter = new BucketWriter(rollInterval, rollSize, rollCount,
              batchSize, context, realPath, codeC, compType, hdfsWriter,
              formatter);
View Full Code Here

TOP

Related Classes of org.apache.flume.sink.FlumeFormatter

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.