本文整理汇总了Java中org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription.Type类的典型用法代码示例。如果您正苦于以下问题:Java Type类的具体用法?Java Type怎么用?Java Type使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Type类属于org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription包,在下文中一共展示了Type类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toSnapshotDescription
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription.Type; //导入依赖的package包/类
private SnapshotDescription toSnapshotDescription(ProcedureDescription desc)
throws IOException {
SnapshotDescription.Builder builder = SnapshotDescription.newBuilder();
if (!desc.hasInstance()) {
throw new IOException("Snapshot name is not defined: " + desc.toString());
}
String snapshotName = desc.getInstance();
List<NameStringPair> props = desc.getConfigurationList();
String table = null;
for (NameStringPair prop : props) {
if ("table".equalsIgnoreCase(prop.getName())) {
table = prop.getValue();
}
}
if (table == null) {
throw new IOException("Snapshot table is not defined: " + desc.toString());
}
TableName tableName = TableName.valueOf(table);
builder.setTable(tableName.getNameAsString());
builder.setName(snapshotName);
builder.setType(SnapshotDescription.Type.FLUSH);
return builder.build();
}
示例2: snapshotDisabledTable
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription.Type; //导入依赖的package包/类
/**
* Take a snapshot of a disabled table.
* @param snapshot description of the snapshot to take. Modified to be {@link Type#DISABLED}.
* @throws HBaseSnapshotException if the snapshot could not be started
*/
private synchronized void snapshotDisabledTable(SnapshotDescription snapshot)
throws HBaseSnapshotException {
// setup the snapshot
prepareToTakeSnapshot(snapshot);
// set the snapshot to be a disabled snapshot, since the client doesn't know about that
snapshot = snapshot.toBuilder().setType(Type.DISABLED).build();
// Take the snapshot of the disabled table
DisabledTableSnapshotHandler handler =
new DisabledTableSnapshotHandler(snapshot, master);
snapshotTable(snapshot, handler);
}
示例3: snapshotDisabledTable
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription.Type; //导入依赖的package包/类
/**
* Take a snapshot of a disabled table.
* @param snapshot description of the snapshot to take. Modified to be {@link Type#DISABLED}.
* @throws HBaseSnapshotException if the snapshot could not be started
*/
private synchronized void snapshotDisabledTable(SnapshotDescription snapshot)
throws HBaseSnapshotException {
// setup the snapshot
prepareToTakeSnapshot(snapshot);
// set the snapshot to be a disabled snapshot, since the client doesn't know about that
snapshot = snapshot.toBuilder().setType(Type.DISABLED).build();
// Take the snapshot of the disabled table
DisabledTableSnapshotHandler handler =
new DisabledTableSnapshotHandler(snapshot, master, metricsMaster);
snapshotTable(snapshot, handler);
}
示例4: snapshot
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription.Type; //导入依赖的package包/类
@Override
public void snapshot(String string, TableName tn, Type type) throws IOException, SnapshotCreationException, IllegalArgumentException {
wrappedHbaseAdmin.snapshot(string, tn, type);
}
示例5: snapshot
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription.Type; //导入依赖的package包/类
public void snapshot(String snapshotName, String tableName, Type type)
throws IOException, SnapshotCreationException,
IllegalArgumentException {
delegate.snapshot(snapshotName, tableName, type);
}
示例6: snapshot
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription.Type; //导入依赖的package包/类
void snapshot(String snapshotName, String tableName, Type type)
throws IOException, SnapshotCreationException, IllegalArgumentException;
示例7: snapshot
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription.Type; //导入依赖的package包/类
/**
* Unsupported.
*/
public void snapshot(String snapshotName, String tableName, Type type) throws IOException,
SnapshotCreationException, IllegalArgumentException {
throw new UnsupportedOperationException();
}