public final class AtlasGeneratorHelper
extends java.lang.Object
implements java.io.Serializable
AtlasGenerator.| Modifier and Type | Class and Description |
|---|---|
protected static class |
AtlasGeneratorHelper.NamedAtlasStatistics |
| Modifier and Type | Method and Description |
|---|---|
protected static java.util.function.Function<org.openstreetmap.atlas.geography.sharding.Shard,java.util.Optional<org.openstreetmap.atlas.geography.atlas.Atlas>> |
atlasFetcher(HadoopAtlasFileCache atlasCache,
java.lang.String country,
java.util.Set<org.openstreetmap.atlas.geography.sharding.Shard> validShards) |
protected static org.apache.spark.api.java.function.PairFlatMapFunction<scala.Tuple2<java.lang.String,org.openstreetmap.atlas.geography.atlas.Atlas>,java.lang.String,org.openstreetmap.atlas.geography.atlas.delta.AtlasDelta> |
computeAtlasDelta(java.util.Map<java.lang.String,java.lang.String> sparkContext,
java.lang.String previousOutputForDelta) |
protected static org.apache.spark.api.java.function.PairFunction<scala.Tuple2<java.lang.String,org.openstreetmap.atlas.geography.atlas.Atlas>,java.lang.String,org.openstreetmap.atlas.geography.atlas.statistics.AtlasStatistics> |
generateAtlasStatistics(org.apache.spark.broadcast.Broadcast<org.openstreetmap.atlas.geography.sharding.Sharding> sharding) |
protected static org.apache.spark.api.java.function.PairFunction<org.openstreetmap.atlas.generator.AtlasGenerationTask,java.lang.String,org.openstreetmap.atlas.geography.atlas.Atlas> |
generateRawAtlas(org.apache.spark.broadcast.Broadcast<org.openstreetmap.atlas.geography.boundary.CountryBoundaryMap> boundaries,
java.util.Map<java.lang.String,java.lang.String> sparkContext,
org.apache.spark.broadcast.Broadcast<java.util.Map<java.lang.String,java.lang.String>> loadingOptions,
PbfContext pbfContext,
SlippyTilePersistenceScheme atlasScheme) |
protected static org.apache.spark.api.java.function.Function2<AtlasGeneratorHelper.NamedAtlasStatistics,AtlasGeneratorHelper.NamedAtlasStatistics,AtlasGeneratorHelper.NamedAtlasStatistics> |
reduceAtlasStatistics() |
protected static org.apache.spark.api.java.function.PairFunction<scala.Tuple2<java.lang.String,org.openstreetmap.atlas.geography.atlas.Atlas>,java.lang.String,org.openstreetmap.atlas.geography.atlas.Atlas> |
sectionRawAtlas(org.apache.spark.broadcast.Broadcast<org.openstreetmap.atlas.geography.boundary.CountryBoundaryMap> boundaries,
org.apache.spark.broadcast.Broadcast<org.openstreetmap.atlas.geography.sharding.Sharding> sharding,
java.util.Map<java.lang.String,java.lang.String> sparkContext,
org.apache.spark.broadcast.Broadcast<java.util.Map<java.lang.String,java.lang.String>> loadingOptions,
java.lang.String slicedRawAtlasPath,
SlippyTilePersistenceScheme atlasScheme,
java.util.List<org.openstreetmap.atlas.generator.AtlasGenerationTask> tasks) |
protected static org.apache.spark.api.java.function.PairFunction<scala.Tuple2<java.lang.String,org.openstreetmap.atlas.geography.atlas.Atlas>,java.lang.String,org.openstreetmap.atlas.geography.atlas.Atlas> |
sliceRawAtlas(org.apache.spark.broadcast.Broadcast<org.openstreetmap.atlas.geography.boundary.CountryBoundaryMap> boundaries) |
protected static java.util.function.Function<org.openstreetmap.atlas.geography.sharding.Shard,java.util.Optional<org.openstreetmap.atlas.geography.atlas.Atlas>> atlasFetcher(HadoopAtlasFileCache atlasCache, java.lang.String country, java.util.Set<org.openstreetmap.atlas.geography.sharding.Shard> validShards)
atlasCache - The cache object for the Atlas filescountry - The country to look forvalidShards - All available shards for given country, to avoid fetching shards that do not existAtlas given a Shardprotected static org.apache.spark.api.java.function.PairFlatMapFunction<scala.Tuple2<java.lang.String,org.openstreetmap.atlas.geography.atlas.Atlas>,java.lang.String,org.openstreetmap.atlas.geography.atlas.delta.AtlasDelta> computeAtlasDelta(java.util.Map<java.lang.String,java.lang.String> sparkContext,
java.lang.String previousOutputForDelta)
sparkContext - Spark context (or configuration) as a key-value mappreviousOutputForDelta - Previous Atlas generation delta output locationPairFlatMapFunction that takes a tuple of a country shard name and
atlas file and returns all the AtlasDelta for the countryprotected static org.apache.spark.api.java.function.PairFunction<scala.Tuple2<java.lang.String,org.openstreetmap.atlas.geography.atlas.Atlas>,java.lang.String,org.openstreetmap.atlas.geography.atlas.statistics.AtlasStatistics> generateAtlasStatistics(org.apache.spark.broadcast.Broadcast<org.openstreetmap.atlas.geography.sharding.Sharding> sharding)
sharding - The sharding treePairFunction that processes a shard to Atlas tuple, and constructs a
AtlasStatistics for each shard.protected static org.apache.spark.api.java.function.PairFunction<org.openstreetmap.atlas.generator.AtlasGenerationTask,java.lang.String,org.openstreetmap.atlas.geography.atlas.Atlas> generateRawAtlas(org.apache.spark.broadcast.Broadcast<org.openstreetmap.atlas.geography.boundary.CountryBoundaryMap> boundaries,
java.util.Map<java.lang.String,java.lang.String> sparkContext,
org.apache.spark.broadcast.Broadcast<java.util.Map<java.lang.String,java.lang.String>> loadingOptions,
PbfContext pbfContext,
SlippyTilePersistenceScheme atlasScheme)
boundaries - The CountryBoundaryMap to use for pbf to atlas generationsparkContext - Spark context (or configuration) as a key-value maploadingOptions - The basic required properties to create an AtlasLoadingOptionpbfContext - The context explaining where to find the PBFsatlasScheme - The folder structure of the output atlasPairFunction that processes an AtlasGenerationTask, loads the
PBF for the task's shard, generates the raw atlas for the shard and outputs a shard
name to raw atlas tuple.protected static org.apache.spark.api.java.function.Function2<AtlasGeneratorHelper.NamedAtlasStatistics,AtlasGeneratorHelper.NamedAtlasStatistics,AtlasGeneratorHelper.NamedAtlasStatistics> reduceAtlasStatistics()
protected static org.apache.spark.api.java.function.PairFunction<scala.Tuple2<java.lang.String,org.openstreetmap.atlas.geography.atlas.Atlas>,java.lang.String,org.openstreetmap.atlas.geography.atlas.Atlas> sectionRawAtlas(org.apache.spark.broadcast.Broadcast<org.openstreetmap.atlas.geography.boundary.CountryBoundaryMap> boundaries,
org.apache.spark.broadcast.Broadcast<org.openstreetmap.atlas.geography.sharding.Sharding> sharding,
java.util.Map<java.lang.String,java.lang.String> sparkContext,
org.apache.spark.broadcast.Broadcast<java.util.Map<java.lang.String,java.lang.String>> loadingOptions,
java.lang.String slicedRawAtlasPath,
SlippyTilePersistenceScheme atlasScheme,
java.util.List<org.openstreetmap.atlas.generator.AtlasGenerationTask> tasks)
boundaries - The CountryBoundaryMap required to create an AtlasLoadingOptionsharding - The Sharding strategysparkContext - Spark context (or configuration) as a key-value maploadingOptions - The basic required properties to create an AtlasLoadingOptionslicedRawAtlasPath - The path where the sliced raw atlas files were savedatlasScheme - The folder structure of the output atlastasks - The list of AtlasGenerationTasks used to grab all possible Shards
for a countryPairFunction that processes a tuple of shard-name and sliced raw
atlas, sections the sliced raw atlas and returns the final sectioned (and sliced) raw
atlas for that shard name.protected static org.apache.spark.api.java.function.PairFunction<scala.Tuple2<java.lang.String,org.openstreetmap.atlas.geography.atlas.Atlas>,java.lang.String,org.openstreetmap.atlas.geography.atlas.Atlas> sliceRawAtlas(org.apache.spark.broadcast.Broadcast<org.openstreetmap.atlas.geography.boundary.CountryBoundaryMap> boundaries)
boundaries - The CountryBoundaryMap to use for slicingPairFunction that processes a tuple of shard-name and raw atlas,
slices the raw atlas and returns the sliced raw atlas for that shard name.