com.cloudera.sqoop.util
Class LoggingAsyncSink

java.lang.Object
  extended by com.cloudera.sqoop.util.AsyncSink
      extended by com.cloudera.sqoop.util.LoggingAsyncSink

public class LoggingAsyncSink
extends AsyncSink

An AsyncSink that takes the contents of a stream and writes it to log4j.


Field Summary
static org.apache.commons.logging.Log LOG
           
 
Constructor Summary
LoggingAsyncSink(org.apache.commons.logging.Log context)
           
 
Method Summary
 int join()
          Wait until the stream has been processed.
 void processStream(java.io.InputStream is)
          Create and run a thread to handle input from the provided InputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
Constructor Detail

LoggingAsyncSink

public LoggingAsyncSink(org.apache.commons.logging.Log context)
Method Detail

processStream

public void processStream(java.io.InputStream is)
Description copied from class: AsyncSink
Create and run a thread to handle input from the provided InputStream. When processStream returns, the thread should be running; it should continue to run until the InputStream is exhausted.

Specified by:
processStream in class AsyncSink

join

public int join()
         throws java.lang.InterruptedException
Description copied from class: AsyncSink
Wait until the stream has been processed.

Specified by:
join in class AsyncSink
Returns:
a status code indicating success or failure. 0 is typical for success.
Throws:
java.lang.InterruptedException


Copyright © 2010 Cloudera, Inc.