Task.TaskReporter (Hadoop 1.2.1 API)
Date: 2013-07-22

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.mapred
Class Task.TaskReporter

    java.lang.Object
      org.apache.hadoop.mapreduce.StatusReporter
          org.apache.hadoop.mapred.Task.TaskReporter

All Implemented Interfaces:
  Runnable, Reporter, Progressable

Enclosing class:
  Task

    protected class Task.TaskReporter

extends StatusReporter
implements Runnable, Reporter

Field Summary

Fields inherited from interface org.apache.hadoop.mapred.Reporter
`NULL`

Method Summary
`Counters.Counter` | `getCounter(Enum<?> name)` Get the `Counters.Counter` of the given group with the given name.
`Counters.Counter` | `getCounter(String group, String name)` Get the `Counters.Counter` of the given group with the given name.
`InputSplit` | `getInputSplit()` Get the `InputSplit` object for a map.
`float` | `getProgress()` Get the current progress.
`void` | `incrCounter(Enum key, long amount)` Increments the counter identified by the key, which can be of any `Enum` type, by the specified amount.
`void` | `incrCounter(String group, String counter, long amount)` Increments the counter identified by the group and counter name by the specified amount.
`void` | `progress()` Report progress to the Hadoop framework.
`void` | `run()` The communication thread handles communication with the parent (Task Tracker).
`void` | `setInputSplit(InputSplit split)`
`void` | `setProgress(float progress)`
`void` | `setStatus(String status)` Set the status description for the task.
`void` | `startCommunicationThread()`
`void` | `stopCommunicationThread()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### setStatus

    public void setStatus(String status)

  Description copied from interface: `Reporter`
  Set the status description for the task.

  Specified by:
    `setStatus` in interface `Reporter`
  Specified by:
    `setStatus` in class `StatusReporter`
  Parameters:
    `status` - brief description of the current status.

### setProgress

    public void setProgress(float progress)

### getProgress

    public float getProgress()

  Description copied from class: `StatusReporter`
  Get the current progress.

  Specified by:
    `getProgress` in interface `Reporter`
  Specified by:
    `getProgress` in class `StatusReporter`
  Returns:
    a number between 0.0 and 1.0 (inclusive) indicating the attempt's progress.

### progress

    public void progress()

  Description copied from interface: `Progressable`
  Report progress to the Hadoop framework.

  Specified by:
    `progress` in interface `Progressable`
  Specified by:
    `progress` in class `StatusReporter`

### getCounter

    public Counters.Counter getCounter(String group,
                                       String name)

  Description copied from interface: `Reporter`
  Get the `Counters.Counter` of the given group with the given name.

  Specified by:
    `getCounter` in interface `Reporter`
  Specified by:
    `getCounter` in class `StatusReporter`
  Parameters:
    `group` - counter group
    `name` - counter name
  Returns:
    the `Counter` of the given group/name.

### getCounter

    public Counters.Counter getCounter(Enum<?> name)

  Description copied from interface: `Reporter`
  Get the `Counters.Counter` of the given group with the given name.

  Specified by:
    `getCounter` in interface `Reporter`
  Specified by:
    `getCounter` in class `StatusReporter`
  Parameters:
    `name` - counter name
  Returns:
    the `Counter` of the given group/name.

### incrCounter

    public void incrCounter(Enum key,
                            long amount)

  Description copied from interface: `Reporter`
  Increments the counter identified by the key, which can be of any `Enum` type, by the specified amount.

  Specified by:
    `incrCounter` in interface `Reporter`
  Parameters:
    `key` - key to identify the counter to be incremented. The key can be be any `Enum`.
    `amount` - A non-negative amount by which the counter is to be incremented.

### incrCounter

    public void incrCounter(String group,
                            String counter,
                            long amount)

  Description copied from interface: `Reporter`
  Increments the counter identified by the group and counter name by the specified amount.

  Specified by:
    `incrCounter` in interface `Reporter`
  Parameters:
    `group` - name to identify the group of the counter to be incremented.
    `counter` - name to identify the counter within the group.
    `amount` - A non-negative amount by which the counter is to be incremented.

### setInputSplit

    public void setInputSplit(InputSplit split)

### getInputSplit

    public InputSplit getInputSplit()
                             throws UnsupportedOperationException

  Description copied from interface: `Reporter`
  Get the `InputSplit` object for a map.

  Specified by:
    `getInputSplit` in interface `Reporter`
  Returns:
    the `InputSplit` that the map is reading from.
  Throws:
    `UnsupportedOperationException` - if called outside a mapper

### run

    public void run()

  The communication thread handles communication with the parent (Task Tracker). It sends progress updates if progress has been made or if the task needs to let the parent know that it's alive. It also pings the parent to see if it's alive.

  Specified by:
    `run` in interface `Runnable`

### startCommunicationThread

    public void startCommunicationThread()

### stopCommunicationThread

    public void stopCommunicationThread()
                                 throws InterruptedException

  Throws:
    `InterruptedException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation