org.apache.hadoop.hbase.stargate.client
Class RemoteHTable

java.lang.Object
  extended by org.apache.hadoop.hbase.stargate.client.RemoteHTable

public class RemoteHTable
extends Object

HTable interface to remote tables accessed via Stargate


Constructor Summary
RemoteHTable(Client client, HBaseConfiguration conf, byte[] name, String accessToken)
          Constructor
RemoteHTable(Client client, HBaseConfiguration conf, String name, String accessToken)
          Constructor
RemoteHTable(Client client, String name)
          Constructor
RemoteHTable(Client client, String name, String accessToken)
          Constructor
 
Method Summary
protected  CellSetModel buildModelFromPut(Put put)
           
protected  Result[] buildResultFromModel(CellSetModel model)
           
protected  String buildRowSpec(byte[] row, Map familyMap, long startTime, long endTime, int maxVersions)
           
 boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, byte[] value, Put put)
           
 void close()
           
 void delete(Delete delete)
           
 void delete(List<Delete> deletes)
           
 boolean exists(Get get)
           
 void flushCommits()
           
 Result get(Get get)
           
 HBaseConfiguration getConfiguration()
           
 Result getRowOrBefore(byte[] row, byte[] family)
           
 ResultScanner getScanner(byte[] family)
           
 ResultScanner getScanner(byte[] family, byte[] qualifier)
           
 ResultScanner getScanner(Scan scan)
           
 HTableDescriptor getTableDescriptor()
           
 byte[] getTableName()
           
 long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount)
           
 long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount, boolean writeToWAL)
           
 boolean isAutoFlush()
           
 RowLock lockRow(byte[] row)
           
 void put(List<Put> puts)
           
 void put(Put put)
           
 void unlockRow(RowLock rl)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteHTable

public RemoteHTable(Client client,
                    String name)
Constructor

Parameters:
client -
name -

RemoteHTable

public RemoteHTable(Client client,
                    String name,
                    String accessToken)
Constructor

Parameters:
client -
name -
accessToken -

RemoteHTable

public RemoteHTable(Client client,
                    HBaseConfiguration conf,
                    String name,
                    String accessToken)
Constructor

Parameters:
client -
conf -
name -
accessToken -

RemoteHTable

public RemoteHTable(Client client,
                    HBaseConfiguration conf,
                    byte[] name,
                    String accessToken)
Constructor

Parameters:
conf -
Method Detail

buildRowSpec

protected String buildRowSpec(byte[] row,
                              Map familyMap,
                              long startTime,
                              long endTime,
                              int maxVersions)

buildResultFromModel

protected Result[] buildResultFromModel(CellSetModel model)

buildModelFromPut

protected CellSetModel buildModelFromPut(Put put)

getTableName

public byte[] getTableName()

getConfiguration

public HBaseConfiguration getConfiguration()

getTableDescriptor

public HTableDescriptor getTableDescriptor()
                                    throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Throws:
IOException

get

public Result get(Get get)
           throws IOException
Throws:
IOException

exists

public boolean exists(Get get)
               throws IOException
Throws:
IOException

put

public void put(Put put)
         throws IOException
Throws:
IOException

put

public void put(List<Put> puts)
         throws IOException
Throws:
IOException

delete

public void delete(Delete delete)
            throws IOException
Throws:
IOException

delete

public void delete(List<Delete> deletes)
            throws IOException
Throws:
IOException

flushCommits

public void flushCommits()
                  throws IOException
Throws:
IOException

getScanner

public ResultScanner getScanner(Scan scan)
                         throws IOException
Throws:
IOException

getScanner

public ResultScanner getScanner(byte[] family)
                         throws IOException
Throws:
IOException

getScanner

public ResultScanner getScanner(byte[] family,
                                byte[] qualifier)
                         throws IOException
Throws:
IOException

isAutoFlush

public boolean isAutoFlush()

getRowOrBefore

public Result getRowOrBefore(byte[] row,
                             byte[] family)
                      throws IOException
Throws:
IOException

lockRow

public RowLock lockRow(byte[] row)
                throws IOException
Throws:
IOException

unlockRow

public void unlockRow(RowLock rl)
               throws IOException
Throws:
IOException

checkAndPut

public boolean checkAndPut(byte[] row,
                           byte[] family,
                           byte[] qualifier,
                           byte[] value,
                           Put put)
                    throws IOException
Throws:
IOException

incrementColumnValue

public long incrementColumnValue(byte[] row,
                                 byte[] family,
                                 byte[] qualifier,
                                 long amount)
                          throws IOException
Throws:
IOException

incrementColumnValue

public long incrementColumnValue(byte[] row,
                                 byte[] family,
                                 byte[] qualifier,
                                 long amount,
                                 boolean writeToWAL)
                          throws IOException
Throws:
IOException


Copyright © 2010 The Apache Software Foundation