Changeset 30354 for gs2-extensions/parallel-building/trunk/src/src/java/org/nzdl/gsdl/HadoopGreenstoneIngest2.java
- Timestamp:
- 2015-12-16T16:15:39+13:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/parallel-building/trunk/src/src/java/org/nzdl/gsdl/HadoopGreenstoneIngest2.java
r28312 r30354 324 324 manifest_writer.close(); 325 325 326 /* Original process calling - sets up environment in Java 326 327 // - call Greenstone passing in the path to the manifest 327 328 ProcessBuilder import_process_builder = new ProcessBuilder("time", "-p", "import.pl", "-manifest", manifest_path.toString(), "-keepold", "-archivedir", conf.get("archivesdir"), collection); … … 357 358 import_process_env.put("HADOOP_PREFIX", hadoop_home); 358 359 fw1.write("[HADOOP_PREFIX: " + hadoop_home + "]\n"); 360 */ 361 362 /* New process call - adds call to setup.bash first to prepare 363 * environment... hopefully */ 364 // - call Greenstone passing in the path to the manifest 365 String environment_script_filename = "setup.bash"; 366 StringBuffer cmd_buffer = new StringBuffer(); 367 cmd_buffer.append("source ./"); 368 cmd_buffer.append(environment_script_filename); 369 cmd_buffer.append(" && time -p import.pl -keepold -manifest \""); 370 cmd_buffer.append(manifest_path.toString()); 371 cmd_buffer.append("\" -archivedir \""); 372 cmd_buffer.append(conf.get("archivesdir")); 373 cmd_buffer.append("\" "); 374 cmd_buffer.append(collection); 375 ProcessBuilder import_process_builder = new ProcessBuilder("bash", "-c", cmd_buffer.toString()); 376 fw1.write("[Command:" + import_process_builder.command() + "]\n"); 359 377 360 378 // - change working directory … … 738 756 job.setReducerClass(GSReducer.class); 739 757 740 // Sets the input and output handlers - may need to adjust input to provide me741 // a series of filenames (TextInputFormat will instead read in a text file and742 // return each line...)758 // Sets the input and output handlers - may need to adjust input to provide 759 // a series of filenames (TextInputFormat will instead read in a text file 760 // and return each line...) 743 761 job.setInputFormatClass(GSFileInputFormat.class); 744 762 //job.setOutputFormatClass(NullOutputFormat.class);
Note:
See TracChangeset
for help on using the changeset viewer.