Java 类org.apache.hadoop.hbase.util.FSUtils.HFileFilter 实例源码

项目:ditb    文件:HFileCorruptionChecker.java   
/**
 * Check all files in a column family dir.
 *
 * @param cfDir
 *          column family directory
 * @throws IOException
 */
protected void checkColFamDir(Path cfDir) throws IOException {
  FileStatus[] hfs = null;
  try {
    hfs = fs.listStatus(cfDir, new HFileFilter(fs)); // use same filter as scanner.
  } catch (FileNotFoundException fnfe) {
    // Hadoop 0.23+ listStatus semantics throws an exception if the path does not exist.
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }

  // Hadoop 1.0 listStatus does not throw an exception if the path does not exist.
  if (hfs.length == 0 && !fs.exists(cfDir)) {
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }
  for (FileStatus hfFs : hfs) {
    Path hf = hfFs.getPath();
    checkHFile(hf);
  }
}
项目:LCIndex-HBase-0.94.16    文件:HFileCorruptionChecker.java   
/**
 * Check all files in a column family dir.
 *
 * @param cfDir
 *          column family directory
 * @throws IOException
 */
protected void checkColFamDir(Path cfDir) throws IOException {
  FileStatus[] hfs = null;
  try {
    hfs = fs.listStatus(cfDir, new HFileFilter(fs)); // use same filter as scanner.
  } catch (FileNotFoundException fnfe) {
    // Hadoop 0.23+ listStatus semantics throws an exception if the path does not exist.
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }

  // Hadoop 1.0 listStatus does not throw an exception if the path does not exist.
  if (hfs.length == 0 && !fs.exists(cfDir)) {
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }
  for (FileStatus hfFs : hfs) {
    Path hf = hfFs.getPath();
    checkHFile(hf);
  }
}
项目:pbase    文件:HFileCorruptionChecker.java   
/**
 * Check all files in a column family dir.
 *
 * @param cfDir
 *          column family directory
 * @throws IOException
 */
protected void checkColFamDir(Path cfDir) throws IOException {
  FileStatus[] hfs = null;
  try {
    hfs = fs.listStatus(cfDir, new HFileFilter(fs)); // use same filter as scanner.
  } catch (FileNotFoundException fnfe) {
    // Hadoop 0.23+ listStatus semantics throws an exception if the path does not exist.
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }

  // Hadoop 1.0 listStatus does not throw an exception if the path does not exist.
  if (hfs.length == 0 && !fs.exists(cfDir)) {
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }
  for (FileStatus hfFs : hfs) {
    Path hf = hfFs.getPath();
    checkHFile(hf);
  }
}
项目:HIndex    文件:HFileCorruptionChecker.java   
/**
 * Check all files in a column family dir.
 *
 * @param cfDir
 *          column family directory
 * @throws IOException
 */
protected void checkColFamDir(Path cfDir) throws IOException {
  FileStatus[] hfs = null;
  try {
    hfs = fs.listStatus(cfDir, new HFileFilter(fs)); // use same filter as scanner.
  } catch (FileNotFoundException fnfe) {
    // Hadoop 0.23+ listStatus semantics throws an exception if the path does not exist.
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }

  // Hadoop 1.0 listStatus does not throw an exception if the path does not exist.
  if (hfs.length == 0 && !fs.exists(cfDir)) {
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }
  for (FileStatus hfFs : hfs) {
    Path hf = hfFs.getPath();
    checkHFile(hf);
  }
}
项目:IRIndex    文件:HFileCorruptionChecker.java   
/**
 * Check all files in a column family dir.
 *
 * @param cfDir
 *          column family directory
 * @throws IOException
 */
protected void checkColFamDir(Path cfDir) throws IOException {
  FileStatus[] hfs = null;
  try {
    hfs = fs.listStatus(cfDir, new HFileFilter(fs)); // use same filter as scanner.
  } catch (FileNotFoundException fnfe) {
    // Hadoop 0.23+ listStatus semantics throws an exception if the path does not exist.
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }

  // Hadoop 1.0 listStatus does not throw an exception if the path does not exist.
  if (hfs.length == 0 && !fs.exists(cfDir)) {
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }
  for (FileStatus hfFs : hfs) {
    Path hf = hfFs.getPath();
    checkHFile(hf);
  }
}
项目:hbase    文件:HFileCorruptionChecker.java   
/**
 * Check all files in a column family dir.
 *
 * @param cfDir
 *          column family directory
 * @throws IOException
 */
