gr.uoa.di.madgik.grs.test
Class WriterFileThread

java.lang.Object
  extended by java.lang.Thread
      extended by gr.uoa.di.madgik.grs.test.WriterFileThread
All Implemented Interfaces:
java.lang.Runnable

public class WriterFileThread
extends java.lang.Thread

Writer test class

Author:
gpapanikos

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 RecordWriter<GenericRecord> writer
          The writer that is used
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
WriterFileThread(IWriterProxy proxy, int itemsToProduce, int disposePrematurely, long timeoutLifecycle, java.util.concurrent.TimeUnit timeunitLifecycle, java.lang.String fileName, IBuffer.TransportDirective directive, boolean doCompress, int capacity)
          Create writer
 
Method Summary
 void prepare()
          Initialize the writer
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

writer

public RecordWriter<GenericRecord> writer
The writer that is used

Constructor Detail

WriterFileThread

public WriterFileThread(IWriterProxy proxy,
                        int itemsToProduce,
                        int disposePrematurely,
                        long timeoutLifecycle,
                        java.util.concurrent.TimeUnit timeunitLifecycle,
                        java.lang.String fileName,
                        IBuffer.TransportDirective directive,
                        boolean doCompress,
                        int capacity)
Create writer

Parameters:
proxy - the proxy to use to publish
itemsToProduce - the number of items to produce
disposePrematurely - if the reader should dispose before completing
timeoutLifecycle - lifecycle timeout
timeunitLifecycle - lifecycle time unit
fileName - the file name to include in field
directive - the record directive
doCompress - do compression in transport
capacity - the buffer capacity
Method Detail

prepare

public void prepare()
Initialize the writer


run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread