Java 类org.apache.hadoop.hbase.TableInfoMissingException 实例源码

项目:LCIndex-HBase-0.94.16    文件:FSTableDescriptors.java   
/**
 * 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;
}
项目:IRIndex    文件:FSTableDescriptors.java   
/**
 * 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;
}
项目:HBase-Research    文件:FSTableDescriptors.java   
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);
}
项目:hbase-0.94.8-qod    文件:FSTableDescriptors.java   
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);
}
项目:hbase-0.94.8-qod    文件:FSTableDescriptors.java   
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);
}
项目:hindex    文件:FSTableDescriptors.java   
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);
}
项目:ditb    文件:FSTableDescriptors.java   
/**
 * 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);
}
项目:pbase    文件:FSTableDescriptors.java   
/**
 * 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);
}
项目:HIndex    文件:FSTableDescriptors.java   
/**
 * 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);
}
项目:hbase    文件:FSTableDescriptors.java   
/**
 * 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);
}
项目:PyroDB    文件:FSTableDescriptors.java   
/**
 * 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);
}
项目:c5    文件:FSTableDescriptors.java   
/**
 * 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);
}
项目:DominoHBase    文件:FSTableDescriptors.java   
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);
}