protected void checkColFamDir(Path cfDir) throws IOException {
  FileStatus[] statuses = null;
  try {
    statuses = fs.listStatus(cfDir); // use same filter as scanner.
  } catch (FileNotFoundException fnfe) {
    // Hadoop 0.23+ listStatus semantics throws an exception if the path does not exist.
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }

  List<FileStatus> hfs = FSUtils.filterFileStatuses(statuses, new HFileFilter(fs));
  // Hadoop 1.0 listStatus does not throw an exception if the path does not exist.
  if (hfs.isEmpty() && !fs.exists(cfDir)) {
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }
  for (FileStatus hfFs : hfs) {
    Path hf = hfFs.getPath();
    checkHFile(hf);
  }
}
项目:hbase    文件:HFileCorruptionChecker.java   
/**
 * Check all files in a mob column family dir.
 *
 * @param cfDir
 *          mob column family directory
 * @throws IOException
 */
protected void checkMobColFamDir(Path cfDir) throws IOException {
  FileStatus[] statuses = null;
  try {
    statuses = fs.listStatus(cfDir); // use same filter as scanner.
  } catch (FileNotFoundException fnfe) {
    // Hadoop 0.23+ listStatus semantics throws an exception if the path does not exist.
    LOG.warn("Mob colfam Directory " + cfDir +
        " does not exist.  Likely the table is deleted. Skipping.");
    missedMobFiles.add(cfDir);
    return;
  }

  List<FileStatus> hfs = FSUtils.filterFileStatuses(statuses, new HFileFilter(fs));
  // Hadoop 1.0 listStatus does not throw an exception if the path does not exist.
  if (hfs.isEmpty() && !fs.exists(cfDir)) {
    LOG.warn("Mob colfam Directory " + cfDir +
        " does not exist.  Likely the table is deleted. Skipping.");
    missedMobFiles.add(cfDir);
    return;
  }
  for (FileStatus hfFs : hfs) {
    Path hf = hfFs.getPath();
    checkMobFile(hf);
  }
}
项目:PyroDB    文件:HFileCorruptionChecker.java   
/**
 * Check all files in a column family dir.
 *
 * @param cfDir
 *          column family directory
 * @throws IOException
 */
protected void checkColFamDir(Path cfDir) throws IOException {
  FileStatus[] hfs = null;
  try {
    hfs = fs.listStatus(cfDir, new HFileFilter(fs)); // use same filter as scanner.
  } catch (FileNotFoundException fnfe) {
    // Hadoop 0.23+ listStatus semantics throws an exception if the path does not exist.
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }

  // Hadoop 1.0 listStatus does not throw an exception if the path does not exist.
  if (hfs.length == 0 && !fs.exists(cfDir)) {
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }
  for (FileStatus hfFs : hfs) {
    Path hf = hfFs.getPath();
    checkHFile(hf);
  }
}
项目:c5    文件:HFileCorruptionChecker.java   
/**
 * Check all files in a column family dir.
 *
 * @param cfDir
 *          column family directory
 * @throws IOException
 */
protected void checkColFamDir(Path cfDir) throws IOException {
  FileStatus[] hfs = null;
  try {
    hfs = fs.listStatus(cfDir, new HFileFilter(fs)); // use same filter as scanner.
  } catch (FileNotFoundException fnfe) {
    // Hadoop 0.23+ listStatus semantics throws an exception if the path does not exist.
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }

  // Hadoop 1.0 listStatus does not throw an exception if the path does not exist.
  if (hfs.length == 0 && !fs.exists(cfDir)) {
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }
  for (FileStatus hfFs : hfs) {
    Path hf = hfFs.getPath();
    checkHFile(hf);
  }
}
项目:HBase-Research    文件:HFileCorruptionChecker.java   
/**
 * Check all files in a column family dir.
 *
 * @param cfDir
 *          column family directory
 * @throws IOException
 */
