本文整理汇总了Java中mil.nga.giat.geowave.core.store.CloseableIterator.Empty方法的典型用法代码示例。如果您正苦于以下问题:Java CloseableIterator.Empty方法的具体用法?Java CloseableIterator.Empty怎么用?Java CloseableIterator.Empty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mil.nga.giat.geowave.core.store.CloseableIterator
的用法示例。
在下文中一共展示了CloseableIterator.Empty方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAllObjectsWithSecondaryId
import mil.nga.giat.geowave.core.store.CloseableIterator; //导入方法依赖的package包/类
protected CloseableIterator<T> getAllObjectsWithSecondaryId(
final ByteArrayId secondaryId,
final String... authorizations ) {
try {
final BatchScanner scanner = getScanner(
null,
secondaryId,
authorizations);
final Iterator<Entry<Key, Value>> it = scanner.iterator();
return new CloseableIteratorWrapper<T>(
new ScannerClosableWrapper(
scanner),
new NativeIteratorWrapper(
it));
}
catch (final TableNotFoundException e) {
LOGGER.info(
"Unable to find objects, table '" + getTablename() + "' does not exist",
e);
}
return new CloseableIterator.Empty<T>();
}
示例2: getObjects
import mil.nga.giat.geowave.core.store.CloseableIterator; //导入方法依赖的package包/类
protected CloseableIterator<T> getObjects(
final String... authorizations ) {
try {
final BatchScanner scanner = getFullScanner(authorizations);
final Iterator<Entry<Key, Value>> it = scanner.iterator();
return new CloseableIteratorWrapper<T>(
new ScannerClosableWrapper(
scanner),
new NativeIteratorWrapper(
it));
}
catch (final TableNotFoundException e) {
LOGGER.info(
"Unable to find objects, table '" + getTablename() + "' does not exist",
e);
}
return new CloseableIterator.Empty<T>();
}
示例3: getObjects
import mil.nga.giat.geowave.core.store.CloseableIterator; //导入方法依赖的package包/类
protected CloseableIterator<T> getObjects(
final String... authorizations ) {
try {
final Scan scanner = getFullScanner(authorizations);
final ResultScanner rS = operations.getScannedResults(
scanner,
getTablename(),
authorizations);
final Iterator<Result> it = rS.iterator();
return new CloseableIteratorWrapper<T>(
new ScannerClosableWrapper(
rS),
getNativeIteratorWrapper(it));
}
catch (final IOException e) {
LOGGER.warn(
"Unable to find objects in HBase table.",
e);
}
return new CloseableIterator.Empty<T>();
}
示例4: getAllObjectsWithSecondaryId
import mil.nga.giat.geowave.core.store.CloseableIterator; //导入方法依赖的package包/类
protected CloseableIterator<T> getAllObjectsWithSecondaryId(
final ByteArrayId secondaryId,
final String... authorizations ) {
try {
final Scan scanner = getScanner(
null,
secondaryId,
authorizations);
final ResultScanner rS = operations.getScannedResults(
scanner,
getTablename(),
authorizations);
final Iterator<Result> it = rS.iterator();
return new CloseableIteratorWrapper<T>(
new ScannerClosableWrapper(
rS),
getNativeIteratorWrapper(it));
}
catch (final IOException e) {
LOGGER.warn(
"Unable to find objects, table '" + getTablename() + "' does not exist",
e);
}
return new CloseableIterator.Empty<T>();
}
示例5: query
import mil.nga.giat.geowave.core.store.CloseableIterator; //导入方法依赖的package包/类
public CloseableIterator<T> query(
final BasicHBaseOperations operations,
final double[] maxResolutionSubsamplingPerDimension,
final AdapterStore adapterStore ) {
final Scan scanner = new Scan();
scanner.setMaxResultSize(getScannerLimit());
ResultScanner results = null;
try {
results = operations.getScannedResults(
scanner,
StringUtils.stringFromBinary(index.getId().getBytes()),
authorizations);
}
catch (final IOException e) {
LOGGER.error(
"Unable to get the scanned results.",
e);
}
if (results != null) {
return new CloseableIteratorWrapper<T>(
new ScannerClosableWrapper(
results),
new HBaseEntryIteratorWrapper(
adapterStore,
index,
results.iterator(),
null,
fieldIds,
maxResolutionSubsamplingPerDimension,
true,
false));
}
else {
return new CloseableIterator.Empty<T>();
}
}
示例6: getNoData
import mil.nga.giat.geowave.core.store.CloseableIterator; //导入方法依赖的package包/类
public CloseableIterator<SimpleFeature> getNoData() {
return new CloseableIterator.Empty<SimpleFeature>();
}
示例7: query
import mil.nga.giat.geowave.core.store.CloseableIterator; //导入方法依赖的package包/类
@SuppressWarnings("rawtypes")
public CloseableIterator<Object> query(
final AccumuloOperations accumuloOperations,
final AdapterStore adapterStore,
final double[] maxResolutionSubsamplingPerDimension,
final Integer limit ) {
boolean exists = false;
try {
exists = accumuloOperations.tableExists(StringUtils.stringFromBinary(index.getId().getBytes()));
}
catch (final IOException e) {
LOGGER.error(
"Table does not exist",
e);
}
if (!exists) {
LOGGER.warn("Table does not exist " + StringUtils.stringFromBinary(index.getId().getBytes()));
return new CloseableIterator.Empty();
}
final ScannerBase scanner = getScanner(
accumuloOperations,
maxResolutionSubsamplingPerDimension,
limit);
if (scanner == null) {
LOGGER.error("Could not get scanner instance, getScanner returned null");
return new CloseableIterator.Empty();
}
addScanIteratorSettings(scanner);
Iterator it = initIterator(
adapterStore,
scanner);
if ((limit != null) && (limit > 0)) {
it = Iterators.limit(
it,
limit);
}
return initCloseableIterator(
scanner,
it);
}
示例8: query
import mil.nga.giat.geowave.core.store.CloseableIterator; //导入方法依赖的package包/类
@Override
public CloseableIterator<Object> query(
final BasicHBaseOperations operations,
final AdapterStore adapterStore,
final double[] maxResolutionSubsamplingPerDimension,
final Integer limit ) {
if (!isAggregation()) {
return super.query(
operations,
adapterStore,
maxResolutionSubsamplingPerDimension,
limit);
}
CloseableIterator<Object> responseIterator = null;
// Use the coprocessor for aggregation?
if ((options != null) && options.isEnableCoprocessors()) {
// Verify if necessary
if (!options.isVerifyCoprocessors() || operations.verifyCoprocessor(
index.getId().getString(),
AggregationEndpoint.class.getName(),
options.getCoprocessorJar())) {
responseIterator = aggregateWithCoprocessor(
operations,
adapterStore,
limit);
}
}
// See if we're done
if (responseIterator != null) {
return responseIterator;
}
// Aggregate without coprocessor (either by choice or failure)
final CloseableIterator<Object> it = super.internalQuery(
operations,
adapterStore,
maxResolutionSubsamplingPerDimension,
limit,
!isCommonIndexAggregation());
if ((it != null) && it.hasNext()) {
final Aggregation aggregationFunction = base.aggregation.getRight();
synchronized (aggregationFunction) {
aggregationFunction.clearResult();
while (it.hasNext()) {
final Object input = it.next();
if (input != null) {
aggregationFunction.aggregate(input);
}
}
try {
it.close();
}
catch (final IOException e) {
LOGGER.warn(
"Unable to close hbase scanner",
e);
}
return new Wrapper(
Iterators.singletonIterator(aggregationFunction.getResult()));
}
}
return new CloseableIterator.Empty();
}
示例9: getEntries
import mil.nga.giat.geowave.core.store.CloseableIterator; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
protected CloseableIterator<Object> getEntries(
final PrimaryIndex index,
final List<ByteArrayId> dataIds,
final DataAdapter<Object> adapter,
final DedupeFilter dedupeFilter,
final ScanCallback<Object> callback,
final String[] authorizations,
final double[] maxResolutionSubsamplingPerDimension,
boolean delete )
throws IOException {
final String altIdxTableName = index.getId().getString() + ALT_INDEX_TABLE;
MemoryAdapterStore tempAdapterStore;
tempAdapterStore = new MemoryAdapterStore(
new DataAdapter[] {
adapter
});
if (baseOptions.isUseAltIndex() && baseOperations.tableExists(altIdxTableName)) {
final List<ByteArrayId> rowIds = getAltIndexRowIds(
altIdxTableName,
dataIds,
adapter.getAdapterId());
if (rowIds.size() > 0) {
final QueryOptions options = new QueryOptions();
options.setScanCallback(callback);
options.setAuthorizations(authorizations);
options.setMaxResolutionSubsamplingPerDimension(maxResolutionSubsamplingPerDimension);
options.setLimit(-1);
return queryRowIds(
adapter,
index,
rowIds,
dedupeFilter,
options,
tempAdapterStore,
delete);
}
}
else {
return getEntryRows(
index,
tempAdapterStore,
dataIds,
adapter,
callback,
dedupeFilter,
authorizations,
delete);
}
return new CloseableIterator.Empty();
}