org.apache.pig.impl.logicalLayer
Class LOStream

java.lang.Object
  extended by org.apache.pig.impl.plan.Operator<LOVisitor>
      extended by org.apache.pig.impl.logicalLayer.LogicalOperator
          extended by org.apache.pig.impl.logicalLayer.LOStream
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Operator>

public class LOStream
extends LogicalOperator

LOStream represents the specification of an external command to be executed in a Pig Query. LOStream encapsulates all relevant details of the command specified by the user either directly via the STREAM operator or indirectly via a DEFINE operator. It includes details such as input/output/error specifications and also files to be shipped to the cluster and files to be cached.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.pig.impl.logicalLayer.LogicalOperator
mAlias, mIsSchemaComputed, mPlan, mRequestedParallelism, mSchema, mType
 
Fields inherited from class org.apache.pig.impl.plan.Operator
mKey
 
Constructor Summary
LOStream(LogicalPlan plan, OperatorKey k, LogicalOperator input, ExecutableManager exeManager, StreamingCommand cmd)
          Create a new LOStream with the given command.
 
Method Summary
 ExecutableManager getExecutableManager()
           
 Schema getSchema()
          Get a copy of the schema for the output of this operator.
 StreamingCommand getStreamingCommand()
          Get the StreamingCommand object associated with this operator
 String name()
           
 void setOptimizedSpec(StreamingCommand.Handle handle, String spec)
          Set the optimized StreamingCommand.HandleSpec for the given StreamingCommand.Handle of the StreamSpec.
 boolean supportsMultipleInputs()
          Indicates whether this operator supports multiple inputs.
 void visit(LOVisitor v)
          Visit this node with the provided visitor.
 
Methods inherited from class org.apache.pig.impl.logicalLayer.LogicalOperator
clone, forceSchema, getAlias, getOperatorKey, getPlan, getRequestedParallelism, getType, reconcileSchema, regenerateSchema, setAlias, setCanonicalNames, setPlan, setRequestedParallelism, setSchema, setSchemaComputed, setType, supportsMultipleOutputs, toString, unsetSchema
 
Methods inherited from class org.apache.pig.impl.plan.Operator
compareTo, equals, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LOStream

public LOStream(LogicalPlan plan,
                OperatorKey k,
                LogicalOperator input,
                ExecutableManager exeManager,
                StreamingCommand cmd)
Create a new LOStream with the given command.

Parameters:
plan - the logical plan this operator is a part of
k - the operator key for this operator
input - operator that is input to this command
exeManager - ExecutableManager used by this streaming command.
cmd - StreamingCommand for this stream to run.
Method Detail

getStreamingCommand

public StreamingCommand getStreamingCommand()
Get the StreamingCommand object associated with this operator

Returns:
the StreamingCommand object

getSchema

public Schema getSchema()
                 throws FrontendException
Description copied from class: LogicalOperator
Get a copy of the schema for the output of this operator.

Specified by:
getSchema in class LogicalOperator
Throws:
FrontendException

setOptimizedSpec

public void setOptimizedSpec(StreamingCommand.Handle handle,
                             String spec)
Set the optimized StreamingCommand.HandleSpec for the given StreamingCommand.Handle of the StreamSpec.

Parameters:
handle - Handle to optimize
spec - optimized specification for the handle

visit

public void visit(LOVisitor v)
           throws VisitorException
Description copied from class: LogicalOperator
Visit this node with the provided visitor. This should only be called by the visitor class itself, never directly.

Specified by:
visit in class LogicalOperator
Parameters:
v - Visitor to visit with.
Throws:
VisitorException - if the visitor has a problem.

name

public String name()
Specified by:
name in class Operator<LOVisitor>

supportsMultipleInputs

public boolean supportsMultipleInputs()
Description copied from class: Operator
Indicates whether this operator supports multiple inputs.

Specified by:
supportsMultipleInputs in class Operator<LOVisitor>
Returns:
true if it does, otherwise false.

getExecutableManager

public ExecutableManager getExecutableManager()
Returns:
the ExecutableManager


Copyright © ${year} The Apache Software Foundation