@InterfaceAudience.Private public class StartupProgressView extends Object
StartupProgress.createView()
to clone current startup progress state.
Subsequent updates to startup progress will not alter the view. This isolates
the reader from ongoing updates and establishes a guarantee that the values
returned by the view are consistent and unchanging across multiple related
read operations. Calculations that require aggregation, such as overall
percent complete, will not be impacted by mutations performed in other threads
mid-way through the calculation.
Methods that return primitive long may return Long.MIN_VALUE
as a
sentinel value to indicate that the property is undefined.Modifier and Type | Method and Description |
---|---|
long |
getCount(Phase phase)
Returns the sum of the counter values for all steps in the specified phase.
|
long |
getCount(Phase phase,
Step step)
Returns the counter value for the specified phase and step.
|
long |
getElapsedTime()
Returns overall elapsed time, calculated as time between start of loading
fsimage and end of safemode.
|
long |
getElapsedTime(Phase phase)
Returns elapsed time for the specified phase, calculated as (end - begin) if
phase is complete or (now - begin) if phase is running or 0 if the phase is
still pending.
|
long |
getElapsedTime(Phase phase,
Step step)
Returns elapsed time for the specified phase and step, calculated as
(end - begin) if step is complete or (now - begin) if step is running or 0
if the step is still pending.
|
String |
getFile(Phase phase)
Returns the optional file name associated with the specified phase, possibly
null.
|
float |
getPercentComplete()
Returns overall percent complete, calculated by aggregating percent complete
of all phases.
|
float |
getPercentComplete(Phase phase)
Returns percent complete for the specified phase, calculated by aggregating
the counter values and totals for all steps within the phase.
|
float |
getPercentComplete(Phase phase,
Step step)
Returns percent complete for the specified phase and step, calculated as
counter value divided by total.
|
Iterable<Phase> |
getPhases()
Returns all phases.
|
long |
getSize(Phase phase)
Returns the optional size in bytes associated with the specified phase,
possibly Long.MIN_VALUE if undefined.
|
Status |
getStatus(Phase phase)
Returns the current run status of the specified phase.
|
Iterable<Step> |
getSteps(Phase phase)
Returns all steps within a phase.
|
long |
getTotal(Phase phase)
Returns the sum of the totals for all steps in the specified phase.
|
long |
getTotal(Phase phase,
Step step)
Returns the total for the specified phase and step.
|
public long getCount(Phase phase)
phase
- Phase to getpublic long getCount(Phase phase, Step step)
phase
- Phase to getstep
- Step to getpublic long getElapsedTime()
public long getElapsedTime(Phase phase)
phase
- Phase to getpublic long getElapsedTime(Phase phase, Step step)
phase
- Phase to getstep
- Step to getpublic String getFile(Phase phase)
phase
- Phase to getpublic float getPercentComplete()
public float getPercentComplete(Phase phase)
phase
- Phase to getpublic float getPercentComplete(Phase phase, Step step)
phase
- Phase to getstep
- Step to getpublic Iterable<Phase> getPhases()
public Iterable<Step> getSteps(Phase phase)
phase
- Phase to getpublic long getSize(Phase phase)
phase
- Phase to getpublic Status getStatus(Phase phase)
phase
- Phase to getpublic long getTotal(Phase phase)
phase
- Phase to getCopyright © 2013 Apache Software Foundation. All rights reserved.