protected void checkColFamDir(Path cfDir) throws IOException {
  FileStatus[] hfs = null;
  try {
    hfs = fs.listStatus(cfDir, new HFileFilter(fs)); // use same filter as scanner.
  } catch (FileNotFoundException fnfe) {
    // Hadoop 0.23+ listStatus semantics throws an exception if the path does not exist.
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }

  // Hadoop 1.0 listStatus does not throw an exception if the path does not exist.
  if (hfs.length == 0 && !fs.exists(cfDir)) {
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }
  for (FileStatus hfFs : hfs) {
    Path hf = hfFs.getPath();
    checkHFile(hf);
  }
}
项目:hbase-0.94.8-qod    文件:HFileCorruptionChecker.java   
/**
 * Check all files in a column family dir.
 *
 * @param cfDir
 *          column family directory
 * @throws IOException
 */
protected void checkColFamDir(Path cfDir) throws IOException {
  FileStatus[] hfs = null;
  try {
    hfs = fs.listStatus(cfDir, new HFileFilter(fs)); // use same filter as scanner.
  } catch (FileNotFoundException fnfe) {
    // Hadoop 0.23+ listStatus semantics throws an exception if the path does not exist.
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }

  // Hadoop 1.0 listStatus does not throw an exception if the path does not exist.
  if (hfs.length == 0 && !fs.exists(cfDir)) {
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }
  for (FileStatus hfFs : hfs) {
    Path hf = hfFs.getPath();
    checkHFile(hf);
  }
}
项目:hbase-0.94.8-qod    文件:HFileCorruptionChecker.java   
/**
 * Check all files in a column family dir.
 *
 * @param cfDir
 *          column family directory
 * @throws IOException
 */
protected void checkColFamDir(Path cfDir) throws IOException {
  FileStatus[] hfs = null;
  try {
    hfs = fs.listStatus(cfDir, new HFileFilter(fs)); // use same filter as scanner.
  } catch (FileNotFoundException fnfe) {
    // Hadoop 0.23+ listStatus semantics throws an exception if the path does not exist.
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }

  // Hadoop 1.0 listStatus does not throw an exception if the path does not exist.
  if (hfs.length == 0 && !fs.exists(cfDir)) {
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }
  for (FileStatus hfFs : hfs) {
    Path hf = hfFs.getPath();
    checkHFile(hf);
  }
}
项目:DominoHBase    文件:HFileCorruptionChecker.java   
/**
 * Check all files in a column family dir.
 *
 * @param cfDir
 *          column family directory
 * @throws IOException
 */
protected void checkColFamDir(Path cfDir) throws IOException {
  FileStatus[] hfs = null;
  try {
    hfs = fs.listStatus(cfDir, new HFileFilter(fs)); // use same filter as scanner.
  } catch (FileNotFoundException fnfe) {
    // Hadoop 0.23+ listStatus semantics throws an exception if the path does not exist.
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }

  // Hadoop 1.0 listStatus does not throw an exception if the path does not exist.
  if (hfs.length == 0 && !fs.exists(cfDir)) {
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }
  for (FileStatus hfFs : hfs) {
    Path hf = hfFs.getPath();
    checkHFile(hf);
  }
}
项目:hindex    文件:HFileCorruptionChecker.java   
/**
 * Check all files in a column family dir.
 *
 * @param cfDir
 *          column family directory
 * @throws IOException
 */
protected void checkColFamDir(Path cfDir) throws IOException {
  FileStatus[] hfs = null;
  try {
    hfs = fs.listStatus(cfDir, new HFileFilter(fs)); // use same filter as scanner.
  } catch (FileNotFoundException fnfe) {
    // Hadoop 0.23+ listStatus semantics throws an exception if the path does not exist.
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }

  // Hadoop 1.0 listStatus does not throw an exception if the path does not exist.
  if (hfs.length == 0 && !fs.exists(cfDir)) {
    LOG.warn("Colfam Directory " + cfDir +
        " does not exist.  Likely due to concurrent split/compaction. Skipping.");
    missing.add(cfDir);
    return;
  }
  for (FileStatus hfFs : hfs) {
    Path hf = hfFs.getPath();
    checkHFile(hf);
  }
}