本文整理汇总了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;
}
示例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;
}
示例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));
}
示例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;
}
示例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));
}