public class HBaseClient extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
HBaseClient.FlushTask |
static interface |
HBaseClient.NextRowkeyHandler |
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_SCAN_CACHING |
static int |
LOOKAHEAD_SCAN_SEEK |
static long |
TIMER_DELAY_SCHEDULE |
static long |
TIMER_PERIOD_SCHEDULE |
| Constructor and Description |
|---|
HBaseClient(HBaseConf hconf)
init hbase conn and admin and table
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFamily(String tbName,
String[] families)
add family columng
|
void |
close()
close the connection
|
void |
createNamespace(String namespace)
create namespace
|
void |
createTable(String tbName)
create htable
|
void |
createTable(String tbName,
String[] families)
create the hbase table with hbase descriptor
|
void |
delete(String tbName,
byte[] rowkey)
delete by rowkey
|
void |
delete(String tbName,
List<byte[]> rows) |
void |
deleteAsync(String tbName,
List<byte[]> rows) |
void |
deleteAsyncHData(String tbName,
List<HData> datas) |
void |
deleteAsyncOrigin(String tbName,
List<org.apache.hadoop.hbase.client.Delete> deletes)
original delete async
|
void |
deleteFamily(String tbName,
String family)
delete family column
|
void |
deleteHData(String tbName,
HData data)
delete hdata
|
void |
deleteHData(String tbName,
List<HData> datas) |
void |
deleteNamespace(String namespace)
delete namespace
|
void |
deleteOrigin(String tbName,
org.apache.hadoop.hbase.client.Delete delete)
delete the delte
|
void |
deleteOrigin(String tbName,
List<org.apache.hadoop.hbase.client.Delete> deletes) |
void |
deleteTable(String tbName)
delete htable
|
boolean |
existsRow(String tbName,
byte[] rowkey)
overloading with rowkey
|
boolean |
existsRow(String tbName,
org.apache.hadoop.hbase.client.Get get)
exists getOrigin
|
boolean |
existsTable(String tbName)
htable is exists
|
HData |
get(String tbName,
byte[] rowkey)
overloading
|
List<HData> |
get(String tbName,
List<byte[]> rows) |
org.apache.hadoop.hbase.HColumnDescriptor[] |
getColumnFamilies(String tbName)
getOrigin column families
|
List<String> |
getColumnFamiliesName(String tbName)
getOrigin all column families name
|
HData |
getHdata(String tbName,
HData data)
hdata parameter
|
List<HData> |
getHdata(String tbName,
List<HData> datas) |
HData |
getOrigin(String tbName,
org.apache.hadoop.hbase.client.Get get)
origonal getOrigin
|
List<HData> |
getOrigin(String tbName,
List<org.apache.hadoop.hbase.client.Get> gets)
batch
|
List<HData> |
gets(String tbName,
byte[] start,
byte[] stop)
scan data by start rowkey and stop rowkey
|
List<HData> |
gets(String tbName,
byte[] start,
byte[] stop,
byte[] family) |
List<HData> |
gets(String tbName,
byte[] start,
byte[] stop,
byte[] family,
byte[] qualifier) |
List<HData> |
gets(String tbName,
byte[] start,
int count,
HBaseClient.NextRowkeyHandler nextHandler)
set start and load count hdatas to list
|
List<HData> |
gets(String tbName,
byte[] start,
int count,
HBaseClient.NextRowkeyHandler nextHandler,
byte[] family) |
List<HData> |
gets(String tbName,
byte[] start,
int count,
HBaseClient.NextRowkeyHandler nextHandler,
byte[] family,
byte[] qualifier) |
List<HData> |
getsOrigin(String tbName,
org.apache.hadoop.hbase.client.Scan scan)
original scanner
|
List<String> |
getTableNameList()
getOrigin table name list
|
void |
put(String tbName,
HData data)
put single data
|
void |
put(String tbName,
List<HData> datas)
put list datas
|
void |
putAsync(String tbName,
HData data)
async put HData
|
void |
putAsync(String tbName,
List<HData> datas)
async put bulk data, but no flush
per minute or same interval flush the mutator
|
void |
putAsyncOrigin(String tbName,
List<org.apache.hadoop.hbase.client.Put> puts)
async batch mutate
|
void |
putAsyncOrigin(String tbName,
org.apache.hadoop.hbase.client.Put put)
async mutate
|
void |
putOrigin(String tbName,
List<org.apache.hadoop.hbase.client.Put> puts)
origin puts
|
void |
putOrigin(String tbName,
org.apache.hadoop.hbase.client.Put put)
origin put
|
public static final long TIMER_DELAY_SCHEDULE
public static final long TIMER_PERIOD_SCHEDULE
public static final int DEFAULT_SCAN_CACHING
public static final int LOOKAHEAD_SCAN_SEEK
public boolean existsTable(String tbName) throws Exception
tbName - Exceptionpublic void createTable(String tbName) throws Exception
tbName - Exceptionpublic void createTable(String tbName, String[] families) throws Exception
tbName - families - Exceptionpublic org.apache.hadoop.hbase.HColumnDescriptor[] getColumnFamilies(String tbName) throws Exception
tbName - Exceptionpublic List<String> getColumnFamiliesName(String tbName) throws Exception
tbName - Exceptionpublic void addFamily(String tbName, String[] families) throws Exception
tbName - families - Exceptionpublic void createNamespace(String namespace) throws Exception
namespace - Exceptionpublic void deleteFamily(String tbName, String family) throws Exception
tbName - family - Exceptionpublic void deleteNamespace(String namespace) throws Exception
namespace - Exceptionpublic void deleteTable(String tbName) throws Exception
tbName - Exceptionpublic List<String> getTableNameList() throws Exception
Exceptionpublic void putOrigin(String tbName, org.apache.hadoop.hbase.client.Put put) throws Exception
tbName - put - Exceptionpublic void putOrigin(String tbName, List<org.apache.hadoop.hbase.client.Put> puts) throws Exception
tbName - puts - Exceptionpublic void put(String tbName, HData data) throws Exception
tbName - data - Exceptionpublic void put(String tbName, List<HData> datas) throws Exception
tbName - datas - Exceptionpublic void putAsyncOrigin(String tbName, org.apache.hadoop.hbase.client.Put put) throws Exception
tbName - put - Exceptionpublic void putAsyncOrigin(String tbName, List<org.apache.hadoop.hbase.client.Put> puts) throws Exception
tbName - puts - Exceptionpublic void putAsync(String tbName, HData data) throws Exception
tbName - data - Exceptionpublic void putAsync(String tbName, List<HData> datas) throws Exception
tbName - datas - Exceptionpublic HData getOrigin(String tbName, org.apache.hadoop.hbase.client.Get get) throws Exception
tbName - get - Exceptionpublic List<HData> getOrigin(String tbName, List<org.apache.hadoop.hbase.client.Get> gets) throws Exception
tbName - gets - Exceptionpublic HData get(String tbName, byte[] rowkey) throws Exception
tbName - rowkey - Exceptionpublic HData getHdata(String tbName, HData data) throws Exception
tbName - data - Exceptionpublic List<HData> getHdata(String tbName, List<HData> datas) throws Exception
Exceptionpublic boolean existsRow(String tbName, org.apache.hadoop.hbase.client.Get get) throws Exception
tbName - get - Exceptionpublic boolean existsRow(String tbName, byte[] rowkey) throws Exception
tbName - rowkey - Exceptionpublic void deleteOrigin(String tbName, org.apache.hadoop.hbase.client.Delete delete) throws Exception
tbName - delete - Exceptionpublic void deleteOrigin(String tbName, List<org.apache.hadoop.hbase.client.Delete> deletes) throws Exception
Exceptionpublic void delete(String tbName, byte[] rowkey) throws Exception
tbName - rowkey - Exceptionpublic void deleteHData(String tbName, HData data) throws Exception
tbName - Exceptionpublic void deleteHData(String tbName, List<HData> datas) throws Exception
Exceptionpublic void deleteAsyncOrigin(String tbName, List<org.apache.hadoop.hbase.client.Delete> deletes) throws Exception
tbName - deletes - Exceptionpublic void deleteAsync(String tbName, List<byte[]> rows) throws Exception
Exceptionpublic void deleteAsyncHData(String tbName, List<HData> datas) throws Exception
Exceptionpublic List<HData> getsOrigin(String tbName, org.apache.hadoop.hbase.client.Scan scan) throws Exception
tbName - scan - Exceptionpublic List<HData> gets(String tbName, byte[] start, byte[] stop) throws Exception
tbName - start - stop - Exceptionpublic List<HData> gets(String tbName, byte[] start, byte[] stop, byte[] family) throws Exception
Exceptionpublic List<HData> gets(String tbName, byte[] start, byte[] stop, byte[] family, byte[] qualifier) throws Exception
Exceptionpublic List<HData> gets(String tbName, byte[] start, int count, HBaseClient.NextRowkeyHandler nextHandler) throws Exception
tbName - start - count - nextHandler - Exceptionpublic List<HData> gets(String tbName, byte[] start, int count, HBaseClient.NextRowkeyHandler nextHandler, byte[] family) throws Exception
Exceptionpublic List<HData> gets(String tbName, byte[] start, int count, HBaseClient.NextRowkeyHandler nextHandler, byte[] family, byte[] qualifier) throws Exception
ExceptionCopyright © 2016. All rights reserved.