org.apache.hadoop.mapred
Class ReduceTask.ReduceCopier.MapOutputCopier

java.lang.Object
  extended by java.lang.Thread
      extended by org.apache.hadoop.mapred.ReduceTask.ReduceCopier.MapOutputCopier
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
ReduceTask.ReduceCopier<K,V>

public class ReduceTask.ReduceCopier.MapOutputCopier
extends java.lang.Thread

Copies map outputs as they become available


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ReduceTask.ReduceCopier.MapOutputCopier(JobConf job, Reporter reporter, javax.crypto.SecretKey jobTokenSecret)
           
 
Method Summary
 boolean fail()
          Fail the current file that we are fetching
 ReduceTask.ReduceCopier.MapOutputLocation getLocation()
          Get the current map output location.
protected  java.net.HttpURLConnection openConnection(java.net.URL url)
           
 void run()
          Loop forever and fetch map outputs as they become available.
 java.io.InputStream setupSecureConnection(ReduceTask.ReduceCopier.MapOutputLocation mapOutputLoc, java.net.URLConnection connection)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReduceTask.ReduceCopier.MapOutputCopier

public ReduceTask.ReduceCopier.MapOutputCopier(JobConf job,
                                               Reporter reporter,
                                               javax.crypto.SecretKey jobTokenSecret)
Method Detail

fail

public boolean fail()
Fail the current file that we are fetching

Returns:
were we currently fetching?

getLocation

public ReduceTask.ReduceCopier.MapOutputLocation getLocation()
Get the current map output location.


run

public void run()
Loop forever and fetch map outputs as they become available. The thread exits when it is interrupted by ReduceTaskRunner

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

openConnection

protected java.net.HttpURLConnection openConnection(java.net.URL url)
                                             throws java.io.IOException
Throws:
java.io.IOException

setupSecureConnection

public java.io.InputStream setupSecureConnection(ReduceTask.ReduceCopier.MapOutputLocation mapOutputLoc,
                                                 java.net.URLConnection connection)
                                          throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2009 The Apache Software Foundation