public abstract class AbstractHBaseDataSetAdmin extends Object implements co.cask.cdap.api.dataset.DatasetAdmin
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractHBaseDataSetAdmin.CoprocessorJar
Holder for coprocessor information.
|
| Modifier and Type | Field and Description |
|---|---|
protected Configuration |
hConf |
static String |
SYSTEM_PROPERTY_FORCE_HBASE_UPGRADE
This will only be set by the upgrade tool to force upgrade of all HBase coprocessors after an HBase upgrade.
|
protected TableId |
tableId |
protected HBaseTableUtil |
tableUtil |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractHBaseDataSetAdmin(TableId tableId,
Configuration hConf,
HBaseTableUtil tableUtil) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCoprocessor(HTableDescriptorBuilder tableDescriptor,
Class<? extends org.apache.hadoop.hbase.Coprocessor> coprocessor,
Location jarFile,
Integer priority) |
void |
close() |
protected abstract AbstractHBaseDataSetAdmin.CoprocessorJar |
createCoprocessorJar() |
void |
drop() |
boolean |
exists() |
protected org.apache.hadoop.hbase.client.HBaseAdmin |
getAdmin() |
static ProjectInfo.Version |
getVersion(org.apache.hadoop.hbase.HTableDescriptor tableDescriptor) |
static void |
setVersion(HTableDescriptorBuilder tableDescriptor) |
void |
truncate() |
void |
upgrade() |
void |
upgradeTable(boolean force)
Performs upgrade on a given HBase table.
|
protected abstract boolean |
upgradeTable(org.apache.hadoop.hbase.HTableDescriptor tableDescriptor)
Modifies the table descriptor for upgrade.
|
public static final String SYSTEM_PROPERTY_FORCE_HBASE_UPGRADE
protected final TableId tableId
protected final Configuration hConf
protected final HBaseTableUtil tableUtil
protected AbstractHBaseDataSetAdmin(TableId tableId, Configuration hConf, HBaseTableUtil tableUtil)
public void upgrade()
throws IOException
upgrade in interface co.cask.cdap.api.dataset.DatasetAdminIOExceptionpublic boolean exists()
throws IOException
exists in interface co.cask.cdap.api.dataset.DatasetAdminIOExceptionpublic void truncate()
throws IOException
truncate in interface co.cask.cdap.api.dataset.DatasetAdminIOExceptionpublic void drop()
throws IOException
drop in interface co.cask.cdap.api.dataset.DatasetAdminIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void upgradeTable(boolean force)
throws IOException
force - forces upgrade regardless of whether the table needs upgrade.IOException - If upgrade failed.public static void setVersion(HTableDescriptorBuilder tableDescriptor)
public static ProjectInfo.Version getVersion(org.apache.hadoop.hbase.HTableDescriptor tableDescriptor)
protected void addCoprocessor(HTableDescriptorBuilder tableDescriptor, Class<? extends org.apache.hadoop.hbase.Coprocessor> coprocessor, Location jarFile, Integer priority) throws IOException
IOExceptionprotected abstract AbstractHBaseDataSetAdmin.CoprocessorJar createCoprocessorJar() throws IOException
IOExceptionprotected abstract boolean upgradeTable(org.apache.hadoop.hbase.HTableDescriptor tableDescriptor)
protected org.apache.hadoop.hbase.client.HBaseAdmin getAdmin() throws IOException
IOExceptionCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.