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


Java TableInfoMissingException类代码示例

本文整理汇总了Java中org.apache.hadoop.hbase.TableInfoMissingException的典型用法代码示例。如果您正苦于以下问题:Java TableInfoMissingException类的具体用法?Java TableInfoMissingException怎么用?Java TableInfoMissingException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TableInfoMissingException类属于org.apache.hadoop.hbase包,在下文中一共展示了TableInfoMissingException类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getTableDescriptorFromFs

import org.apache.hadoop.hbase.TableInfoMissingException; //导入依赖的package包/类
/**
 * Returns the latest table descriptor for the table located at the given directory
 * directly from the file system if it exists.
 * @throws TableInfoMissingException if there is no descriptor
 */
public static HTableDescriptor getTableDescriptorFromFs(FileSystem fs, Path tableDir)
throws IOException {
  FileStatus status = getTableInfoPath(fs, tableDir);
  if (status == null) {
    throw new TableInfoMissingException("No table descriptor file under " + tableDir);
  }
  FSDataInputStream fsDataInputStream = fs.open(status.getPath());
  HTableDescriptor hTableDescriptor = null;
  try {
    hTableDescriptor = new HTableDescriptor();
    hTableDescriptor.readFields(fsDataInputStream);
  } finally {
    fsDataInputStream.close();
  }
  return hTableDescriptor;
}
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:22,代码来源:FSTableDescriptors.java

示例2: getTableDescriptorModtime

import org.apache.hadoop.hbase.TableInfoMissingException; //导入依赖的package包/类
static TableDescriptorModtime getTableDescriptorModtime(FileSystem fs, Path tableDir)
throws NullPointerException, IOException {
  if (tableDir == null) throw new NullPointerException();
  FileStatus status = getTableInfoPath(fs, tableDir);
  if (status == null) {
    throw new TableInfoMissingException("No .tableinfo file under "
        + tableDir.toUri());
  }
  FSDataInputStream fsDataInputStream = fs.open(status.getPath());
  HTableDescriptor hTableDescriptor = null;
  try {
    hTableDescriptor = new HTableDescriptor();
    hTableDescriptor.readFields(fsDataInputStream);
  } finally {
    fsDataInputStream.close();
  }
  return new TableDescriptorModtime(status.getModificationTime(), hTableDescriptor);
}
 
开发者ID:zwqjsj0404,项目名称:HBase-Research,代码行数:19,代码来源:FSTableDescriptors.java

示例3: getTableDescriptorFromFs

import org.apache.hadoop.hbase.TableInfoMissingException; //导入依赖的package包/类
/**
 * Returns the latest table descriptor for the table located at the given directory
 * directly from the file system if it exists.
 * @throws TableInfoMissingException if there is no descriptor
 */
public static HTableDescriptor getTableDescriptorFromFs(FileSystem fs, Path tableDir,
  boolean rewritePb)
throws IOException {
  FileStatus status = getTableInfoPath(fs, tableDir, false);
  if (status == null) {
    throw new TableInfoMissingException("No table descriptor file under " + tableDir);
  }
  return readTableDescriptor(fs, status, rewritePb);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:15,代码来源:FSTableDescriptors.java

示例4: getTableDescriptorFromFs

import org.apache.hadoop.hbase.TableInfoMissingException; //导入依赖的package包/类
/**
 * Returns the latest table descriptor for the table located at the given directory
 * directly from the file system if it exists.
 * @throws TableInfoMissingException if there is no descriptor
 */
public static HTableDescriptor getTableDescriptorFromFs(FileSystem fs, Path tableDir)
throws IOException {
  FileStatus status = getTableInfoPath(fs, tableDir, false);
  if (status == null) {
    throw new TableInfoMissingException("No table descriptor file under " + tableDir);
  }
  return readTableDescriptor(fs, status, false);
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:14,代码来源:FSTableDescriptors.java

示例5: getTableDescriptorFromFs

import org.apache.hadoop.hbase.TableInfoMissingException; //导入依赖的package包/类
/**
 * Returns the latest table descriptor for the table located at the given directory
 * directly from the file system if it exists.
 * @throws TableInfoMissingException if there is no descriptor
 */
public static TableDescriptor getTableDescriptorFromFs(FileSystem fs, Path tableDir)
throws IOException {
  FileStatus status = getTableInfoPath(fs, tableDir, false);
  if (status == null) {
    throw new TableInfoMissingException("No table descriptor file under " + tableDir);
  }
  return readTableDescriptor(fs, status);
}
 
开发者ID:apache,项目名称:hbase,代码行数:14,代码来源:FSTableDescriptors.java

示例6: getTableDescriptorModtime

import org.apache.hadoop.hbase.TableInfoMissingException; //导入依赖的package包/类
static TableDescriptorModtime getTableDescriptorModtime(FileSystem fs, Path tableDir)
throws NullPointerException, IOException {
  if (tableDir == null) throw new NullPointerException();
  FileStatus status = getTableInfoPath(fs, tableDir);
  if (status == null) {
    throw new TableInfoMissingException("No .tableinfo file under "
        + tableDir.toUri());
  }
  int len = Ints.checkedCast(status.getLen());
  byte [] content = new byte[len];
  FSDataInputStream fsDataInputStream = fs.open(status.getPath());
  try {
    fsDataInputStream.readFully(content);
  } finally {
    fsDataInputStream.close();
  }
  HTableDescriptor htd = null;
  try {
    htd = HTableDescriptor.parseFrom(content);
  } catch (DeserializationException e) {
    throw new IOException("content=" + Bytes.toShort(content), e);
  }
  if (!ProtobufUtil.isPBMagicPrefix(content)) {
    // Convert the file over to be pb before leaving here.
    createTableDescriptor(fs, tableDir.getParent(), htd, true);
  }
  return new TableDescriptorModtime(status.getModificationTime(), htd);
}
 
开发者ID:daidong,项目名称:DominoHBase,代码行数:29,代码来源:FSTableDescriptors.java


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