本文整理汇总了Java中org.apache.hadoop.fs.BatchedRemoteIterator.BatchedEntries方法的典型用法代码示例。如果您正苦于以下问题:Java BatchedRemoteIterator.BatchedEntries方法的具体用法?Java BatchedRemoteIterator.BatchedEntries怎么用?Java BatchedRemoteIterator.BatchedEntries使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.fs.BatchedRemoteIterator
的用法示例。
在下文中一共展示了BatchedRemoteIterator.BatchedEntries方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAllCacheDirectives
import org.apache.hadoop.fs.BatchedRemoteIterator; //导入方法依赖的package包/类
List<CacheDirectiveEntry> getAllCacheDirectives(UpstreamManager.Upstream upstream) throws IOException {
CacheDirectiveInfo filter = new CacheDirectiveInfo.Builder().build();
List<CacheDirectiveEntry> directives = new ArrayList<>();
long prevId = -1;
while (true) {
BatchedRemoteIterator.BatchedEntries<CacheDirectiveEntry> it =
upstream.protocol.listCacheDirectives(prevId, filter);
if (it.size() == 0) {
break;
}
for (int i = 0; i < it.size(); i++) {
CacheDirectiveEntry entry = it.get(i);
prevId = entry.getInfo().getId();
directives.add(entry);
}
}
return directives;
}
示例2: getAllCachePools
import org.apache.hadoop.fs.BatchedRemoteIterator; //导入方法依赖的package包/类
List<CachePoolEntry> getAllCachePools(UpstreamManager.Upstream upstream) throws IOException {
String prevPool = "";
List<CachePoolEntry> pools = new ArrayList<>();
while (true) {
BatchedRemoteIterator.BatchedEntries<CachePoolEntry> it = upstream.protocol.listCachePools(prevPool);
if (it.size() == 0) {
break;
}
for (int i = 0; i < it.size(); i++) {
CachePoolEntry entry = it.get(i);
prevPool = entry.getInfo().getPoolName();
pools.add(entry);
}
}
return pools;
}
示例3: listCacheDirectives
import org.apache.hadoop.fs.BatchedRemoteIterator; //导入方法依赖的package包/类
@Override
public BatchedRemoteIterator.BatchedEntries<CacheDirectiveEntry>
listCacheDirectives(long prevId, CacheDirectiveInfo filter)
throws IOException {
try {
AuthorizationProvider.beginClientOp();
return server.listCacheDirectives(prevId, filter);
} finally {
AuthorizationProvider.endClientOp();
}
}
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:12,代码来源:AuthorizationProviderProxyClientProtocol.java
示例4: listCachePools
import org.apache.hadoop.fs.BatchedRemoteIterator; //导入方法依赖的package包/类
@Override
public BatchedRemoteIterator.BatchedEntries<CachePoolEntry> listCachePools(
String prevPool) throws IOException {
try {
AuthorizationProvider.beginClientOp();
return server.listCachePools(prevPool);
} finally {
AuthorizationProvider.endClientOp();
}
}
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:11,代码来源:AuthorizationProviderProxyClientProtocol.java
示例5: listEncryptionZones
import org.apache.hadoop.fs.BatchedRemoteIterator; //导入方法依赖的package包/类
@Override
public BatchedRemoteIterator.BatchedEntries<EncryptionZone>
listEncryptionZones(long prevId) throws IOException {
try {
AuthorizationProvider.beginClientOp();
return server.listEncryptionZones(prevId);
} finally {
AuthorizationProvider.endClientOp();
}
}
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:11,代码来源:AuthorizationProviderProxyClientProtocol.java