Running an EIDSInputWedge

« Back to User Guide

The EIDSInputWedge provides a polling interface for sending new products, which was frequently used with EIDS. Messages to be sent are written to a poll directory, and are converted to products by a parsing class that understands the file format.

Polling may introduce latency between when a product is created and when it is sent, and does not provide direct feedback (other than log files) about the status of sent products. Consider Using the Command Line to Send Products.

Command Line Usage

An external configuration file may be used with the EIDSInputWedge, instead of command line arguments. See the next section for a configuration example.

Send a Quakeml Product

No "parser" is required to send Quakeml files.

NOTE: backslashes added for readability, command is one line.
java -jar ProductClient.jar
	--mainclass=gov.usgs.earthquake.eids.EIDSInputWedge \
	--servers=pdldevel.cr.usgs.gov:11235 \
	--privateKey=/path/to/id_dsa \
	--file=QUAKEML_FILE

Convert CUBE/EQXML Event and Delete messages to Quakeml Products

CUBE "E " and "DE" type messages can be converted to Quakeml, using the EidsToQuakemlConverter:

See the Quakeml conversion guide

NOTE: backslashes added for readability, command is one line.
java -jar ProductClient.jar
	--mainclass=gov.usgs.earthquake.eids.EIDSInputWedge \
	--parser=gov.usgs.earthquake.event.EidsToQuakemlConverter \
	--servers=pdldevel.cr.usgs.gov:11235 \
	--privateKey=/path/to/id_dsa \
	--file=CUBE_OR_EQXML_FILE

Convert CUBE "LI" messages to Products

CUBE "LI" messages have no representation in Quakeml, and must use the EQMessageProductCreator:

See the Quakeml conversion guide

NOTE: backslashes added for readability, command is one line.
java -jar ProductClient.jar
	--mainclass=gov.usgs.earthquake.eids.EIDSInputWedge \
	--parser=gov.usgs.earthquake.eids.EQMessageProductCreator \
	--servers=pdldevel.cr.usgs.gov:11235 \
	--privateKey=/path/to/id_dsa \
	--file=CUBE_ADDON_FILE

Attachments

Optionally, when sending one file as a Product, files can be attached. Use the --attach=FILE_OR_DIR argument one or more times. Directory trees are preserved, and each path must be unique (last wins). If more than one product is generated, an exception is thrown.

Poll a Directory for Files

NOTE: backslashes added for readability, command is one line.
java -jar ProductClient.jar
	--mainclass=gov.usgs.earthquake.eids.EIDSInputWedge \
	--parser=gov.usgs.earthquake.event.EidsToQuakemlConverter \
	--servers=pdldevel.cr.usgs.gov:11235 \
	--privateKey=/path/to/id_dsa \
	--poll \
	--polldir=POLLDIRECTORY \
	--pollInterval=1000

Full Command Line Usage

Run this command to display full command line usage
java -jar ProductClient.jar --mainclass=gov.usgs.earthquake.eids.EIDSInputWedge

Example Configuration File

This configuration is sends CUBE/EQXML/Quakeml files (see parserClass) to the development server (see pdldevel).

This should be a file named "config.ini" in the working directory, or for another location use the "--configFile=CONFIGFILE" argument.

;; EIDS Input Wedge Config
mainclass = gov.usgs.earthquake.eids.EIDSInputWedge



;; PRIVATE KEY
;; OpenSSH DSA private key used to sign messages

; register the corresponding public key (.pub) on the hubs where messages are sent
privateKeyFile = /path/to/id_dsa



;; SENDERS
;; list of senders that will send messages

; use this list for development
senders = pdldevel

; use this list for production
; senders = prod01, prod02



;; DIRECTORIES
;; Where messages are read and stored


; files to process
directory = polldir

; check for messages in milliseconds
interval = 1000

; processed files
oldinputdir = oldinput

; files that could not be processed
errordir = errordir




;; PARSER 
;; How messages are converted to QuakeML.  This must be a class that implements
;; the java interface gov.usgs.earthquake.quakeml.FileToQuakemlConverter

; (Default) EidsToQuakemlConverter accepts CUBE, EQXML, and QuakeML event messages
parserClass = gov.usgs.earthquake.event.EidsToQuakemlConverter

; NDKToQuakemlConverter accepts NDK format focal mechanisms
; parserClass = gov.usgs.earthquake.focalmechanism.NDKToQuakemlConverter

; VaxToQuakemlConverter accepts Vax format focal mechanisms
; parserClass = gov.usgs.earthquake.focalmechanism.VaxToQuakemlConverter


;; PRODUCT TYPES
;; these flags affect the product types that are generated, and affect the meaning of a product.

; when true, prefix all product types with "internal-"
; indicates the product is for internal consumption, and should not generate emails or other public notifications.
createInternalProducts = false

; when true, suffix all product types with "-scenario"
; indicates the product is for a scenario event, instead of an actual earthquake.
createScenarioProducts = false


; when a phase-data product is created, also create a "lightweight" origin with only preferred origin and magnitude.
sendOriginWhenPhasesExist = true

; when a phase-data product is created, also create "lightweight" focal-mechanism, moment-tensor, or broadband-depth products.
sendMechanismWhenPhasesExist = true


;; LOGGING

; one of SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
loglevel = CONFIG

; directory where log files are written
logdirectory = log

; log file name pattern
logfile = yyyyMMdd'.log'

; whether to redirect console output
redirectconsole = false



;; TRACKER
;; The tracker provides centralized tracking.  A URL _must_ be provided for 
;; sent messages, but tracker updates are not sent from this computer unless
;; enableTracker is set to true.

; tracker url assigned to created products
trackerURL = http://ehppdl1.cr.usgs.gov/tracker

; whether to send tracker updates from this computer
enableTracker = false



;; SENDERS
;; Where products are sent.  Only sections included in the "senders" list above
;; are loaded.

; pdldevel is the development hub
[pdldevel]
type = gov.usgs.earthquake.distribution.SocketProductSender
host = pdldevel.cr.usgs.gov
port = 11235
connectTimeout = 15000


; prod01 and prod02 are the production hubs
[prod01]
type = gov.usgs.earthquake.distribution.SocketProductSender
host = prod01-pdl01.cr.usgs.gov
port = 11235
connectTimeout = 15000

[prod02]
type = gov.usgs.earthquake.distribution.SocketProductSender
host = prod02-pdl01.cr.usgs.gov
port = 11235
connectTimeout = 15000