From: <bi...@us...> - 2012-01-24 18:58:18
|
Revision: 3603 http://archive-access.svn.sourceforge.net/archive-access/?rev=3603&view=rev Author: binzino Date: 2012-01-24 18:58:08 +0000 (Tue, 24 Jan 2012) Log Message: ----------- Employ -s option. Modified Paths: -------------- tags/nutchwax-0_13-JIRA-WAX-75/archive/src/java/org/archive/nutchwax/Importer.java Modified: tags/nutchwax-0_13-JIRA-WAX-75/archive/src/java/org/archive/nutchwax/Importer.java =================================================================== --- tags/nutchwax-0_13-JIRA-WAX-75/archive/src/java/org/archive/nutchwax/Importer.java 2012-01-24 18:28:14 UTC (rev 3602) +++ tags/nutchwax-0_13-JIRA-WAX-75/archive/src/java/org/archive/nutchwax/Importer.java 2012-01-24 18:58:08 UTC (rev 3603) @@ -737,7 +737,7 @@ if ( ! fs.getFileStatus( outputDir ).isDir() ) { - System.err.println( "ERROR: Output directory is not a directory: " + outputDir ); + LOG.fatal( "Output is not a directory: " + outputDir ); return 2; } @@ -754,11 +754,13 @@ if ( fs.exists( outputPath ) ) { - System.err.println( "ERROR: Output path already exists: " + outputPath ); - if ( ! skipExisting ) + if ( skipExisting ) { - return 3; + LOG.warn( "Skipping output path which already exists: " + outputPath ); + continue ; } + LOG.fatal( "Output path already exists: " + outputPath ); + return 3; } job.setJobName( "Importer " + inputPath ); @@ -790,9 +792,7 @@ catch ( Exception e ) { LOG.fatal( "Importer: ", e ); - System.out.println( "Fatal error: " + e ); - e.printStackTrace( System.out ); - return -1; + return 4; } } @@ -805,7 +805,9 @@ "Usage: Importer [opts] <input> <output_dir>]\n" + "Options:\n" + " -e filename Exclusions file, over-rides configuration property.\n" - + " -m Inputs are manifest files\n" + + " -m Inputs are manifest files\n" + + " -s Skip inputs where corresponding output directory exists.\n" + + " Without -s, processing reports error and stops.\n" + "\n" ; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |