Changeset 27566

Show
Ignore:
Timestamp:
06.06.2013 16:21:10 (6 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)

Files:
1 modified

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);