Class ShakeMapIndexerWedge

All Implemented Interfaces:
NotificationIndexCleanup.Listener, NotificationListener, Configurable

@Deprecated public class ShakeMapIndexerWedge extends DefaultNotificationListener
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
When processing a shakemap:
  1. remove previous version
  2. unpack new version, if not a delete
  3. trigger legacy indexer
Configurable properties:
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 Details

    • SHAKEMAP_INDEXER_COMMAND_PROPERTY

      public static final String SHAKEMAP_INDEXER_COMMAND_PROPERTY
      Deprecated.
      Configurable property.
      See Also:
    • DEFAULT_SHAKEMAP_INDEXER_COMMAND

      public static final String DEFAULT_SHAKEMAP_INDEXER_COMMAND
      Deprecated.
      The shakemap indexer command to execute.
      See Also:
    • COMMAND_TIMEOUT_PROPERTY

      public static final String COMMAND_TIMEOUT_PROPERTY
      Deprecated.
      Configurable property for command timeout.
      See Also:
    • DEFAULT_COMMAND_TIMEOUT

      public static final String DEFAULT_COMMAND_TIMEOUT
      Deprecated.
      Default command timeout.
      See Also:
    • SHAKEMAP_DIRECTORY_PROPERTY

      public static final String SHAKEMAP_DIRECTORY_PROPERTY
      Deprecated.
      Configurable property for shakemap directory.
      See Also:
    • DEFAULT_SHAKEMAP_DIRECTORY

      public static final String 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

      public void onProduct(Product product) throws Exception
      Deprecated.
      Receive a ShakeMap from Product Distribution.
      Overrides:
      onProduct in class DefaultNotificationListener
      Parameters:
      product - a shakemap type product.
      Throws:
      Exception - if error occurs
    • runIndexer

      public int runIndexer(String network, String code, boolean delete) throws Exception
      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 occurs
      Exception
    • getEventDirectory

      public File getEventDirectory(ShakeMap shakemap) throws Exception
      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

      public String translateShakeMapSource(String eventSource)
      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

      public void configure(Config config) throws Exception
      Deprecated.
      Configure this shakemap indexer.
      Specified by:
      configure in interface Configurable
      Overrides:
      configure in class DefaultNotificationListener
      Parameters:
      config - the Config object with settings.
      Throws:
      Exception - if configuration exceptions occur.