Class IntegrityChecksCommandArguments
- java.lang.Object
-
- org.openstreetmap.atlas.utilities.runtime.Command
-
- org.openstreetmap.atlas.generator.tools.spark.SparkJob
-
- org.openstreetmap.atlas.checks.distributed.IntegrityChecksCommandArguments
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
IntegrityCheckSparkJob,ShardedIntegrityChecksSparkJob
public abstract class IntegrityChecksCommandArguments extends org.openstreetmap.atlas.generator.tools.spark.SparkJobHandles arguments and base functionality for integrity check sparkjobs generating commands- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classIntegrityChecksCommandArguments.OutputFormats-
Nested classes/interfaces inherited from class org.openstreetmap.atlas.utilities.runtime.Command
org.openstreetmap.atlas.utilities.runtime.Command.Flag, org.openstreetmap.atlas.utilities.runtime.Command.Optionality, org.openstreetmap.atlas.utilities.runtime.Command.Switch<T extends java.lang.Object>, org.openstreetmap.atlas.utilities.runtime.Command.SwitchList
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.openstreetmap.atlas.utilities.runtime.Command.Switch<java.lang.String>ATLAS_FOLDERDeprecated.in favor of INPUT from SparkJobprotected static java.lang.StringOUTPUT_ATLAS_FOLDERprotected static java.lang.StringOUTPUT_FLAG_FOLDERprotected static java.lang.StringOUTPUT_GEOJSON_FOLDERprotected static java.lang.StringOUTPUT_METRIC_FOLDERprotected static java.lang.StringOUTPUT_TIPPECANOE_FOLDER
-
Constructor Summary
Constructors Constructor Description IntegrityChecksCommandArguments()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.openstreetmap.atlas.utilities.maps.MultiMap<java.lang.String,org.openstreetmap.atlas.geography.sharding.Shard>countryShardMapFromShardFiles(java.util.Set<java.lang.String> countries, java.lang.String atlasFolder, java.util.Map<java.lang.String,java.lang.String> sparkContext)Creates a map from country name toListofSharddefinitions fromAtlasfiles.protected AtlasDataSourcegetAtlasDataSource(java.util.Map<java.lang.String,java.lang.String> sparkContext, org.openstreetmap.atlas.utilities.configuration.Configuration checksConfiguration, org.openstreetmap.atlas.geography.Rectangle pbfBoundary)Gets theAtlasDataSourceobject to load the Atlas fromprotected static java.lang.Iterable<org.openstreetmap.atlas.geography.atlas.items.AtlasObject>objectsToCheck(org.openstreetmap.atlas.geography.atlas.Atlas atlas, Check check)protected static java.lang.Iterable<org.openstreetmap.atlas.geography.atlas.items.AtlasObject>objectsToCheck(org.openstreetmap.atlas.geography.atlas.Atlas atlas, Check check, java.util.function.Predicate<org.openstreetmap.atlas.geography.atlas.items.AtlasEntity> geoFilter)protected org.openstreetmap.atlas.utilities.runtime.Command.SwitchListswitches()-
Methods inherited from class org.openstreetmap.atlas.generator.tools.spark.SparkJob
configuration, configurationMap, copyToOutput, getAlternateParallelFolderOutput, getAlternateSubFolderOutput, getContext, getName, input, onRun, output, outputToClean, resource, resource, setContext, splitAndSaveAsHadoopFile, start
-
-
-
-
Field Detail
-
ATLAS_FOLDER
@Deprecated(since="6.0.2") protected static final org.openstreetmap.atlas.utilities.runtime.Command.Switch<java.lang.String> ATLAS_FOLDER
Deprecated.in favor of INPUT from SparkJob
-
OUTPUT_ATLAS_FOLDER
protected static final java.lang.String OUTPUT_ATLAS_FOLDER
- See Also:
- Constant Field Values
-
OUTPUT_FLAG_FOLDER
protected static final java.lang.String OUTPUT_FLAG_FOLDER
- See Also:
- Constant Field Values
-
OUTPUT_GEOJSON_FOLDER
protected static final java.lang.String OUTPUT_GEOJSON_FOLDER
- See Also:
- Constant Field Values
-
OUTPUT_METRIC_FOLDER
protected static final java.lang.String OUTPUT_METRIC_FOLDER
- See Also:
- Constant Field Values
-
OUTPUT_TIPPECANOE_FOLDER
protected static final java.lang.String OUTPUT_TIPPECANOE_FOLDER
- See Also:
- Constant Field Values
-
-
Method Detail
-
countryShardMapFromShardFiles
public static org.openstreetmap.atlas.utilities.maps.MultiMap<java.lang.String,org.openstreetmap.atlas.geography.sharding.Shard> countryShardMapFromShardFiles(java.util.Set<java.lang.String> countries, java.lang.String atlasFolder, java.util.Map<java.lang.String,java.lang.String> sparkContext)Creates a map from country name toListofSharddefinitions fromAtlasfiles.- Parameters:
countries- Set of countries to find out shards foratlasFolder- Path toAtlasfoldersparkContext- Spark context (or configuration) as a key-value map- Returns:
- A map from country name to
ListofSharddefinitions
-
objectsToCheck
protected static java.lang.Iterable<org.openstreetmap.atlas.geography.atlas.items.AtlasObject> objectsToCheck(org.openstreetmap.atlas.geography.atlas.Atlas atlas, Check check)
-
objectsToCheck
protected static java.lang.Iterable<org.openstreetmap.atlas.geography.atlas.items.AtlasObject> objectsToCheck(org.openstreetmap.atlas.geography.atlas.Atlas atlas, Check check, java.util.function.Predicate<org.openstreetmap.atlas.geography.atlas.items.AtlasEntity> geoFilter)
-
getAtlasDataSource
protected AtlasDataSource getAtlasDataSource(java.util.Map<java.lang.String,java.lang.String> sparkContext, org.openstreetmap.atlas.utilities.configuration.Configuration checksConfiguration, org.openstreetmap.atlas.geography.Rectangle pbfBoundary)
Gets theAtlasDataSourceobject to load the Atlas from- Parameters:
sparkContext- The Spark contextchecksConfiguration- configuration for all the checkspbfBoundary- The pbf boundary of typeRectangle- Returns:
- A
AtlasDataSource
-
switches
protected org.openstreetmap.atlas.utilities.runtime.Command.SwitchList switches()
- Overrides:
switchesin classorg.openstreetmap.atlas.generator.tools.spark.SparkJob
-
-