org.apache.storm.hdfs.trident.format
Class DefaultSequenceFormat

java.lang.Object
  extended by org.apache.storm.hdfs.trident.format.DefaultSequenceFormat
All Implemented Interfaces:
Serializable, SequenceFormat

public class DefaultSequenceFormat
extends Object
implements SequenceFormat

Basic SequenceFormat implementation that uses LongWritable for keys and Text for values.

See Also:
Serialized Form

Constructor Summary
DefaultSequenceFormat(String keyField, String valueField)
           
 
Method Summary
 org.apache.hadoop.io.Writable key(TridentTuple tuple)
          Given a tuple, return the key that should be written to the sequence file.
 Class keyClass()
          Key class used by implementation (e.g.
 org.apache.hadoop.io.Writable value(TridentTuple tuple)
          Given a tuple, return the value that should be written to the sequence file.
 Class valueClass()
          Value class used by implementation (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSequenceFormat

public DefaultSequenceFormat(String keyField,
                             String valueField)
Method Detail

keyClass

public Class keyClass()
Description copied from interface: SequenceFormat
Key class used by implementation (e.g. IntWritable.class, etc.)

Specified by:
keyClass in interface SequenceFormat
Returns:

valueClass

public Class valueClass()
Description copied from interface: SequenceFormat
Value class used by implementation (e.g. Text.class, etc.)

Specified by:
valueClass in interface SequenceFormat
Returns:

key

public org.apache.hadoop.io.Writable key(TridentTuple tuple)
Description copied from interface: SequenceFormat
Given a tuple, return the key that should be written to the sequence file.

Specified by:
key in interface SequenceFormat
Returns:

value

public org.apache.hadoop.io.Writable value(TridentTuple tuple)
Description copied from interface: SequenceFormat
Given a tuple, return the value that should be written to the sequence file.

Specified by:
value in interface SequenceFormat
Returns:


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.