org.apache.pig.impl.streaming
Class StreamingCommand.HandleSpec

java.lang.Object
  extended by org.apache.pig.impl.streaming.StreamingCommand.HandleSpec
All Implemented Interfaces:
Serializable, Cloneable, Comparable<StreamingCommand.HandleSpec>
Enclosing class:
StreamingCommand

public static class StreamingCommand.HandleSpec
extends Object
implements Comparable<StreamingCommand.HandleSpec>, Serializable, Cloneable

Specification about the usage of the StreamingCommand.Handle to communicate with the external process. It specifies the stream-handle which can be one of stdin/ stdout/stderr or a named file and also the serializer/deserializer specification to be used to read/write data to/from the stream.

See Also:
Serialized Form

Constructor Summary
StreamingCommand.HandleSpec(String handleName)
          Create a new StreamingCommand.HandleSpec with a given name using the default PigStorage serializer/deserializer.
StreamingCommand.HandleSpec(String handleName, String spec)
          Create a new StreamingCommand.HandleSpec with a given name using the default PigStorage serializer/deserializer.
 
Method Summary
 Object clone()
           
 int compareTo(StreamingCommand.HandleSpec o)
           
 boolean equals(Object obj)
           
 String getName()
          Get the name of the HandleSpec.
 String getSpec()
          Get the serializer/deserializer spec of the HandleSpec.
 int hashCode()
           
 void setName(String name)
          Set the name of the HandleSpec.
 void setSpec(String spec)
          Set the serializer/deserializer spec of the HandleSpec.
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StreamingCommand.HandleSpec

public StreamingCommand.HandleSpec(String handleName)
Create a new StreamingCommand.HandleSpec with a given name using the default PigStorage serializer/deserializer.

Parameters:
handleName - name of the handle (one of stdin, stdout or a file-path)

StreamingCommand.HandleSpec

public StreamingCommand.HandleSpec(String handleName,
                                   String spec)
Create a new StreamingCommand.HandleSpec with a given name using the default PigStorage serializer/deserializer.

Parameters:
handleName - name of the handle (one of stdin, stdout or a file-path)
spec - serializer/deserializer spec
Method Detail

compareTo

public int compareTo(StreamingCommand.HandleSpec o)
Specified by:
compareTo in interface Comparable<StreamingCommand.HandleSpec>

toString

public String toString()
Overrides:
toString in class Object

getName

public String getName()
Get the name of the HandleSpec.

Returns:
the name of the HandleSpec (one of stdin, stdout or a file-path)

setName

public void setName(String name)
Set the name of the HandleSpec.

Parameters:
name - name of the HandleSpec (one of stdin, stdout or a file-path)

getSpec

public String getSpec()
Get the serializer/deserializer spec of the HandleSpec.

Returns:
the serializer/deserializer spec of the HandleSpec

setSpec

public void setSpec(String spec)
Set the serializer/deserializer spec of the HandleSpec.

Parameters:
spec - the serializer/deserializer spec of the HandleSpec

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

clone

public Object clone()
Overrides:
clone in class Object


Copyright © 2007-2012 The Apache Software Foundation