com.twitter.maple.hbase

Class HBaseTap

  • java.lang.Object
    • cascading.tap.Tap<org.apache.hadoop.mapred.JobConf,org.apache.hadoop.mapred.RecordReader,org.apache.hadoop.mapred.OutputCollector>
      • com.twitter.maple.hbase.HBaseTap
  • All Implemented Interfaces:
    cascading.flow.FlowElement, cascading.util.Traceable, java.io.Serializable


    public class HBaseTapextends cascading.tap.Tap<org.apache.hadoop.mapred.JobConf,org.apache.hadoop.mapred.RecordReader,org.apache.hadoop.mapred.OutputCollector>
    The HBaseTap class is a Tap subclass. It is used in conjunction with the HBaseScheme to allow for the reading and writing of data to and from a HBase cluster.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and TypeField and Description
      static java.lang.StringSCHEME
      Field SCHEME
    • Constructor Summary

      Constructors 
      Constructor and Description
      HBaseTap(java.lang.String tableName, HBaseScheme HBaseFullScheme)
      Constructor HBaseTap creates a new HBaseTap instance.
      HBaseTap(java.lang.String tableName, HBaseScheme HBaseFullScheme, cascading.tap.SinkMode sinkMode)
      Constructor HBaseTap creates a new HBaseTap instance.
      HBaseTap(java.lang.String quorumNames, java.lang.String tableName, HBaseScheme HBaseFullScheme)
      Constructor HBaseTap creates a new HBaseTap instance.
      HBaseTap(java.lang.String quorumNames, java.lang.String tableName, HBaseScheme HBaseFullScheme, cascading.tap.SinkMode sinkMode)
      Constructor HBaseTap creates a new HBaseTap instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      booleancreateResource(org.apache.hadoop.mapred.JobConf jobConf) 
      booleandeleteResource(org.apache.hadoop.mapred.JobConf jobConf) 
      booleanequals(java.lang.Object object) 
      protected org.apache.hadoop.hbase.client.HBaseAdmingetHBaseAdmin(org.apache.hadoop.mapred.JobConf conf) 
      java.lang.StringgetIdentifier() 
      longgetModifiedTime(org.apache.hadoop.mapred.JobConf jobConf) 
      org.apache.hadoop.fs.PathgetPath() 
      java.lang.StringgetTableName()
      Method getTableName returns the tableName of this HBaseTap object.
      inthashCode() 
      cascading.tuple.TupleEntryIteratoropenForRead(cascading.flow.FlowProcess<org.apache.hadoop.mapred.JobConf> jobConfFlowProcess, org.apache.hadoop.mapred.RecordReader recordReader) 
      cascading.tuple.TupleEntryCollectoropenForWrite(cascading.flow.FlowProcess<org.apache.hadoop.mapred.JobConf> jobConfFlowProcess, org.apache.hadoop.mapred.OutputCollector outputCollector) 
      booleanresourceExists(org.apache.hadoop.mapred.JobConf jobConf) 
      voidsinkConfInit(cascading.flow.FlowProcess<org.apache.hadoop.mapred.JobConf> process, org.apache.hadoop.mapred.JobConf conf) 
      voidsourceConfInit(cascading.flow.FlowProcess<org.apache.hadoop.mapred.JobConf> process, org.apache.hadoop.mapred.JobConf conf) 
      • Methods inherited from class cascading.tap.Tap

        commitResource, createResource, deleteResource, flowConfInit, getConfigDef, getFullIdentifier, getFullIdentifier, getModifiedTime, getScheme, getSinkFields, getSinkMode, getSourceFields, getStepConfigDef, getTrace, hasConfigDef, hasStepConfigDef, id, isEquivalentTo, isKeep, isReplace, isSink, isSource, isTemporary, isUpdate, openForRead, openForWrite, outgoingScopeFor, presentSinkFields, presentSourceFields, resolveIncomingOperationArgumentFields, resolveIncomingOperationPassThroughFields, resourceExists, retrieveSinkFields, retrieveSourceFields, rollbackResource, setScheme, taps, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • HBaseTap

        public HBaseTap(java.lang.String tableName,                HBaseScheme HBaseFullScheme)
        Constructor HBaseTap creates a new HBaseTap instance.
        Parameters:
        tableName - of type String
        HBaseFullScheme - of type HBaseFullScheme
      • HBaseTap

        public HBaseTap(java.lang.String tableName,                HBaseScheme HBaseFullScheme,                cascading.tap.SinkMode sinkMode)
        Constructor HBaseTap creates a new HBaseTap instance.
        Parameters:
        tableName - of type String
        HBaseFullScheme - of type HBaseFullScheme
        sinkMode - of type SinkMode
      • HBaseTap

        public HBaseTap(java.lang.String quorumNames,                java.lang.String tableName,                HBaseScheme HBaseFullScheme)
        Constructor HBaseTap creates a new HBaseTap instance.
        Parameters:
        quorumNames - of type String
        tableName - of type String
        HBaseFullScheme - of type HBaseFullScheme
      • HBaseTap

        public HBaseTap(java.lang.String quorumNames,                java.lang.String tableName,                HBaseScheme HBaseFullScheme,                cascading.tap.SinkMode sinkMode)
        Constructor HBaseTap creates a new HBaseTap instance.
        Parameters:
        quorumNames - of type String
        tableName - of type String
        HBaseFullScheme - of type HBaseFullScheme
        sinkMode - of type SinkMode
    • Method Detail

      • getTableName

        public java.lang.String getTableName()
        Method getTableName returns the tableName of this HBaseTap object.
        Returns:
        the tableName (type String) of this HBaseTap object.
      • getPath

        public org.apache.hadoop.fs.Path getPath()
      • getHBaseAdmin

        protected org.apache.hadoop.hbase.client.HBaseAdmin getHBaseAdmin(org.apache.hadoop.mapred.JobConf conf)                                                           throws org.apache.hadoop.hbase.MasterNotRunningException,                                                                  org.apache.hadoop.hbase.ZooKeeperConnectionException
        Throws:
        org.apache.hadoop.hbase.MasterNotRunningException
        org.apache.hadoop.hbase.ZooKeeperConnectionException
      • sinkConfInit

        public void sinkConfInit(cascading.flow.FlowProcess<org.apache.hadoop.mapred.JobConf> process,                         org.apache.hadoop.mapred.JobConf conf)
        Overrides:
        sinkConfInit in class cascading.tap.Tap<org.apache.hadoop.mapred.JobConf,org.apache.hadoop.mapred.RecordReader,org.apache.hadoop.mapred.OutputCollector>
      • getIdentifier

        public java.lang.String getIdentifier()
        Specified by:
        getIdentifier in class cascading.tap.Tap<org.apache.hadoop.mapred.JobConf,org.apache.hadoop.mapred.RecordReader,org.apache.hadoop.mapred.OutputCollector>
      • openForRead

        public cascading.tuple.TupleEntryIterator openForRead(cascading.flow.FlowProcess<org.apache.hadoop.mapred.JobConf> jobConfFlowProcess,                                                      org.apache.hadoop.mapred.RecordReader recordReader)                                               throws java.io.IOException
        Specified by:
        openForRead in class cascading.tap.Tap<org.apache.hadoop.mapred.JobConf,org.apache.hadoop.mapred.RecordReader,org.apache.hadoop.mapred.OutputCollector>
        Throws:
        java.io.IOException
      • openForWrite

        public cascading.tuple.TupleEntryCollector openForWrite(cascading.flow.FlowProcess<org.apache.hadoop.mapred.JobConf> jobConfFlowProcess,                                                        org.apache.hadoop.mapred.OutputCollector outputCollector)                                                 throws java.io.IOException
        Specified by:
        openForWrite in class cascading.tap.Tap<org.apache.hadoop.mapred.JobConf,org.apache.hadoop.mapred.RecordReader,org.apache.hadoop.mapred.OutputCollector>
        Throws:
        java.io.IOException
      • createResource

        public boolean createResource(org.apache.hadoop.mapred.JobConf jobConf)                       throws java.io.IOException
        Specified by:
        createResource in class cascading.tap.Tap<org.apache.hadoop.mapred.JobConf,org.apache.hadoop.mapred.RecordReader,org.apache.hadoop.mapred.OutputCollector>
        Throws:
        java.io.IOException
      • deleteResource

        public boolean deleteResource(org.apache.hadoop.mapred.JobConf jobConf)                       throws java.io.IOException
        Specified by:
        deleteResource in class cascading.tap.Tap<org.apache.hadoop.mapred.JobConf,org.apache.hadoop.mapred.RecordReader,org.apache.hadoop.mapred.OutputCollector>
        Throws:
        java.io.IOException
      • resourceExists

        public boolean resourceExists(org.apache.hadoop.mapred.JobConf jobConf)                       throws java.io.IOException
        Specified by:
        resourceExists in class cascading.tap.Tap<org.apache.hadoop.mapred.JobConf,org.apache.hadoop.mapred.RecordReader,org.apache.hadoop.mapred.OutputCollector>
        Throws:
        java.io.IOException
      • getModifiedTime

        public long getModifiedTime(org.apache.hadoop.mapred.JobConf jobConf)                     throws java.io.IOException
        Specified by:
        getModifiedTime in class cascading.tap.Tap<org.apache.hadoop.mapred.JobConf,org.apache.hadoop.mapred.RecordReader,org.apache.hadoop.mapred.OutputCollector>
        Throws:
        java.io.IOException
      • sourceConfInit

        public void sourceConfInit(cascading.flow.FlowProcess<org.apache.hadoop.mapred.JobConf> process,                           org.apache.hadoop.mapred.JobConf conf)
        Overrides:
        sourceConfInit in class cascading.tap.Tap<org.apache.hadoop.mapred.JobConf,org.apache.hadoop.mapred.RecordReader,org.apache.hadoop.mapred.OutputCollector>
      • equals

        public boolean equals(java.lang.Object object)
        Overrides:
        equals in class cascading.tap.Tap<org.apache.hadoop.mapred.JobConf,org.apache.hadoop.mapred.RecordReader,org.apache.hadoop.mapred.OutputCollector>
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class cascading.tap.Tap<org.apache.hadoop.mapred.JobConf,org.apache.hadoop.mapred.RecordReader,org.apache.hadoop.mapred.OutputCollector>


NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14