## org.apache.hadoop.util
Class Progress

    java.lang.Object
      org.apache.hadoop.util.Progress

    public class Progress

extends Object

Utility to assist with generation of progress reports. Applications build a hierarchy of `Progress` instances, each modelling a phase of execution. The root is constructed with `Progress()`. Nodes for sub-phases are created by calling `addPhase()`.

Constructor Summary
`Progress()` Creates a new root node.

Method Summary
`Progress` `addPhase()` Adds a node to the tree.
`Progress` `addPhase(String status)` Adds a named node to the tree.
`void` `complete()` Completes this node, moving the parent node to its next child.
`float` `get()` Returns the overall progress of the root.
`Progress` `phase()` Returns the current sub-node executing.
`void` `set(float progress)` Called during execution on a leaf node to set its progress.
`void` `setStatus(String status)`
`void` `startNextPhase()` Called during execution to move to the next phase at this level in the tree.
`String` `toString()`

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

Constructor Detail

### Progress

    public Progress()

  Creates a new root node.

Method Detail

### addPhase

    public Progress addPhase(String status)

  Adds a named node to the tree.

### addPhase

    public Progress addPhase()

  Adds a node to the tree.

### startNextPhase

    public void startNextPhase()

  Called during execution to move to the next phase at this level in the tree.

### phase

    public Progress phase()

  Returns the current sub-node executing.

### complete

    public void complete()

  Completes this node, moving the parent node to its next child.

### set

    public void set(float progress)

  Called during execution on a leaf node to set its progress.

### get

    public float get()

  Returns the overall progress of the root.

### setStatus

    public void setStatus(String status)

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Copyright © 2009 The Apache Software Foundation