當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。