org.apache.hadoop.hbase.hbql.impl
Class HConnectionImpl
java.lang.Object
org.apache.hadoop.hbase.hbql.util.PoolableElement<HConnectionImpl>
org.apache.hadoop.hbase.hbql.impl.HConnectionImpl
- All Implemented Interfaces:
- HConnection
public class HConnectionImpl
- extends PoolableElement<HConnectionImpl>
- implements HConnection
Method Summary |
void |
close()
|
TableMapping |
createMapping(boolean tempMapping,
boolean systemMapping,
String mappingName,
String tableName,
KeyInfo keyInfo,
List<FamilyMapping> familyList)
|
HStatement |
createStatement()
|
void |
createTable(org.apache.hadoop.hbase.HTableDescriptor tableDesc)
|
void |
disableTable(String tableName)
|
void |
dropIndexForMapping(String indexName,
String mappingName)
|
void |
dropIndexForTable(String tableName,
String indexName)
|
boolean |
dropMapping(String mappingName)
|
void |
dropTable(String tableName)
|
void |
enableTable(String tableName)
|
ExecutionResults |
execute(String sql)
|
HResultSet<HRecord> |
executeQuery(String sql)
|
|
executeQuery(String sql,
Class clazz)
|
List<HRecord> |
executeQueryAndFetch(String sql)
|
|
executeQueryAndFetch(String sql,
Class clazz)
|
ExecutionResults |
executeUpdate(String sql)
|
boolean |
familyExistsForMapping(String familyName,
String mappingName)
|
boolean |
familyExistsForTable(String familyName,
String tableName)
|
Set<HMapping> |
getAllMappings()
|
AnnotationResultAccessor |
getAnnotationMapping(Class<?> clazz)
|
AnnotationResultAccessor |
getAnnotationMapping(Object obj)
|
AsyncExecutorImpl |
getAsyncExecutorForConnection()
|
String |
getAsyncExecutorName()
|
org.apache.hadoop.conf.Configuration |
getConfiguration()
|
static org.apache.hadoop.conf.Configuration |
getConfiguration(String master)
|
Set<String> |
getFamilyNames(String tableName)
|
org.apache.hadoop.hbase.client.HBaseAdmin |
getHBaseAdmin()
|
org.apache.hadoop.hbase.HTableDescriptor |
getHTableDescriptor(String tableName)
|
org.apache.hadoop.hbase.client.tableindexed.IndexSpecification |
getIndexForTable(String indexName,
String tableName)
|
org.apache.hadoop.hbase.client.tableindexed.IndexedTableAdmin |
getIndexTableAdmin()
|
TableMapping |
getMapping(String mappingName)
|
int |
getMaxTablePoolReferencesPerTable()
|
CompletionQueueExecutor |
getQueryExecutorForConnection()
|
String |
getQueryExecutorPoolName()
|
Set<String> |
getTableNames()
|
boolean |
indexExistsForMapping(String indexName,
String mappingName)
|
boolean |
indexExistsForTable(String indexName,
String tableName)
|
boolean |
isClosed()
|
boolean |
isPooled()
|
boolean |
mappingExists(String mappingName)
|
|
newHBatch()
|
HTableWrapper |
newHTableWrapper(WithArgs withArgs,
String tableName)
|
org.apache.hadoop.hbase.client.tableindexed.IndexedTableDescriptor |
newIndexedTableDescriptor(String tableName)
|
HPreparedStatement |
prepareStatement(String sql)
|
void |
releaseElement()
|
void |
resetElement()
|
void |
setAsyncExecutorName(String poolName)
|
void |
setQueryExecutorPoolName(String poolName)
|
boolean |
tableAvailable(String tableName)
|
boolean |
tableEnabled(String tableName)
|
boolean |
tableExists(String tableName)
|
boolean |
usesQueryExecutor()
|
void |
validateAsyncExecutorNameExists(String name)
|
void |
validateFamilyExistsForTable(String familyName,
String tableName)
|
void |
validateIndexExistsForTable(String indexName,
String tableName)
|
void |
validateQueryExecutorPoolNameExists(String poolName)
|
void |
validateTableDisabled(String tableName,
String action)
|
void |
validateTableName(String tableName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAXTABLEREFS
public static final String MAXTABLEREFS
- See Also:
- Constant Field Values
MASTER
public static final String MASTER
- See Also:
- Constant Field Values
HConnectionImpl
public HConnectionImpl(org.apache.hadoop.conf.Configuration configuration,
HConnectionPoolImpl connectionPool,
int maxTablePoolReferencesPerTable)
throws HBqlException
- Throws:
HBqlException
getConfiguration
public static org.apache.hadoop.conf.Configuration getConfiguration(String master)
resetElement
public void resetElement()
- Specified by:
resetElement
in class PoolableElement<HConnectionImpl>
isPooled
public boolean isPooled()
- Specified by:
isPooled
in interface HConnection
getConfiguration
public org.apache.hadoop.conf.Configuration getConfiguration()
- Specified by:
getConfiguration
in interface HConnection
getMaxTablePoolReferencesPerTable
public int getMaxTablePoolReferencesPerTable()
getAnnotationMapping
public AnnotationResultAccessor getAnnotationMapping(Object obj)
throws HBqlException
- Throws:
HBqlException
getAnnotationMapping
public AnnotationResultAccessor getAnnotationMapping(Class<?> clazz)
throws HBqlException
- Throws:
HBqlException
getHBaseAdmin
public org.apache.hadoop.hbase.client.HBaseAdmin getHBaseAdmin()
throws HBqlException
- Throws:
HBqlException
getIndexTableAdmin
public org.apache.hadoop.hbase.client.tableindexed.IndexedTableAdmin getIndexTableAdmin()
throws HBqlException
- Throws:
HBqlException
getFamilyNames
public Set<String> getFamilyNames(String tableName)
throws HBqlException
- Specified by:
getFamilyNames
in interface HConnection
- Throws:
HBqlException
familyExistsForTable
public boolean familyExistsForTable(String familyName,
String tableName)
throws HBqlException
- Throws:
HBqlException
familyExistsForMapping
public boolean familyExistsForMapping(String familyName,
String mappingName)
throws HBqlException
- Throws:
HBqlException
newIndexedTableDescriptor
public org.apache.hadoop.hbase.client.tableindexed.IndexedTableDescriptor newIndexedTableDescriptor(String tableName)
throws HBqlException
- Throws:
HBqlException
indexExistsForMapping
public boolean indexExistsForMapping(String indexName,
String mappingName)
throws HBqlException
- Specified by:
indexExistsForMapping
in interface HConnection
- Throws:
HBqlException
getIndexForTable
public org.apache.hadoop.hbase.client.tableindexed.IndexSpecification getIndexForTable(String indexName,
String tableName)
throws HBqlException
- Throws:
HBqlException
indexExistsForTable
public boolean indexExistsForTable(String indexName,
String tableName)
throws HBqlException
- Specified by:
indexExistsForTable
in interface HConnection
- Throws:
HBqlException
dropIndexForMapping
public void dropIndexForMapping(String indexName,
String mappingName)
throws HBqlException
- Specified by:
dropIndexForMapping
in interface HConnection
- Throws:
HBqlException
dropIndexForTable
public void dropIndexForTable(String tableName,
String indexName)
throws HBqlException
- Specified by:
dropIndexForTable
in interface HConnection
- Throws:
HBqlException
createStatement
public HStatement createStatement()
throws HBqlException
- Specified by:
createStatement
in interface HConnection
- Throws:
HBqlException
prepareStatement
public HPreparedStatement prepareStatement(String sql)
throws HBqlException
- Specified by:
prepareStatement
in interface HConnection
- Throws:
HBqlException
releaseElement
public void releaseElement()
- Specified by:
releaseElement
in class PoolableElement<HConnectionImpl>
isClosed
public boolean isClosed()
- Specified by:
isClosed
in interface HConnection
close
public void close()
- Specified by:
close
in interface HConnection
execute
public ExecutionResults execute(String sql)
throws HBqlException
- Specified by:
execute
in interface HConnection
- Throws:
HBqlException
executeQuery
public HResultSet<HRecord> executeQuery(String sql)
throws HBqlException
- Specified by:
executeQuery
in interface HConnection
- Throws:
HBqlException
executeQuery
public <T> HResultSet<T> executeQuery(String sql,
Class clazz)
throws HBqlException
- Specified by:
executeQuery
in interface HConnection
- Throws:
HBqlException
executeQueryAndFetch
public List<HRecord> executeQueryAndFetch(String sql)
throws HBqlException
- Specified by:
executeQueryAndFetch
in interface HConnection
- Throws:
HBqlException
executeQueryAndFetch
public <T> List<T> executeQueryAndFetch(String sql,
Class clazz)
throws HBqlException
- Specified by:
executeQueryAndFetch
in interface HConnection
- Throws:
HBqlException
executeUpdate
public ExecutionResults executeUpdate(String sql)
throws HBqlException
- Specified by:
executeUpdate
in interface HConnection
- Throws:
HBqlException
mappingExists
public boolean mappingExists(String mappingName)
throws HBqlException
- Specified by:
mappingExists
in interface HConnection
- Throws:
HBqlException
getMapping
public TableMapping getMapping(String mappingName)
throws HBqlException
- Specified by:
getMapping
in interface HConnection
- Throws:
HBqlException
dropMapping
public boolean dropMapping(String mappingName)
throws HBqlException
- Specified by:
dropMapping
in interface HConnection
- Throws:
HBqlException
getAllMappings
public Set<HMapping> getAllMappings()
throws HBqlException
- Specified by:
getAllMappings
in interface HConnection
- Throws:
HBqlException
createMapping
public TableMapping createMapping(boolean tempMapping,
boolean systemMapping,
String mappingName,
String tableName,
KeyInfo keyInfo,
List<FamilyMapping> familyList)
throws HBqlException
- Throws:
HBqlException
createTable
public void createTable(org.apache.hadoop.hbase.HTableDescriptor tableDesc)
throws HBqlException
- Throws:
HBqlException
newHTableWrapper
public HTableWrapper newHTableWrapper(WithArgs withArgs,
String tableName)
throws HBqlException
- Throws:
HBqlException
tableExists
public boolean tableExists(String tableName)
throws HBqlException
- Specified by:
tableExists
in interface HConnection
- Throws:
HBqlException
getHTableDescriptor
public org.apache.hadoop.hbase.HTableDescriptor getHTableDescriptor(String tableName)
throws HBqlException
- Specified by:
getHTableDescriptor
in interface HConnection
- Throws:
HBqlException
tableAvailable
public boolean tableAvailable(String tableName)
throws HBqlException
- Throws:
HBqlException
tableEnabled
public boolean tableEnabled(String tableName)
throws HBqlException
- Specified by:
tableEnabled
in interface HConnection
- Throws:
HBqlException
dropTable
public void dropTable(String tableName)
throws HBqlException
- Specified by:
dropTable
in interface HConnection
- Throws:
HBqlException
disableTable
public void disableTable(String tableName)
throws HBqlException
- Specified by:
disableTable
in interface HConnection
- Throws:
HBqlException
enableTable
public void enableTable(String tableName)
throws HBqlException
- Specified by:
enableTable
in interface HConnection
- Throws:
HBqlException
getTableNames
public Set<String> getTableNames()
throws HBqlException
- Specified by:
getTableNames
in interface HConnection
- Throws:
HBqlException
getQueryExecutorForConnection
public CompletionQueueExecutor getQueryExecutorForConnection()
throws HBqlException
- Throws:
HBqlException
getAsyncExecutorForConnection
public AsyncExecutorImpl getAsyncExecutorForConnection()
throws HBqlException
- Throws:
HBqlException
usesQueryExecutor
public boolean usesQueryExecutor()
getQueryExecutorPoolName
public String getQueryExecutorPoolName()
- Specified by:
getQueryExecutorPoolName
in interface HConnection
setQueryExecutorPoolName
public void setQueryExecutorPoolName(String poolName)
- Specified by:
setQueryExecutorPoolName
in interface HConnection
getAsyncExecutorName
public String getAsyncExecutorName()
- Specified by:
getAsyncExecutorName
in interface HConnection
setAsyncExecutorName
public void setAsyncExecutorName(String poolName)
- Specified by:
setAsyncExecutorName
in interface HConnection
newHBatch
public <T> HBatch<T> newHBatch()
- Specified by:
newHBatch
in interface HConnection
validateTableName
public void validateTableName(String tableName)
throws HBqlException
- Throws:
HBqlException
validateTableDisabled
public void validateTableDisabled(String tableName,
String action)
throws HBqlException
- Throws:
HBqlException
validateFamilyExistsForTable
public void validateFamilyExistsForTable(String familyName,
String tableName)
throws HBqlException
- Throws:
HBqlException
validateIndexExistsForTable
public void validateIndexExistsForTable(String indexName,
String tableName)
throws HBqlException
- Throws:
HBqlException
validateQueryExecutorPoolNameExists
public void validateQueryExecutorPoolNameExists(String poolName)
throws HBqlException
- Throws:
HBqlException
validateAsyncExecutorNameExists
public void validateAsyncExecutorNameExists(String name)
throws HBqlException
- Throws:
HBqlException
Copyright © 2011. All Rights Reserved.