org.apache.flume.sink.hdfs
Class HDFSDataStream

java.lang.Object
  extended by org.apache.flume.sink.hdfs.AbstractHDFSWriter
      extended by org.apache.flume.sink.hdfs.HDFSDataStream
All Implemented Interfaces:
Configurable, HDFSWriter

public class HDFSDataStream
extends AbstractHDFSWriter


Constructor Summary
HDFSDataStream()
           
 
Method Summary
 void append(Event e)
           
 void close()
           
 void configure(Context context)
           Request the implementing class to (re)configure itself.
protected  void doOpen(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path dstPath, org.apache.hadoop.fs.FileSystem hdfs)
           
protected  org.apache.hadoop.fs.FileSystem getDfs(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path dstPath)
           
 void open(String filePath)
           
 void open(String filePath, org.apache.hadoop.io.compress.CompressionCodec codec, org.apache.hadoop.io.SequenceFile.CompressionType cType)
           
 void sync()
           
 
Methods inherited from class org.apache.flume.sink.hdfs.AbstractHDFSWriter
getFsDesiredReplication, getNumCurrentReplicas, hflushOrSync, isUnderReplicated, registerCurrentStream, unregisterCurrentStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HDFSDataStream

public HDFSDataStream()
Method Detail

configure

public void configure(Context context)
Description copied from interface: Configurable

Request the implementing class to (re)configure itself.

When configuration parameters are changed, they must be reflected by the component asap.

There are no thread safety guarrantees on when configure might be called.

Specified by:
configure in interface Configurable
Overrides:
configure in class AbstractHDFSWriter

getDfs

protected org.apache.hadoop.fs.FileSystem getDfs(org.apache.hadoop.conf.Configuration conf,
                                                 org.apache.hadoop.fs.Path dstPath)
                                          throws IOException
Throws:
IOException

doOpen

protected void doOpen(org.apache.hadoop.conf.Configuration conf,
                      org.apache.hadoop.fs.Path dstPath,
                      org.apache.hadoop.fs.FileSystem hdfs)
               throws IOException
Throws:
IOException

open

public void open(String filePath)
          throws IOException
Throws:
IOException

open

public void open(String filePath,
                 org.apache.hadoop.io.compress.CompressionCodec codec,
                 org.apache.hadoop.io.SequenceFile.CompressionType cType)
          throws IOException
Throws:
IOException

append

public void append(Event e)
            throws IOException
Throws:
IOException

sync

public void sync()
          throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Throws:
IOException


Copyright © 2009-2015 Apache Software Foundation. All Rights Reserved.