com.cloudera.api.model
Class ApiParcelState

java.lang.Object
  extended by com.cloudera.api.model.ApiParcelState

public class ApiParcelState
extends Object

The ApiParcelState encapsulates the state of a parcel while it is in transition and reports any errors that may have occurred..

The complete progress of a parcel is broken up into two different reporting indicators - progress and count. Progress is the primary indicator that reports the global state of transitions. For example, when downloading, progress and totalProgress will show the current number of bytes downloaded and the total number of bytes needed to be downloaded respectively.

The count and totalCount indicator is used when a state transition affects multiple hosts. The count and totalCount show the current number of hosts completed and the total number of hosts respectively. For example, during distribution, the progress and totalProgress will show how many bytes have been transferred to each host and the count will indicate how many hosts of of totalCount have had parcels unpacked.

Along with the two progress indicators, the ApiParcelState shows both errors and warnings that may have turned up during a state transition.


Constructor Summary
ApiParcelState()
           
 
Method Summary
 boolean equals(Object o)
           
 long getCount()
          The current hosts that have completed.
 List<String> getErrors()
          The errors that exist for this parcel.
 long getProgress()
          The progress of the state transition.
 long getTotalCount()
          The total amount that getCount() needs to get to.
 long getTotalProgress()
          The total amount that getProgress() needs to get to.
 List<String> getWarnings()
          The warnings that exist for this parcel.
 int hashCode()
           
 void setCount(long count)
           
 void setErrors(List<String> errors)
           
 void setProgress(long progress)
           
 void setTotalCount(long totalCount)
           
 void setTotalProgress(long totalProgress)
           
 void setWarnings(List<String> warnings)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApiParcelState

public ApiParcelState()
Method Detail

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getProgress

public long getProgress()
The progress of the state transition.


setProgress

public void setProgress(long progress)

getTotalProgress

public long getTotalProgress()
The total amount that getProgress() needs to get to.


setTotalProgress

public void setTotalProgress(long totalProgress)

getCount

public long getCount()
The current hosts that have completed.


setCount

public void setCount(long count)

getTotalCount

public long getTotalCount()
The total amount that getCount() needs to get to.


setTotalCount

public void setTotalCount(long totalCount)

getErrors

public List<String> getErrors()
The errors that exist for this parcel.


setErrors

public void setErrors(List<String> errors)

getWarnings

public List<String> getWarnings()
The warnings that exist for this parcel.


setWarnings

public void setWarnings(List<String> warnings)


Copyright © Cloudera, Inc. Released under Apache License, Version 2.0.