当前位置: 首页>>代码示例>>Java>>正文


Java Type类代码示例

本文整理汇总了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();
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:24,代码来源:SnapshotManager.java

示例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);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:19,代码来源:SnapshotManager.java

示例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);
}
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:19,代码来源:SnapshotManager.java

示例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);
}
 
开发者ID:dvimont,项目名称:ColumnManagerForHBase,代码行数:5,代码来源:MAdmin.java

示例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);
}
 
开发者ID:mixaceh,项目名称:openyu-commons,代码行数:6,代码来源:HzSessionImpl.java

示例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;
 
开发者ID:mixaceh,项目名称:openyu-commons,代码行数:3,代码来源:HzSession.java

示例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();
}
 
开发者ID:intel-hadoop,项目名称:CSBT,代码行数:8,代码来源:CrossSiteHBaseAdmin.java


注:本文中的org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription.Type类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。