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


Java ServerRegionReplicaUtil.getStoreFileInfo方法代码示例

本文整理汇总了Java中org.apache.hadoop.hbase.util.ServerRegionReplicaUtil.getStoreFileInfo方法的典型用法代码示例。如果您正苦于以下问题:Java ServerRegionReplicaUtil.getStoreFileInfo方法的具体用法?Java ServerRegionReplicaUtil.getStoreFileInfo怎么用?Java ServerRegionReplicaUtil.getStoreFileInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.hbase.util.ServerRegionReplicaUtil的用法示例。


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

示例1: getStoreFiles

import org.apache.hadoop.hbase.util.ServerRegionReplicaUtil; //导入方法依赖的package包/类
/**
 * Returns the store files available for the family.
 * This methods performs the filtering based on the valid store files.
 * @param familyName Column Family Name
 * @return a set of {@link StoreFileInfo} for the specified family.
 */
public Collection<StoreFileInfo> getStoreFiles(final String familyName, final boolean validate)
    throws IOException {
  Path familyDir = getStoreDir(familyName);
  FileStatus[] files = FSUtils.listStatus(this.fs, familyDir);
  if (files == null) {
    if (LOG.isTraceEnabled()) {
      LOG.trace("No StoreFiles for: " + familyDir);
    }
    return null;
  }

  ArrayList<StoreFileInfo> storeFiles = new ArrayList<>(files.length);
  for (FileStatus status: files) {
    if (validate && !StoreFileInfo.isValid(status)) {
      LOG.warn("Invalid StoreFile: " + status.getPath());
      continue;
    }
    StoreFileInfo info = ServerRegionReplicaUtil.getStoreFileInfo(conf, fs, regionInfo,
      regionInfoForFs, familyName, status.getPath());
    storeFiles.add(info);

  }
  return storeFiles;
}
 
开发者ID:apache,项目名称:hbase,代码行数:31,代码来源:HRegionFileSystem.java

示例2: getStoreFiles

import org.apache.hadoop.hbase.util.ServerRegionReplicaUtil; //导入方法依赖的package包/类
/**
 * Returns the store files available for the family. This methods performs the filtering based on
 * the valid store files.
 *
 * @param familyName Column Family Name
 * @return a set of {@link StoreFileInfo} for the specified family.
 */
public Collection<StoreFileInfo> getStoreFiles(final String familyName, final boolean validate)
    throws IOException {
  Path familyDir = getStoreDir(familyName);
  // FileStatus[] files = FSUtils.listStatus(this.fs, familyDir);
  FileStatus[] files = FSUtils.listStatus(this.fs, familyDir, new PathFilter() {
    @Override public boolean accept(Path path) {
      String name = path.getName();
      if (name.endsWith(IndexConstants.REGION_INDEX_DIR_NAME) || name
          .endsWith(LMDIndexConstants.BUCKET_FILE_SUFFIX) || name
          .endsWith(LMDIndexConstants.DATA_FILE_SUFFIX)) return false;
      return true;
    }
  });
  if (files == null) {
    LOG.debug("No StoreFiles for: " + familyDir);
    return null;
  }

  ArrayList<StoreFileInfo> storeFiles = new ArrayList<StoreFileInfo>(files.length);
  for (FileStatus status : files) {
    if (validate && !StoreFileInfo.isValid(status)) {
      LOG.warn("Invalid StoreFile: " + status.getPath());
      continue;
    }
    StoreFileInfo info = ServerRegionReplicaUtil
        .getStoreFileInfo(conf, fs, regionInfo, regionInfoForFs, familyName, status.getPath());
    storeFiles.add(info);
  }
  return storeFiles;
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:38,代码来源:HRegionFileSystem.java

示例3: getStoreFileInfo

import org.apache.hadoop.hbase.util.ServerRegionReplicaUtil; //导入方法依赖的package包/类
/**
 * Return the store file information of the specified family/file.
 *
 * @param familyName Column Family Name
 * @param fileName   File Name
 * @return The {@link StoreFileInfo} for the specified family/file
 */
StoreFileInfo getStoreFileInfo(final String familyName, final String fileName)
    throws IOException {
  Path familyDir = getStoreDir(familyName);
  return ServerRegionReplicaUtil
      .getStoreFileInfo(conf, fs, regionInfo, regionInfoForFs, familyName,
          new Path(familyDir, fileName));
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:15,代码来源:HRegionFileSystem.java

示例4: getStoreFiles

import org.apache.hadoop.hbase.util.ServerRegionReplicaUtil; //导入方法依赖的package包/类
/**
 * Returns the store files available for the family.
 * This methods performs the filtering based on the valid store files.
 * @param familyName Column Family Name
 * @return a set of {@link StoreFileInfo} for the specified family.
 */
public Collection<StoreFileInfo> getStoreFiles(final String familyName, final boolean validate)
    throws IOException {
  Path familyDir = getStoreDir(familyName);
  FileStatus[] files = FSUtils.listStatus(this.fs, familyDir);
  if (files == null) {
    LOG.debug("No StoreFiles for: " + familyDir);
    return null;
  }

  ArrayList<StoreFileInfo> storeFiles = new ArrayList<StoreFileInfo>(files.length);
  for (FileStatus status: files) {
      if(!status.getPath().getName().endsWith(".parquet")) {
          if (validate && !StoreFileInfo.isValid(status)) {
              LOG.warn("Invalid StoreFile: " + status.getPath());
              continue;
          }
          StoreFileInfo info = ServerRegionReplicaUtil.getStoreFileInfo(conf, fs, regionInfo,
                  regionInfoForFs, familyName, status);
          storeFiles.add(info);
      }else {
          //@author wangxiaoyi
          //TODO : restore the parquet files into memory
      }

  }
  return storeFiles;
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:34,代码来源:HRegionFileSystem.java

示例5: getStoreFileInfo

import org.apache.hadoop.hbase.util.ServerRegionReplicaUtil; //导入方法依赖的package包/类
/**
 * Return the store file information of the specified family/file.
 *
 * @param familyName Column Family Name
 * @param fileName File Name
 * @return The {@link StoreFileInfo} for the specified family/file
 */
StoreFileInfo getStoreFileInfo(final String familyName, final String fileName)
    throws IOException {
  Path familyDir = getStoreDir(familyName);
  return ServerRegionReplicaUtil.getStoreFileInfo(conf, fs, regionInfo,
    regionInfoForFs, familyName, new Path(familyDir, fileName));
}
 
开发者ID:apache,项目名称:hbase,代码行数:14,代码来源:HRegionFileSystem.java


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