本文整理匯總了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));
}