File tree Expand file tree Collapse file tree
biojava-structure/src/main/java/org/biojava/nbio/structure/align/client Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222
2323import org .biojava .nbio .structure .align .util .ResourceManager ;
2424
25+ import java .net .InetAddress ;
26+ import java .net .UnknownHostException ;
27+ import java .util .UUID ;
28+
2529public class FarmJobParameters {
2630
2731
@@ -65,13 +69,28 @@ public FarmJobParameters(){
6569
6670 stepSize = DEFAULT_BATCH_SIZE ;
6771
68- username = FarmJobRunnable . getRandomUsername ();
72+ username = getRandomUsername ();
6973 if ( nrPairsProp != null ){
7074 stepSize = Integer .parseInt (nrPairsProp );
7175 }
7276
7377 }
7478
79+ private static String getRandomUsername (){
80+ String name = "" ;
81+ try {
82+ InetAddress i = InetAddress .getLocalHost ();
83+ name += i .getHostAddress ();
84+ name += "_" ;
85+ } catch (UnknownHostException e ){
86+ throw new RuntimeException (e );
87+ }
88+ name += UUID .randomUUID ();
89+
90+ return name ;
91+
92+ }
93+
7594 public String getPdbFilePath () {
7695 return pdbFilePath ;
7796 }
You can’t perform that action at this time.
0 commit comments