Class HTableImpl

java.lang.Object
org.apache.hadoop.hbase.client.mapr.AbstractHTable
com.mapr.fs.hbase.HTableImpl
Direct Known Subclasses:
HTableImpl11

public class HTableImpl extends org.apache.hadoop.hbase.client.mapr.AbstractHTable
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
     
    static final String
     
    protected boolean
     
    protected final com.mapr.fs.MapRHTable
     
    protected byte[]
    Stores table path in a byte array
  • Constructor Summary

    Constructors
    Constructor
    Description
    HTableImpl(org.apache.hadoop.conf.Configuration conf, byte[] tableName)
    Creates an object to access a MapR table.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.hadoop.hbase.client.Result
    append(org.apache.hadoop.hbase.client.Append append)
     
    batch(List<? extends org.apache.hadoop.hbase.client.Row> actions)
     
    void
    batch(List<? extends org.apache.hadoop.hbase.client.Row> actions, Object[] results)
     
    boolean
    checkAndDelete(byte[] row, byte[] family, byte[] qualifier, byte[] value, org.apache.hadoop.hbase.client.Delete delete)
     
    boolean
    checkAndDelete(byte[] row, byte[] family, byte[] qualifier, org.apache.hadoop.hbase.filter.CompareFilter.CompareOp compareOp, byte[] value, org.apache.hadoop.hbase.client.Delete delete)
     
    boolean
    checkAndMutate(byte[] row, byte[] family, byte[] qualifier, org.apache.hadoop.hbase.filter.CompareFilter.CompareOp compareOp, byte[] value, org.apache.hadoop.hbase.client.RowMutations rm)
     
    boolean
    checkAndMutateImpl(byte[] row, byte[] family, byte[] qualifier, org.apache.hadoop.hbase.filter.CompareFilter.CompareOp compareOp, byte[] value, org.apache.hadoop.hbase.client.RowMutations rm, boolean throwerr)
     
    boolean
    checkAndPut(byte[] row, byte[] family, byte[] qualifier, byte[] value, org.apache.hadoop.hbase.client.Put put)
     
    boolean
    checkAndPut(byte[] row, byte[] family, byte[] qualifier, org.apache.hadoop.hbase.filter.CompareFilter.CompareOp compareOp, byte[] value, org.apache.hadoop.hbase.client.Put put)
     
    protected void
    checkMutation(org.apache.hadoop.hbase.client.Mutation m)
     
    void
     
    void
    delete(List<org.apache.hadoop.hbase.client.Delete> deletes)
     
    void
    delete(org.apache.hadoop.hbase.client.Delete delete)
     
    exists(List<org.apache.hadoop.hbase.client.Get> gets)
     
    boolean
    exists(org.apache.hadoop.hbase.client.Get get)
     
    void
     
    org.apache.hadoop.hbase.client.Result[]
    get(List<org.apache.hadoop.hbase.client.Get> gets)
     
    org.apache.hadoop.hbase.client.Result
    get(org.apache.hadoop.hbase.client.Get get)
     
    org.apache.hadoop.conf.Configuration
     
    getFamilyInfo(byte[] row, byte[] family)
     
    org.apache.hadoop.hbase.HRegionLocation
    getRegionLocation(byte[] row)
     
    NavigableMap<org.apache.hadoop.hbase.HRegionInfo,org.apache.hadoop.hbase.ServerName>
     
    org.apache.hadoop.hbase.client.Result
    getRowOrBefore(byte[] row, byte[] family)
     
    org.apache.hadoop.hbase.client.ResultScanner
    getScanner(org.apache.hadoop.hbase.client.Scan scan)
     
    org.apache.hadoop.hbase.util.Pair<byte[][],byte[][]>
     
    org.apache.hadoop.hbase.HTableDescriptor
     
    byte[]
    Returns the complete table path as a byte array
    org.apache.hadoop.hbase.client.Result
    increment(org.apache.hadoop.hbase.client.Increment increment)
     
    long
    incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount)
     
    long
    incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount, boolean writeToWAL)
     
    long
    incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount, org.apache.hadoop.hbase.client.Durability durability)
     
    boolean
     
    void
    mutateRow(org.apache.hadoop.hbase.client.RowMutations rm)
     
    com.mapr.fs.jni.MapRPut
    MutateToMapRPut(byte[] row, org.apache.hadoop.hbase.client.Mutation mut)
     
    void
    put(List<org.apache.hadoop.hbase.client.Put> puts)
     
    void
    put(org.apache.hadoop.hbase.client.Put put)
     
    void
    setAutoFlush(boolean autoFlush)
     
    void
    setAutoFlush(boolean autoFlush, boolean clearBufferOnFail)
     
    void
    setFlushOnRead(boolean val)
     
    boolean
     

    Methods inherited from class org.apache.hadoop.hbase.client.mapr.AbstractHTable

    batchCoprocessorService, batchCoprocessorService, clearRegionCache, coprocessorService, coprocessorService, coprocessorService, getEndKeys, getRegionLocation, getRegionLocation, getScanner, getScanner, getStartKeys, getWriteBufferSize, setWriteBufferSize

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • CONFIG_PARAM_FLUSH_ON_READ

      public static final String CONFIG_PARAM_FLUSH_ON_READ
      See Also:
    • autoFlush

      protected boolean autoFlush
    • flushOnRead

      protected boolean flushOnRead
    • maprTable

      protected final com.mapr.fs.MapRHTable maprTable
    • tableName

      protected byte[] tableName
      Stores table path in a byte array
  • Constructor Details

    • HTableImpl

      public HTableImpl(org.apache.hadoop.conf.Configuration conf, byte[] tableName) throws IOException
      Creates an object to access a MapR table.
      Parameters:
      conf - Configuration object to use.
      tableName - Name of the table.
      Throws:
      IOException - if a remote or network exception occurs
  • Method Details

    • getTableName

      public byte[] getTableName()
      Returns the complete table path as a byte array
      Specified by:
      getTableName in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
    • getConfiguration

      public org.apache.hadoop.conf.Configuration getConfiguration()
      Specified by:
      getConfiguration in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
    • flushCommits

      public void flushCommits() throws InterruptedIOException
      Specified by:
      flushCommits in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      InterruptedIOException
    • close

      public void close() throws IOException
      Specified by:
      close in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
    • getTableDescriptor

      public org.apache.hadoop.hbase.HTableDescriptor getTableDescriptor() throws IOException
      Specified by:
      getTableDescriptor in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
    • exists

      public boolean exists(org.apache.hadoop.hbase.client.Get get) throws IOException
      Specified by:
      exists in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
    • exists

      public Boolean[] exists(List<org.apache.hadoop.hbase.client.Get> gets) throws IOException
      Specified by:
      exists in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
    • batch

      public void batch(List<? extends org.apache.hadoop.hbase.client.Row> actions, Object[] results) throws IOException, InterruptedException
      Specified by:
      batch in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
      InterruptedException
    • batch

      public Object[] batch(List<? extends org.apache.hadoop.hbase.client.Row> actions) throws IOException, InterruptedException
      Specified by:
      batch in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
      InterruptedException
    • get

      public org.apache.hadoop.hbase.client.Result get(org.apache.hadoop.hbase.client.Get get) throws IOException
      Specified by:
      get in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
    • get

      public org.apache.hadoop.hbase.client.Result[] get(List<org.apache.hadoop.hbase.client.Get> gets) throws IOException
      Specified by:
      get in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
    • getRowOrBefore

      public org.apache.hadoop.hbase.client.Result getRowOrBefore(byte[] row, byte[] family) throws IOException
      Specified by:
      getRowOrBefore in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
    • getScanner

      public org.apache.hadoop.hbase.client.ResultScanner getScanner(org.apache.hadoop.hbase.client.Scan scan) throws IOException
      Specified by:
      getScanner in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
    • put

      public void put(org.apache.hadoop.hbase.client.Put put) throws InterruptedIOException
      Specified by:
      put in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      InterruptedIOException
    • put

      public void put(List<org.apache.hadoop.hbase.client.Put> puts) throws InterruptedIOException
      Specified by:
      put in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      InterruptedIOException
    • getFamilyInfo

      public HTableImpl.FamilyInfo getFamilyInfo(byte[] row, byte[] family) throws org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException, IOException
      Throws:
      org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException
      IOException
    • MutateToMapRPut

      public com.mapr.fs.jni.MapRPut MutateToMapRPut(byte[] row, org.apache.hadoop.hbase.client.Mutation mut) throws IOException
      Throws:
      IOException
    • checkAndPut

      public boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, byte[] value, org.apache.hadoop.hbase.client.Put put) throws org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException, IOException
      Specified by:
      checkAndPut in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException
      IOException
    • checkAndPut

      public boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, org.apache.hadoop.hbase.filter.CompareFilter.CompareOp compareOp, byte[] value, org.apache.hadoop.hbase.client.Put put) throws IOException
      Overrides:
      checkAndPut in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
    • delete

      public void delete(org.apache.hadoop.hbase.client.Delete delete) throws IOException
      Specified by:
      delete in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
    • delete

      public void delete(List<org.apache.hadoop.hbase.client.Delete> deletes) throws IOException
      Specified by:
      delete in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
    • checkAndDelete

      public boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier, byte[] value, org.apache.hadoop.hbase.client.Delete delete) throws org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException, IOException
      Specified by:
      checkAndDelete in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException
      IOException
    • checkAndDelete

      public boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier, org.apache.hadoop.hbase.filter.CompareFilter.CompareOp compareOp, byte[] value, org.apache.hadoop.hbase.client.Delete delete) throws IOException
      Overrides:
      checkAndDelete in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
    • mutateRow

      public void mutateRow(org.apache.hadoop.hbase.client.RowMutations rm) throws IOException
      Specified by:
      mutateRow in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
    • append

      public org.apache.hadoop.hbase.client.Result append(org.apache.hadoop.hbase.client.Append append) throws IOException
      Specified by:
      append in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
    • increment

      public org.apache.hadoop.hbase.client.Result increment(org.apache.hadoop.hbase.client.Increment increment) throws IOException
      Specified by:
      increment in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
    • incrementColumnValue

      public long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount) throws IOException
      Specified by:
      incrementColumnValue in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
    • incrementColumnValue

      public long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount, boolean writeToWAL) throws IOException
      Specified by:
      incrementColumnValue in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
    • incrementColumnValue

      public long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount, org.apache.hadoop.hbase.client.Durability durability) throws IOException
      Specified by:
      incrementColumnValue in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
    • setFlushOnRead

      public void setFlushOnRead(boolean val)
    • shouldFlushOnRead

      public boolean shouldFlushOnRead()
    • setAutoFlush

      public void setAutoFlush(boolean autoFlush)
      Specified by:
      setAutoFlush in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
    • setAutoFlush

      public void setAutoFlush(boolean autoFlush, boolean clearBufferOnFail)
      Specified by:
      setAutoFlush in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
    • isAutoFlush

      public boolean isAutoFlush()
      Specified by:
      isAutoFlush in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
    • getRegionLocation

      public org.apache.hadoop.hbase.HRegionLocation getRegionLocation(byte[] row) throws IOException
      Specified by:
      getRegionLocation in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
    • getStartEndKeys

      public org.apache.hadoop.hbase.util.Pair<byte[][],byte[][]> getStartEndKeys() throws IOException
      Specified by:
      getStartEndKeys in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
    • getRegionLocations

      public NavigableMap<org.apache.hadoop.hbase.HRegionInfo,org.apache.hadoop.hbase.ServerName> getRegionLocations() throws IOException
      Specified by:
      getRegionLocations in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
    • checkMutation

      protected void checkMutation(org.apache.hadoop.hbase.client.Mutation m) throws IOException
      Throws:
      IOException
    • checkAndMutate

      public boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier, org.apache.hadoop.hbase.filter.CompareFilter.CompareOp compareOp, byte[] value, org.apache.hadoop.hbase.client.RowMutations rm) throws IOException
      Overrides:
      checkAndMutate in class org.apache.hadoop.hbase.client.mapr.AbstractHTable
      Throws:
      IOException
    • checkAndMutateImpl

      public boolean checkAndMutateImpl(byte[] row, byte[] family, byte[] qualifier, org.apache.hadoop.hbase.filter.CompareFilter.CompareOp compareOp, byte[] value, org.apache.hadoop.hbase.client.RowMutations rm, boolean throwerr) throws IOException
      Throws:
      IOException