本文整理汇总了Java中org.apache.hadoop.hdfs.server.namenode.INodeAttributes.Finder方法的典型用法代码示例。如果您正苦于以下问题:Java INodeAttributes.Finder方法的具体用法?Java INodeAttributes.Finder怎么用?Java INodeAttributes.Finder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.hdfs.server.namenode.INodeAttributes
的用法示例。
在下文中一共展示了INodeAttributes.Finder方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findByPrimaryKeys
import org.apache.hadoop.hdfs.server.namenode.INodeAttributes; //导入方法依赖的package包/类
private Collection<INodeAttributes> findByPrimaryKeys(
INodeAttributes.Finder qfinder, Object[] params)
throws StorageCallPreventedException, StorageException {
final List<INodeCandidatePrimaryKey> inodePks =
(List<INodeCandidatePrimaryKey>) params[0];
Collection<INodeAttributes> result = null;
if (contains(inodePks)) {
result = get(inodePks);
hit(qfinder, result, "inodeids", inodePks);
} else {
aboutToAccessStorage(qfinder, inodePks);
result = dataAccess.findAttributesByPkList(inodePks);
gotFromDB(result);
miss(qfinder, result, "inodeids", inodePks);
if(result!=null){
for(INodeAttributes iNodeAttributes:result){
log("read-attributes", "id", iNodeAttributes.getInodeId(), "DSQ", iNodeAttributes.getDsQuota(),"DS", iNodeAttributes.getDiskspace(), "NSQ", iNodeAttributes.getNsQuota(), "NS", iNodeAttributes.getNsCount());
}
}
}
return result;
}
示例2: find
import org.apache.hadoop.hdfs.server.namenode.INodeAttributes; //导入方法依赖的package包/类
@Override
public INodeAttributes find(FinderType<INodeAttributes> finder,
Object... params) throws TransactionContextException, StorageException {
INodeAttributes.Finder qfinder = (INodeAttributes.Finder) finder;
switch (qfinder) {
case ByINodeId:
return findByPrimaryKey(qfinder, params);
}
throw new UnsupportedOperationException(UNSUPPORTED_FINDER);
}
示例3: findList
import org.apache.hadoop.hdfs.server.namenode.INodeAttributes; //导入方法依赖的package包/类
@Override
public Collection<INodeAttributes> findList(
FinderType<INodeAttributes> finder, Object... params)
throws TransactionContextException, StorageException {
INodeAttributes.Finder qfinder = (INodeAttributes.Finder) finder;
switch (qfinder) {
case ByINodeIds:
return findByPrimaryKeys(qfinder, params);
}
throw new UnsupportedOperationException(UNSUPPORTED_FINDER);
}
示例4: findByPrimaryKey
import org.apache.hadoop.hdfs.server.namenode.INodeAttributes; //导入方法依赖的package包/类
private INodeAttributes findByPrimaryKey(INodeAttributes.Finder qfinder,
Object[] params) throws StorageCallPreventedException, StorageException {
final int inodeId = (Integer) params[0];
INodeAttributes result = null;
if (contains(inodeId)) {
result = get(inodeId);
hit(qfinder, result, "inodeid", inodeId);
} else {
aboutToAccessStorage(qfinder, params);
result = dataAccess.findAttributesByPk(inodeId);
gotFromDB(inodeId, result);
miss(qfinder, result, "inodeid", inodeId, "size", size());
}
return result;
}