本文整理汇总了Java中mil.nga.giat.geowave.core.store.CloseableIterator.Wrapper方法的典型用法代码示例。如果您正苦于以下问题:Java CloseableIterator.Wrapper方法的具体用法?Java CloseableIterator.Wrapper怎么用?Java CloseableIterator.Wrapper使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mil.nga.giat.geowave.core.store.CloseableIterator
的用法示例。
在下文中一共展示了CloseableIterator.Wrapper方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toGeoWaveData
import mil.nga.giat.geowave.core.store.CloseableIterator; //导入方法依赖的package包/类
@Override
public CloseableIterator<GeoWaveData<SimpleFeature>> toGeoWaveData(
final URL input,
final Collection<ByteArrayId> primaryIndexIds,
final String globalVisibility ) {
final I[] hdfsObjects = toAvroObjects(input);
final List<CloseableIterator<GeoWaveData<SimpleFeature>>> allData = new ArrayList<CloseableIterator<GeoWaveData<SimpleFeature>>>();
for (final I hdfsObject : hdfsObjects) {
final CloseableIterator<GeoWaveData<SimpleFeature>> geowaveData = toGeoWaveDataInternal(
hdfsObject,
primaryIndexIds,
globalVisibility);
allData.add(wrapIteratorWithFilters(geowaveData));
}
return new CloseableIterator.Wrapper<GeoWaveData<SimpleFeature>>(
Iterators.concat(allData.iterator()));
}
示例2: toGeoWaveData
import mil.nga.giat.geowave.core.store.CloseableIterator; //导入方法依赖的package包/类
@Override
public CloseableIterator<GeoWaveData<T>> toGeoWaveData(
final URL input,
final Collection<ByteArrayId> primaryIndexIds,
final String globalVisibility ) {
try (final InputStream inputStream = input.openStream()) {
return toGeoWaveDataInternal(
inputStream,
primaryIndexIds,
globalVisibility);
}
catch (final IOException e) {
LOGGER.warn(
"Cannot open file, unable to ingest",
e);
}
return new CloseableIterator.Wrapper(
Iterators.emptyIterator());
}
示例3: getDataStatistics
import mil.nga.giat.geowave.core.store.CloseableIterator; //导入方法依赖的package包/类
/**
* Get all data statistics from the store by a data adapter ID
*
* @param adapterId
* the data adapter ID
* @return the list of statistics for the given adapter, empty if it doesn't
* exist
*/
@Override
public CloseableIterator<DataStatistics<?>> getDataStatistics(
final ByteArrayId adapterId,
final String... authorizations ) {
final List<DataStatistics<?>> statSet = new ArrayList<DataStatistics<?>>();
for (final DataStatistics<?> stat : statsMap.values()) {
if (stat.getDataAdapterId().equals(
adapterId)) {
statSet.add(stat);
}
}
return new CloseableIterator.Wrapper<DataStatistics<?>>(
statSet.iterator());
}
示例4: getAdapters
import mil.nga.giat.geowave.core.store.CloseableIterator; //导入方法依赖的package包/类
public CloseableIterator<DataAdapter<?>> getAdapters(
final AdapterStore adapterStore ) {
if ((adapterIds != null) && !adapterIds.isEmpty()) {
if ((adapters == null) || adapters.isEmpty()) {
adapters = new ArrayList<DataAdapter<Object>>();
for (final ByteArrayId id : adapterIds) {
final DataAdapter<Object> adapter = (DataAdapter<Object>) adapterStore.getAdapter(id);
if (adapter != null) {
adapters.add(adapter);
}
}
}
return new CloseableIterator.Wrapper(
adapters.iterator());
}
return adapterStore.getAdapters();
}
示例5: toGeoWaveDataInternal
import mil.nga.giat.geowave.core.store.CloseableIterator; //导入方法依赖的package包/类
@Override
protected CloseableIterator<GeoWaveData<SimpleFeature>> toGeoWaveDataInternal(
final TdrivePoint tdrivePoint,
final Collection<ByteArrayId> primaryIndexIds,
final String globalVisibility ) {
final List<GeoWaveData<SimpleFeature>> featureData = new ArrayList<GeoWaveData<SimpleFeature>>();
// tdrivepointBuilder = new SimpleFeatureBuilder(tdrivepointType);
tdrivepointBuilder.set(
"geometry",
GeometryUtils.GEOMETRY_FACTORY.createPoint(new Coordinate(
tdrivePoint.getLongitude(),
tdrivePoint.getLatitude())));
tdrivepointBuilder.set(
"taxiid",
tdrivePoint.getTaxiid());
tdrivepointBuilder.set(
"pointinstance",
tdrivePoint.getPointinstance());
tdrivepointBuilder.set(
"Timestamp",
new Date(
tdrivePoint.getTimestamp()));
tdrivepointBuilder.set(
"Latitude",
tdrivePoint.getLatitude());
tdrivepointBuilder.set(
"Longitude",
tdrivePoint.getLongitude());
featureData.add(new GeoWaveData<SimpleFeature>(
pointKey,
primaryIndexIds,
tdrivepointBuilder.buildFeature(tdrivePoint.getTaxiid() + "_" + tdrivePoint.getPointinstance())));
return new CloseableIterator.Wrapper<GeoWaveData<SimpleFeature>>(
featureData.iterator());
}
示例6: toIntermediateMapReduceData
import mil.nga.giat.geowave.core.store.CloseableIterator; //导入方法依赖的package包/类
@Override
public CloseableIterator<KeyValueData<Text, Stanag4676EventWritable>> toIntermediateMapReduceData(
final WholeFile input ) {
final TrackFileReader fileReader = new TrackFileReader();
fileReader.setDecoder(new NATO4676Decoder());
fileReader.setStreaming(true);
final IngestMessageHandler handler = new IngestMessageHandler();
fileReader.setHandler(handler);
fileReader.read(new ByteBufferBackedInputStream(
input.getOriginalFile()));
return new CloseableIterator.Wrapper<KeyValueData<Text, Stanag4676EventWritable>>(
handler.getIntermediateData().iterator());
}
示例7: toGeoWaveData
import mil.nga.giat.geowave.core.store.CloseableIterator; //导入方法依赖的package包/类
@Override
public CloseableIterator<GeoWaveData<Object>> toGeoWaveData(
final WholeFile input,
final Collection<ByteArrayId> primaryIndexIds,
final String globalVisibility ) {
try (CloseableIterator<KeyValueData<Text, Stanag4676EventWritable>> intermediateData = toIntermediateMapReduceData(input)) {
// this is much better done in the reducer of a map reduce job,
// this aggregation by track UUID is not memory efficient
final Map<Text, List<Stanag4676EventWritable>> trackUuidMap = new HashMap<Text, List<Stanag4676EventWritable>>();
while (intermediateData.hasNext()) {
final KeyValueData<Text, Stanag4676EventWritable> next = intermediateData.next();
List<Stanag4676EventWritable> trackEvents = trackUuidMap.get(next.getKey());
if (trackEvents == null) {
trackEvents = new ArrayList<Stanag4676EventWritable>();
trackUuidMap.put(
next.getKey(),
trackEvents);
}
trackEvents.add(next.getValue());
}
final List<CloseableIterator<GeoWaveData<Object>>> iterators = new ArrayList<CloseableIterator<GeoWaveData<Object>>>();
for (final Entry<Text, List<Stanag4676EventWritable>> entry : trackUuidMap.entrySet()) {
iterators.add(toGeoWaveData(
entry.getKey(),
primaryIndexIds,
globalVisibility,
entry.getValue()));
}
return new CloseableIterator.Wrapper<GeoWaveData<Object>>(
Iterators.concat(iterators.iterator()));
}
catch (final IOException e) {
LOGGER.warn(
"Error closing file '" + input.getOriginalFilePath() + "'",
e);
}
return new CloseableIterator.Wrapper<GeoWaveData<Object>>(
new ArrayList<GeoWaveData<Object>>().iterator());
}
示例8: getAllDataStatistics
import mil.nga.giat.geowave.core.store.CloseableIterator; //导入方法依赖的package包/类
/**
* Get all data statistics from the store
*
* @return the list of all statistics
*/
@Override
public CloseableIterator<DataStatistics<?>> getAllDataStatistics(
final String... authorizations ) {
return new CloseableIterator.Wrapper<DataStatistics<?>>(
statsMap.values().iterator());
}
示例9: getIndices
import mil.nga.giat.geowave.core.store.CloseableIterator; //导入方法依赖的package包/类
@Override
public CloseableIterator<Index<?, ?>> getIndices() {
return new CloseableIterator.Wrapper<Index<?, ?>>(
new ArrayList<Index<?, ?>>(
indexMap.values()).iterator());
}
示例10: getAdapters
import mil.nga.giat.geowave.core.store.CloseableIterator; //导入方法依赖的package包/类
@Override
public CloseableIterator<DataAdapter<?>> getAdapters() {
return new CloseableIterator.Wrapper<DataAdapter<?>>(
new ArrayList<DataAdapter<?>>(
adapterMap.values()).iterator());
}