Class PartialResult<R>

Object
org.apache.spark.partial.PartialResult<R>

public class PartialResult<R> extends Object
  • Constructor Details

    • PartialResult

      public PartialResult(R initialVal, boolean isFinal)
  • Method Details

    • getFinalValue

      public R getFinalValue()
      Blocking method to wait for and return the final value.
      Returns:
      (undocumented)
    • initialValue

      public R initialValue()
    • isInitialValueFinal

      public boolean isInitialValueFinal()
    • map

      public <T> PartialResult<T> map(scala.Function1<R,T> f)
      Transform this PartialResult into a PartialResult of type T.
      Parameters:
      f - (undocumented)
      Returns:
      (undocumented)
    • onComplete

      public PartialResult<R> onComplete(scala.Function1<R,scala.runtime.BoxedUnit> handler)
      Set a handler to be called when this PartialResult completes. Only one completion handler is supported per PartialResult.
      Parameters:
      handler - (undocumented)
      Returns:
      (undocumented)
    • onFail

      public void onFail(scala.Function1<Exception,scala.runtime.BoxedUnit> handler)
      Set a handler to be called if this PartialResult's job fails. Only one failure handler is supported per PartialResult.
      Parameters:
      handler - (undocumented)
    • toString

      public String toString()
      Overrides:
      toString in class Object