LISTSERV mailing list manager LISTSERV 16.5

Help for HPS-SVN Archives


HPS-SVN Archives

HPS-SVN Archives


HPS-SVN@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

HPS-SVN Home

HPS-SVN Home

HPS-SVN  August 2015

HPS-SVN August 2015

Subject:

r3443 - /java/trunk/record-util/src/main/java/org/hps/record/evio/crawler/Crawler.java

From:

[log in to unmask]

Reply-To:

Notification of commits to the hps svn repository <[log in to unmask]>

Date:

Fri, 28 Aug 2015 20:06:12 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (94 lines)

Author: [log in to unmask]
Date: Fri Aug 28 13:06:10 2015
New Revision: 3443

Log:
Change and correct some crawler CLI arguments.

Modified:
    java/trunk/record-util/src/main/java/org/hps/record/evio/crawler/Crawler.java

Modified: java/trunk/record-util/src/main/java/org/hps/record/evio/crawler/Crawler.java
 =============================================================================
--- java/trunk/record-util/src/main/java/org/hps/record/evio/crawler/Crawler.java	(original)
+++ java/trunk/record-util/src/main/java/org/hps/record/evio/crawler/Crawler.java	Fri Aug 28 13:06:10 2015
@@ -55,8 +55,8 @@
      */
     static {
         OPTIONS.addOption("b", "min-date", true, "min date for a file (example \"2015-03-26 11:28:59\")");
-        OPTIONS.addOption("c", "cache", false, "automatically cache files from MSS to cache disk (JLAB only)");
-        OPTIONS.addOption("C", "connection-properties", true, "database connection properties file (required)");
+        OPTIONS.addOption("C", "cache", false, "automatically cache files from MSS to cache disk (JLAB only)");
+        OPTIONS.addOption("p", "connection-properties", true, "database connection properties file (required)");
         OPTIONS.addOption("d", "directory", true, "root directory to start crawling (default is current dir)");
         OPTIONS.addOption("E", "evio-processor", true, "class name of an EvioEventProcessor to execute");
         OPTIONS.addOption("h", "help", false, "print help and exit (overrides all other arguments)");
@@ -65,8 +65,7 @@
         OPTIONS.addOption("r", "run", true, "add a run number to accept (when used others will be excluded)");
         OPTIONS.addOption("t", "timestamp-file", true, "existing or new timestamp file name");
         OPTIONS.addOption("w", "max-cache-wait", true, "total time to allow for file caching (seconds)");
-        OPTIONS.addOption("u", "update", false,
-                "allow replacement of existing data in the run db (not allowed by default)");
+        OPTIONS.addOption("u", "update", false, "allow replacement of existing data in the run db (off by default)");
         OPTIONS.addOption("x", "max-depth", true, "max depth to crawl in the directory tree");
     }
 
@@ -154,8 +153,8 @@
             }
 
             // Database connection properties file (this is not optional).
-            if (cl.hasOption("C")) {
-                final String dbPropPath = cl.getOptionValue("C");
+            if (cl.hasOption("p")) {
+                final String dbPropPath = cl.getOptionValue("p");
                 final File dbPropFile = new File(dbPropPath);
                 if (!dbPropFile.exists()) {
                     throw new IllegalArgumentException("Connection properties file " + dbPropFile.getPath()
@@ -166,7 +165,7 @@
                 LOGGER.config("using " + dbPropPath + " for db connection properties");
             } else {
                 throw new RuntimeException(
-                        "The -C switch providing the database connection properties file is a required argument.");
+                        "The -p switch providing the database connection properties file is a required argument.");
             }
 
             // Root directory for file crawling.
@@ -221,13 +220,13 @@
             }
 
             // Enable updating of run database.
-            if (cl.hasOption("r")) {
+            if (cl.hasOption("i")) {
                 config.setUpdateRunLog(true);
                 LOGGER.config("inserting into run database is enabled");
             }
 
             // Enable file cache usage for running at JLAB.
-            if (cl.hasOption("c")) {
+            if (cl.hasOption("C")) {
                 config.setUseFileCache(true);
                 LOGGER.config("file cache is enabled");
             }
@@ -352,9 +351,9 @@
      */
     private void updateRunDatabase(final RunSummaryMap runs) throws SQLException {
         // Insert the run information into the database.
-        if (config.updateRunLog()) {
-
-            LOGGER.info("updating run database");
+        if (config.updateRunDatabase()) {
+
+            LOGGER.info("updating run database is enabled");
 
             // Open a DB connection.
             final Connection connection = config.connectionParameters().createConnection();
@@ -371,7 +370,7 @@
             LOGGER.info("done updating run database");
 
         } else {
-            LOGGER.info("run database will not be updated");
+            LOGGER.info("updating run database is not enabled");
         }
     }
 

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

November 2017
August 2017
July 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use