This commit is contained in:
Nunzio Andrea Galante 2017-05-11 16:08:17 +00:00
parent 9ef6c5477f
commit 5dbe0f441e
4 changed files with 31 additions and 7 deletions

View File

@ -100,8 +100,8 @@ public class HAProxy ***REMOVED***
***REMOVED***URL stockURL = new URL("http:***REMOVED***data.d4science.org/c29KTUluTkZnRlB0WXE5NVNaZnRoR0dtYThUSmNTVlhHbWJQNStIS0N6Yz0");
***REMOVED***System.out.println(stockURL);
***REMOVED*** dev
***REMOVED*** URL stockURL = new
***REMOVED*** URL("http:***REMOVED***data.d4science.org/c29KTUluTkZnRlB0WXE5NVNaZnRoR0dtYThUSmNTVlhHbWJQNStIS0N6Yz0");
***REMOVED***URL stockURL = new
***REMOVED***URL("http:***REMOVED***data.d4science.org/c29KTUluTkZnRlB0WXE5NVNaZnRoR0dtYThUSmNTVlhHbWJQNStIS0N6Yz0");
BufferedReader in = new BufferedReader(new InputStreamReader(stockURL.openStream()));
reader = new CSVReader(in, ',');
String[] nextLine;

View File

@ -39,9 +39,8 @@ public class DataminerPoolManager ***REMOVED***
public DataminerPoolManager()***REMOVED***
try ***REMOVED***
***REMOVED***TODO: read this from configuration
this.svnUpdater = new SVNUpdater(
"https:***REMOVED***svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/RConfiguration/RPackagesManagement/");
***REMOVED***TODO: read this from configuration - fatto
this.svnUpdater = new SVNUpdater(new Props().getSVNrepo());
***REMOVED*** catch (SVNException e) ***REMOVED***
e.printStackTrace();
***REMOVED***
@ -62,6 +61,7 @@ public class DataminerPoolManager ***REMOVED***
***REMOVED***Algorithm algo, String targetVREToken) throws IOException, InterruptedException ***REMOVED***
Cluster cluster = new Cluster();
SecurityTokenProvider.instance.set(targetVREToken);
for (Host h : new HAProxy().listDataMinersByCluster()) ***REMOVED***
cluster.addHost(h);
***REMOVED***

View File

@ -27,6 +27,28 @@ public class Props ***REMOVED***
***REMOVED***
public String getSVNrepo() ***REMOVED***
Properties props = new Properties();
java.io.InputStream input = Props.class.getClassLoader().getResourceAsStream("service.properties");
***REMOVED*** loading properites from properties file
try ***REMOVED***
props.load(input);
***REMOVED*** catch (IOException e) ***REMOVED***
***REMOVED*** TODO Auto-generated catch block
e.printStackTrace();
***REMOVED***
***REMOVED*** reading proeprty
String path = props.getProperty("SVN_REPO");
return path;
***REMOVED***
public String getStagingHost() ***REMOVED***
Properties props = new Properties();
java.io.InputStream input = Props.class.getClassLoader().getResourceAsStream("service.properties");
@ -46,7 +68,8 @@ public class Props ***REMOVED***
***REMOVED***
public static void main(String[] args) ***REMOVED***
Props a = new Props();
System.out.println(a.getStagingHost());
***REMOVED***Props a = new Props();
System.out.println(new Props().getSVNrepo());
***REMOVED***System.out.println(a.getStagingHost());
***REMOVED***
***REMOVED***

View File

@ -1,3 +1,4 @@
#YML node file
STAGING_HOST: dataminer1-devnext.d4science.org
SVN_REPO: https:***REMOVED***svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/RConfiguration/RPackagesManagement/
#HAPROXY_CSV: http:***REMOVED***data.d4science.org/Yk4zSFF6V3JOSytNd3JkRDlnRFpDUUR5TnRJZEw2QjRHbWJQNStIS0N6Yz0