本文整理汇总了Java中org.apache.hadoop.hbase.RemoteExceptionHandler.decodeRemoteException方法的典型用法代码示例。如果您正苦于以下问题:Java RemoteExceptionHandler.decodeRemoteException方法的具体用法?Java RemoteExceptionHandler.decodeRemoteException怎么用?Java RemoteExceptionHandler.decodeRemoteException使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.hbase.RemoteExceptionHandler
的用法示例。
在下文中一共展示了RemoteExceptionHandler.decodeRemoteException方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAlterStatus
import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入方法依赖的package包/类
/**
* Get the status of alter command - indicates how many regions have received the updated schema
* Asynchronous operation.
* @param tableName name of the table to get the status of
* @return Pair indicating the number of regions updated Pair.getFirst() is the regions that are
* yet to be updated Pair.getSecond() is the total number of regions of the table
* @throws IOException if a remote or network exception occurs
*/
public Pair<Integer, Integer> getAlterStatus(final byte[] tableName) throws IOException {
HTableDescriptor.isLegalTableName(tableName);
try {
return getMaster().getAlterStatus(tableName);
} catch (RemoteException e) {
throw RemoteExceptionHandler.decodeRemoteException(e);
}
}
示例2: addColumn
import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入方法依赖的package包/类
/**
* Add a column to an existing table. Asynchronous operation.
* @param tableName name of the table to add column to
* @param column column descriptor of column to be added
* @throws IOException if a remote or network exception occurs
*/
public void addColumn(final byte[] tableName, HColumnDescriptor column) throws IOException {
HTableDescriptor.isLegalTableName(tableName);
try {
getMaster().addColumn(tableName, column);
} catch (RemoteException e) {
throw RemoteExceptionHandler.decodeRemoteException(e);
}
}
示例3: deleteColumn
import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入方法依赖的package包/类
/**
* Delete a column from a table. Asynchronous operation.
* @param tableName name of table
* @param columnName name of column to be deleted
* @throws IOException if a remote or network exception occurs
*/
public void deleteColumn(final byte[] tableName, final byte[] columnName) throws IOException {
try {
getMaster().deleteColumn(tableName, columnName);
} catch (RemoteException e) {
throw RemoteExceptionHandler.decodeRemoteException(e);
}
}
示例4: modifyColumn
import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入方法依赖的package包/类
/**
* Modify an existing column family on a table. Asynchronous operation.
* @param tableName name of table
* @param descriptor new column descriptor to use
* @throws IOException if a remote or network exception occurs
*/
public void modifyColumn(final byte[] tableName, HColumnDescriptor descriptor) throws IOException {
try {
getMaster().modifyColumn(tableName, descriptor);
} catch (RemoteException re) {
// Convert RE exceptions in here; client shouldn't have to deal with them,
// at least w/ the type of exceptions that come out of this method:
// TableNotFoundException, etc.
throw RemoteExceptionHandler.decodeRemoteException(re);
}
}
示例5: modifyTable
import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入方法依赖的package包/类
/**
* Modify an existing table, more IRB friendly version. Asynchronous operation. This means that it
* may be a while before your schema change is updated across all of the table.
* @param tableName name of table.
* @param htd modified description of the table
* @throws IOException if a remote or network exception occurs
*/
public void modifyTable(final byte[] tableName, HTableDescriptor htd) throws IOException {
try {
getMaster().modifyTable(tableName, htd);
} catch (RemoteException re) {
// Convert RE exceptions in here; client shouldn't have to deal with them,
// at least w/ the type of exceptions that come out of this method:
// TableNotFoundException, etc.
throw RemoteExceptionHandler.decodeRemoteException(re);
}
}
示例6: shutdown
import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入方法依赖的package包/类
/**
* Shuts down the HBase cluster
* @throws IOException if a remote or network exception occurs
*/
public synchronized void shutdown() throws IOException {
isMasterRunning();
try {
getMaster().shutdown();
} catch (RemoteException e) {
throw RemoteExceptionHandler.decodeRemoteException(e);
}
}
示例7: stopMaster
import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入方法依赖的package包/类
/**
* Shuts down the current HBase master only. Does not shutdown the cluster.
* @see #shutdown()
* @throws IOException if a remote or network exception occurs
*/
public synchronized void stopMaster() throws IOException {
isMasterRunning();
try {
getMaster().stopMaster();
} catch (RemoteException e) {
throw RemoteExceptionHandler.decodeRemoteException(e);
}
}
示例8: listSnapshots
import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入方法依赖的package包/类
/**
* List completed snapshots.
* @return a list of snapshot descriptors for completed snapshots
* @throws IOException if a network error occurs
*/
public List<SnapshotDescription> listSnapshots() throws IOException {
List<SnapshotDescription> snapshots = new LinkedList<SnapshotDescription>();
try {
for (HSnapshotDescription snapshot : getMaster().getCompletedSnapshots()) {
snapshots.add(snapshot.getProto());
}
} catch (RemoteException e) {
throw RemoteExceptionHandler.decodeRemoteException(e);
}
return snapshots;
}
示例9: deleteSnapshot
import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入方法依赖的package包/类
/**
* Delete an existing snapshot.
* @param snapshotName name of the snapshot
* @throws IOException if a remote or network exception occurs
*/
public void deleteSnapshot(final byte[] snapshotName) throws IOException {
// make sure the snapshot is possibly valid
HTableDescriptor.isLegalTableName(snapshotName);
// do the delete
SnapshotDescription snapshot = SnapshotDescription.newBuilder()
.setName(Bytes.toString(snapshotName)).build();
try {
getMaster().deleteSnapshot(new HSnapshotDescription(snapshot));
} catch (RemoteException e) {
throw RemoteExceptionHandler.decodeRemoteException(e);
}
}
示例10: addColumn
import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入方法依赖的package包/类
/**
* Add a column to an existing table.
* Asynchronous operation.
*
* @param tableName name of the table to add column to
* @param column column descriptor of column to be added
* @throws IOException if a remote or network exception occurs
*/
public void addColumn(final byte [] tableName, HColumnDescriptor column)
throws IOException {
HTableDescriptor.isLegalTableName(tableName);
try {
getMaster().addColumn(tableName, column);
} catch (RemoteException e) {
throw RemoteExceptionHandler.decodeRemoteException(e);
}
}
示例11: deleteColumn
import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入方法依赖的package包/类
/**
* Delete a column from a table.
* Asynchronous operation.
*
* @param tableName name of table
* @param columnName name of column to be deleted
* @throws IOException if a remote or network exception occurs
*/
public void deleteColumn(final byte [] tableName, final byte [] columnName)
throws IOException {
try {
getMaster().deleteColumn(tableName, columnName);
} catch (RemoteException e) {
throw RemoteExceptionHandler.decodeRemoteException(e);
}
}
示例12: modifyColumn
import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入方法依赖的package包/类
/**
* Modify an existing column family on a table.
* Asynchronous operation.
*
* @param tableName name of table
* @param descriptor new column descriptor to use
* @throws IOException if a remote or network exception occurs
*/
public void modifyColumn(final byte [] tableName, HColumnDescriptor descriptor)
throws IOException {
try {
getMaster().modifyColumn(tableName, descriptor);
} catch (RemoteException re) {
// Convert RE exceptions in here; client shouldn't have to deal with them,
// at least w/ the type of exceptions that come out of this method:
// TableNotFoundException, etc.
throw RemoteExceptionHandler.decodeRemoteException(re);
}
}
示例13: modifyTable
import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入方法依赖的package包/类
/**
* Modify an existing table, more IRB friendly version.
* Asynchronous operation. This means that it may be a while before your
* schema change is updated across all of the table.
*
* @param tableName name of table.
* @param htd modified description of the table
* @throws IOException if a remote or network exception occurs
*/
public void modifyTable(final byte [] tableName, HTableDescriptor htd)
throws IOException {
try {
getMaster().modifyTable(tableName, htd);
} catch (RemoteException re) {
// Convert RE exceptions in here; client shouldn't have to deal with them,
// at least w/ the type of exceptions that come out of this method:
// TableNotFoundException, etc.
throw RemoteExceptionHandler.decodeRemoteException(re);
}
}
示例14: stopMaster
import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入方法依赖的package包/类
/**
* Shuts down the current HBase master only.
* Does not shutdown the cluster.
* @see #shutdown()
* @throws IOException if a remote or network exception occurs
*/
public synchronized void stopMaster() throws IOException {
isMasterRunning();
try {
getMaster().stopMaster();
} catch (RemoteException e) {
throw RemoteExceptionHandler.decodeRemoteException(e);
}
}
示例15: listSnapshots
import org.apache.hadoop.hbase.RemoteExceptionHandler; //导入方法依赖的package包/类
/**
* List completed snapshots.
* @return a list of snapshot descriptors for completed snapshots
* @throws IOException if a network error occurs
*/
public List<SnapshotDescription> listSnapshots() throws IOException {
List<SnapshotDescription> snapshots = new LinkedList<SnapshotDescription>();
try {
for (HSnapshotDescription snapshot: getMaster().getCompletedSnapshots()) {
snapshots.add(snapshot.getProto());
}
} catch (RemoteException e) {
throw RemoteExceptionHandler.decodeRemoteException(e);
}
return snapshots;
}