Changeset 28010 for gs2-extensions
- Timestamp:
- 2013-08-09T13:11:46+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/parallel-building/trunk/src/src/java/org/nzdl/gsdl/GSInfoDB.java
r27910 r28010 68 68 System.err.println("[DEBUG] Command: " + pb.command()); 69 69 } 70 // - alter environment 71 Map<String, String> pb_env = pb.environment(); 72 pb_env.put("PATH", gsdl_home + "/ext/tdb-edit/linux/bin:" + gsdl_home + "/ext/tdb-edit/bin/script:" + pb_env.get("PATH")); 73 pb_env.put("LD_LIBRARY_PATH", gsdl_home + "/ext/tdb-edit/linux/lib:" + pb_env.get("LD_LIBRARY_PATH")); 70 74 // Start the writer listening 71 75 dbprocess = pb.start(); … … 94 98 dbwriter.close(); 95 99 dbprocess.waitFor(); 100 if (debug) 101 { 102 System.err.println("[DEBUG] temporary database size: " + this.tmp_file_path.toFile().length() + " bytes"); 103 } 96 104 // Move the database into its final location 105 Files.move(this.tmp_file_path, this.file_path, StandardCopyOption.REPLACE_EXISTING); 106 107 97 108 Runtime rut = Runtime.getRuntime(); 98 109 Process process = rut.exec(new String[] {"mv", this.tmp_file_path.toString(), this.file_path.toString()}); 99 110 // The below always says the file doesn't exist over NFS? 100 /*101 111 if (!this.file_path.toFile().exists()) 102 112 { 103 113 System.err.println("Error! Failed to move database file: " + this.tmp_file_path.toString() + " => " + this.file_path.toString()); 104 114 } 105 */ 115 if (debug) 116 { 117 System.err.println("[DEBUG] final database size: " + this.file_path.toFile().length() + " bytes"); 118 } 106 119 } 107 120 catch (Exception ex)
Note:
See TracChangeset
for help on using the changeset viewer.