public class HBaseConnection extends Object
| Constructor and Description |
|---|
HBaseConnection()
Default Settings.
|
HBaseConnection(boolean checkConfig)
Defaut settings but can skip validation.
|
HBaseConnection(org.apache.hadoop.conf.Configuration hbaseConf,
boolean checkConfig)
Default.
|
HBaseConnection(String xmlConf,
boolean checkConfig)
Create connection from XML File.
|
HBaseConnection(String zooKeeperQuorum,
int zooKeeperClientPort,
boolean checkConfig)
Constructor with parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkHBaseConfiguration()
Allows check the configuration
|
void |
createTable(String tableName,
Set<String> columnFamilies)
Helper to create a table in HBASE.
|
org.apache.hadoop.conf.Configuration |
getConfig()
Getter accessor for attribute 'config'.
|
Stream<String> |
listTablesName()
List tables in DB.
|
void |
truncateTable(String tableName)
Clear a table by its name.
|
public HBaseConnection()
public HBaseConnection(String xmlConf, boolean checkConfig)
xmlConf - target xml configcheckConfig - if the connection must be checkedpublic HBaseConnection(boolean checkConfig)
checkConfig - flag to avoid validate configurationpublic HBaseConnection(String zooKeeperQuorum, int zooKeeperClientPort, boolean checkConfig)
zooKeeperQuorum - list of zookeeper host separater by a commazooKeeperClientPort - zookeeper port (should be the same for all?)checkConfig - public HBaseConnection(org.apache.hadoop.conf.Configuration hbaseConf,
boolean checkConfig)
public void checkHBaseConfiguration()
public void createTable(String tableName, Set<String> columnFamilies)
tableName - current table namecolumnFamilies - list of column familiespublic void truncateTable(String tableName)
tableName - table namepublic Stream<String> listTablesName() throws IOException
IOExceptionpublic org.apache.hadoop.conf.Configuration getConfig()
Copyright © 2013–2020 FF4J. All rights reserved.