Package gov.usgs.earthquake.shakemap
Class ShakeMapIndexerWedge
java.lang.Object
gov.usgs.util.DefaultConfigurable
gov.usgs.earthquake.product.AbstractListener
gov.usgs.earthquake.distribution.DefaultNotificationListener
gov.usgs.earthquake.shakemap.ShakeMapIndexerWedge
- All Implemented Interfaces:
NotificationIndexCleanup.Listener
,NotificationListener
,Configurable
Deprecated.
Legacy interface to trigger pre-Indexer ShakeMap processing.
The Old ShakeMap Indexer is no longer used, and this class is deprecated.
When a shakemap product arrives, it is only processed if one of these is
true:
- doesn't already exist
- from preferred source (product source = eventsource)
- from same source as before
- remove previous version
- unpack new version, if not a delete
- trigger legacy indexer
- indexerCommand
- The shakemap indexer command to run. Defaults to
/home/www/vhosts/earthquake/cron/shakemap_indexer.php
. - shakemapDirectory
- The shakemap event directory. Defaults to
/home/www/vhosts/earthquake/htdocs/earthquakes/shakemap
. - timeout
- How long in milliseconds the indexer is allowed to run before being terminated.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Deprecated.Configurable property for command timeout.static final String
Deprecated.Default command timeout.static final String
Deprecated.Default shakemap directory.static final String
Deprecated.The shakemap indexer command to execute.static final String
Deprecated.Configurable property for shakemap directory.static final String
Deprecated.Configurable property.Fields inherited from class gov.usgs.earthquake.distribution.DefaultNotificationListener
CLEANUP_INTERVAL_PROPERTY, CONCURRENT_PRODUCTS_PROPERTY, DEFAULT_CLEANUP_INTERVAL, DEFAULT_CONCURRENT_PRODUCTS, DEFAULT_PROCESS_DUPLICATES, EXCLUDE_PATHS_PROPERTY, INCLUDE_PATHS_PROPERTY, INDEX_FILE_PROPERTY, NOTIFICATION_INDEX_PROPERTY, PROCESS_DUPLICATES
Fields inherited from class gov.usgs.earthquake.product.AbstractListener
ATTEMPT_COUNT_PROPERTY, DEFAULT_ATTEMPT_COUNT, DEFAULT_RETRY_DELAY, DEFAULT_TIMEOUT, EXCLUDE_SOURCES_PROPERTY, EXCLUDE_TYPES_PROPERTY, INCLUDE_ACTUALS_PROPERTY, INCLUDE_DEVELOPMENTS_PROPERTY, INCLUDE_INTERNALS_PROPERTY, INCLUDE_SCENARIOS_PROPERTY, INCLUDE_SOURCES_PROPERTY, INCLUDE_TESTS_PROPERTY, INCLUDE_TYPES_PROPERTY, MAX_TRIES_PROPERTY, RETRY_DELAY_PROPERTY, TIMEOUT_PROPERTY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.Configure this shakemap indexer.getEventDirectory
(ShakeMap shakemap) Deprecated.Get the directory for a particular shakemap.void
Deprecated.Receive a ShakeMap from Product Distribution.int
runIndexer
(String network, String code, boolean delete) Deprecated.Run the shakemap indexer.translateShakeMapSource
(String eventSource) Deprecated.Translate from an event source to the old style shakemap source.Methods inherited from class gov.usgs.earthquake.distribution.DefaultNotificationListener
cleanup, getCleanupInterval, getConcurrentProducts, getExcludePaths, getIncludePaths, getNotificationIndex, isProcessDuplicates, onAfterProcessNotification, onBeforeProcessNotification, onBeforeProcessProduct, onExpiredNotification, onNotification, setCleanupInterval, setConcurrentProducts, setNotificationIndex, setProcessDuplicates, shutdown, startup
Methods inherited from class gov.usgs.earthquake.product.AbstractListener
accept, getExcludeSources, getExcludeTypes, getIncludeSources, getIncludeTypes, getMaxTries, getRetryDelay, getTimeout, isIncludeActuals, isIncludeDevelopments, isIncludeInternals, isIncludeScenarios, isIncludeTests, setIncludeActuals, setIncludeDevelopments, setIncludeInternals, setIncludeScenarios, setIncludeTests, setMaxTries, setRetryDelay, setTimeout
Methods inherited from class gov.usgs.util.DefaultConfigurable
getName, setName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface gov.usgs.util.Configurable
getName, setName
Methods inherited from interface gov.usgs.earthquake.distribution.NotificationListener
getMaxTries, getTimeout
-
Field Details
-
SHAKEMAP_INDEXER_COMMAND_PROPERTY
Deprecated.Configurable property.- See Also:
-
DEFAULT_SHAKEMAP_INDEXER_COMMAND
Deprecated.The shakemap indexer command to execute.- See Also:
-
COMMAND_TIMEOUT_PROPERTY
Deprecated.Configurable property for command timeout.- See Also:
-
DEFAULT_COMMAND_TIMEOUT
Deprecated.Default command timeout.- See Also:
-
SHAKEMAP_DIRECTORY_PROPERTY
Deprecated.Configurable property for shakemap directory.- See Also:
-
DEFAULT_SHAKEMAP_DIRECTORY
Deprecated.Default shakemap directory.- See Also:
-
-
Constructor Details
-
ShakeMapIndexerWedge
public ShakeMapIndexerWedge()Deprecated.Create a new ShakeMapIndexerWedge. Sets up the includeTypes list to contain "shakemap".
-
-
Method Details
-
onProduct
Deprecated.Receive a ShakeMap from Product Distribution.- Overrides:
onProduct
in classDefaultNotificationListener
- Parameters:
product
- a shakemap type product.- Throws:
Exception
- if error occurs
-
runIndexer
Deprecated.Run the shakemap indexer. If network and code are omitted, all events are updated.- Parameters:
network
- the network to update.code
- the code to update.delete
- whether indexer is handling a delete (true) or update (false).- Returns:
- -1 if indexer does not complete within max(1, getAttemptCount()) times, or exit code if indexer completes.
- Throws:
IOException
- if IO error occursException
-
getEventDirectory
Deprecated.Get the directory for a particular shakemap.- Parameters:
shakemap
- the shakemap to find a directory for.- Returns:
- the shakemap directory.
- Throws:
Exception
- if error occurs
-
translateShakeMapSource
Deprecated.Translate from an event source to the old style shakemap source. Driven by the SOURCE_TRANSLATION_MAP.- Parameters:
eventSource
- the event network.- Returns:
- the shakemap network.
-
configure
Deprecated.Configure this shakemap indexer.- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classDefaultNotificationListener
- Parameters:
config
- the Config object with settings.- Throws:
Exception
- if configuration exceptions occur.
-