當前位置: 首頁>>代碼示例>>Java>>正文


Java CloseableIterator.Wrapper方法代碼示例

本文整理匯總了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()));
}
 
開發者ID:locationtech,項目名稱:geowave,代碼行數:19,代碼來源:AbstractSimpleFeatureIngestPlugin.java

示例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());
}
 
開發者ID:locationtech,項目名稱:geowave,代碼行數:20,代碼來源:AbstractLocalIngestWithMapper.java

示例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());
}
 
開發者ID:locationtech,項目名稱:geowave,代碼行數:24,代碼來源:MemoryDataStatisticsStore.java

示例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();
}
 
開發者ID:locationtech,項目名稱:geowave,代碼行數:18,代碼來源:QueryOptions.java

示例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());
}
 
開發者ID:locationtech,項目名稱:geowave,代碼行數:39,代碼來源:TdriveIngestPlugin.java

示例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());
}
 
開發者ID:locationtech,項目名稱:geowave,代碼行數:14,代碼來源:Stanag4676IngestPlugin.java

示例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());
}
 
開發者ID:locationtech,項目名稱:geowave,代碼行數:40,代碼來源:Stanag4676IngestPlugin.java

示例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());
}
 
開發者ID:locationtech,項目名稱:geowave,代碼行數:12,代碼來源:MemoryDataStatisticsStore.java

示例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());
}
 
開發者ID:locationtech,項目名稱:geowave,代碼行數:7,代碼來源:MemoryIndexStore.java

示例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());
}
 
開發者ID:locationtech,項目名稱:geowave,代碼行數:7,代碼來源:MemoryAdapterStore.java


注:本文中的mil.nga.giat.geowave.core.store.CloseableIterator.Wrapper方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。