Changeset 27566 for gs2-extensions


Ignore:
Timestamp:
2013-06-06T16:21:10+12:00 (11 years ago)
Author:
jmt12
Message:

Making the getcpu optional - as it isn't available on Medusa (but then I don't need to know CPU number on the cluster)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/parallel-building/trunk/src/src/java/org/nzdl/gsdl/HadoopGreenstoneIngest.java

    r27558 r27566  
    188188      header_block.append(InetAddress.getLocalHost().getHostName());
    189189      header_block.append("]\n[CPU:");
    190       header_block.append(runCommand(gsdlhome + "/ext/parallel-building/linux/bin/getcpu"));
     190      String getcpu_executable_cmd = gsdlhome + "/ext/parallel-building/linux/bin/getcpu";
     191      File getcpu_executable = new File(getcpu_executable_cmd);
     192      if (getcpu_executable.exists())
     193      {
     194        header_block.append(runCommand(getcpu_executable_cmd));
     195      }
     196      else
     197      {
     198        header_block.append("0");
     199      }
    191200      header_block.append("]\n[Task:");
    192201      header_block.append(task_id);
Note: See TracChangeset for help on using the changeset viewer.