eu.stratosphere.sopremo.testing

Class SopremoTestPlan

    • Method Detail

      • getActualOutput

        public SopremoTestPlan.ActualOutput getActualOutput(int index)
        Returns the output of the operator that is associated with the given index. The return value is only meaningful after a run().
        Parameters:
        index - the index of the operator
        Returns:
        the output of the execution of the specified operator
      • getActualOutputForStream

        public SopremoTestPlan.ActualOutput getActualOutputForStream(JsonStream stream)
        Returns the output of the operator that is associated with the given JsonStream. The return value is only meaningful after a run(). Should no operator have an association with the given stream: null will be returned.
        Parameters:
        stream - the stream
        Returns:
        the output of the execution of the specified operator
      • getExpectedOutput

        public SopremoTestPlan.ExpectedOutput getExpectedOutput(int index)
        Returns the expected output of the operator that is associated with the given index.
        Parameters:
        index - the index of the operator
        Returns:
        the expected output
      • getExpectedOutputForStream

        public SopremoTestPlan.ExpectedOutput getExpectedOutputForStream(JsonStream stream)
        Returns the expected output of the operator that is associated with the given JsonStream.
        Parameters:
        stream - the stream
        Returns:
        the expected output
      • getInput

        public SopremoTestPlan.Input getInput(int index)
        Returns the input for the given index.
        Parameters:
        index - the index
        Returns:
        the input at the specified index
      • getInputForStream

        public SopremoTestPlan.Input getInputForStream(JsonStream stream)
        Returns the input that is associated with the given stream.
        Parameters:
        stream - the stream
        Returns:
        the input
      • getInputOperator

        public Source getInputOperator(int index)
        Returns the input operator for the given index.
        Parameters:
        index - the index
        Returns:
        the input operator
      • getInputOperators

        public Source[] getInputOperators(int from,
                                 int to)
        Returns all input operators for the given range of indices.
        Parameters:
        from - the start index (inclusive)
        to - the end index (exclusive)
        Returns:
        array of the input operators
      • getOutputOperator

        public Sink getOutputOperator(int index)
        Returns the output operator for the given index.
        Parameters:
        index - the index
        Returns:
        the output operator
      • getOutputOperators

        public Sink[] getOutputOperators(int from,
                                int to)
        Returns alls output operators for the given range of indices.
        Parameters:
        from - the start index (inclusive)
        to - the end index (exclusive)
        Returns:
        array of the output operators
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • run

        public void run()
        Executes all operators. If expected values have been specified, the actual outputs values are compared to the expected values.
      • setDegreeOfParallelism

        public void setDegreeOfParallelism(int dop)
        Returns the degree of parallelism of the test plan.
      • setInputOperator

        public void setInputOperator(int index,
                            Source operator)
        Sets the input operator of the specified index. The operator that is saved at the specified index will be overwritten.
        Parameters:
        index - the index where the operator should be saved
        operator - the new operator
      • setOutputOperator

        public void setOutputOperator(int index,
                             Sink operator)
        Sets the output operator of the specified index. The operator that is saved at the specified index will be overwritten.
        Parameters:
        index - the index where the operator should be saved
        operator - the new operator
      • trace

        public void trace()
        If called, the execution of the Operators will be traced by SopremoUtil.
      • initInputsAndOutputs

        protected void initInputsAndOutputs(int numInputs,
                                int numOutputs)
        Initializes the given number of in-/outputs.
        Parameters:
        numInputs - the number of inputs
        numOutputs - the number of outputs

Copyright © 2011–2014. All rights reserved.