git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/dataminer-pool-manager@148704 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
79e801c2ec
commit
c09cc4848f
|
@ -65,7 +65,8 @@ public class RestPoolManager implements PoolManager {
|
||||||
return service.getLogById(logUrl);
|
return service.getLogById(logUrl);
|
||||||
***REMOVED***
|
***REMOVED***
|
||||||
|
|
||||||
@Override
|
|
||||||
|
@Override
|
||||||
public Algorithm extractAlgorithm(String url) throws IOException {
|
public Algorithm extractAlgorithm(String url) throws IOException {
|
||||||
***REMOVED*** TODO Auto-generated method stub
|
***REMOVED*** TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -17,9 +17,9 @@ public class DataminerPoolManager {
|
||||||
|
|
||||||
private SVNUpdater svnUpdater;
|
private SVNUpdater svnUpdater;
|
||||||
|
|
||||||
public DataminerPoolManager(){
|
public DataminerPoolManager() {
|
||||||
try {
|
try {
|
||||||
***REMOVED***TODO: read this from configuration - fatto
|
***REMOVED***TODO: read this from configuration
|
||||||
this.svnUpdater = new SVNUpdater(new Props().getSVNrepo());
|
this.svnUpdater = new SVNUpdater(new Props().getSVNrepo());
|
||||||
***REMOVED*** catch (SVNException e) {
|
***REMOVED*** catch (SVNException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package org.gcube.dataanalysis.dataminer.poolmanager.util;
|
package org.gcube.dataanalysis.dataminer.poolmanager.util;
|
||||||
|
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
***REMOVED***
|
***REMOVED***
|
||||||
|
|
||||||
***REMOVED***
|
***REMOVED***
|
||||||
|
@ -12,7 +13,7 @@ public class ClusterBuilder {
|
||||||
|
|
||||||
|
|
||||||
***REMOVED***1. to complete
|
***REMOVED***1. to complete
|
||||||
public static Cluster getStagingDataminerCluster(){
|
public static Cluster getStagingDataminerCluster() throws FileNotFoundException{
|
||||||
Cluster cluster = new Cluster();
|
Cluster cluster = new Cluster();
|
||||||
Props p = new Props();
|
Props p = new Props();
|
||||||
Host h = new Host(p.getStagingHost());
|
Host h = new Host(p.getStagingHost());
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
package org.gcube.dataanalysis.dataminer.poolmanager.util;
|
package org.gcube.dataanalysis.dataminer.poolmanager.util;
|
||||||
|
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
***REMOVED***
|
***REMOVED***
|
||||||
|
import java.io.InputStream;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
public class Props {
|
public class Props {
|
||||||
|
@ -11,17 +14,25 @@ public class Props {
|
||||||
|
|
||||||
public String getCSVUrl() {
|
public String getCSVUrl() {
|
||||||
Properties props = new Properties();
|
Properties props = new Properties();
|
||||||
java.io.InputStream input = Props.class.getClassLoader().getResourceAsStream("service.properties");
|
***REMOVED***read from war
|
||||||
|
***REMOVED***java.io.InputStream input = Props.class.getClassLoader().getResourceAsStream("service.properties");
|
||||||
***REMOVED*** loading properites from properties file
|
|
||||||
|
***REMOVED***read from filesystem
|
||||||
|
FileInputStream input;
|
||||||
try {
|
try {
|
||||||
props.load(input);
|
input = new FileInputStream(home+"/dpmConfig/service.properties");
|
||||||
***REMOVED*** catch (IOException e) {
|
***REMOVED*** loading properites from properties file
|
||||||
|
try {
|
||||||
|
props.load(input);
|
||||||
|
***REMOVED*** catch (IOException e) {
|
||||||
|
***REMOVED*** TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
***REMOVED***
|
||||||
|
***REMOVED*** catch (FileNotFoundException e1) {
|
||||||
***REMOVED*** TODO Auto-generated catch block
|
***REMOVED*** TODO Auto-generated catch block
|
||||||
e.printStackTrace();
|
e1.printStackTrace();
|
||||||
***REMOVED***
|
***REMOVED***
|
||||||
|
***REMOVED*** reading propeprty
|
||||||
***REMOVED*** reading proeprty
|
|
||||||
String path = props.getProperty("HAPROXY_CSV");
|
String path = props.getProperty("HAPROXY_CSV");
|
||||||
return path;
|
return path;
|
||||||
|
|
||||||
|
@ -30,17 +41,25 @@ public class Props {
|
||||||
|
|
||||||
public String getSVNrepo() {
|
public String getSVNrepo() {
|
||||||
Properties props = new Properties();
|
Properties props = new Properties();
|
||||||
java.io.InputStream input = Props.class.getClassLoader().getResourceAsStream("service.properties");
|
***REMOVED***read from war
|
||||||
|
***REMOVED***java.io.InputStream input = Props.class.getClassLoader().getResourceAsStream("service.properties");
|
||||||
***REMOVED*** loading properites from properties file
|
|
||||||
|
***REMOVED***read from filesystem
|
||||||
|
FileInputStream input;
|
||||||
try {
|
try {
|
||||||
props.load(input);
|
input = new FileInputStream(home+"/dpmConfig/service.properties");
|
||||||
***REMOVED*** catch (IOException e) {
|
***REMOVED*** loading properites from properties file
|
||||||
|
try {
|
||||||
|
props.load(input);
|
||||||
|
***REMOVED*** catch (IOException e) {
|
||||||
|
***REMOVED*** TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
***REMOVED***
|
||||||
|
***REMOVED*** catch (FileNotFoundException e1) {
|
||||||
***REMOVED*** TODO Auto-generated catch block
|
***REMOVED*** TODO Auto-generated catch block
|
||||||
e.printStackTrace();
|
e1.printStackTrace();
|
||||||
***REMOVED***
|
***REMOVED***
|
||||||
|
***REMOVED*** reading propeprty
|
||||||
***REMOVED*** reading proeprty
|
|
||||||
String path = props.getProperty("SVN_REPO");
|
String path = props.getProperty("SVN_REPO");
|
||||||
return path;
|
return path;
|
||||||
|
|
||||||
|
@ -48,28 +67,37 @@ public class Props {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String getStagingHost() {
|
public String getStagingHost() {
|
||||||
Properties props = new Properties();
|
Properties props = new Properties();
|
||||||
java.io.InputStream input = Props.class.getClassLoader().getResourceAsStream("service.properties");
|
***REMOVED***read from war
|
||||||
|
***REMOVED***java.io.InputStream input = Props.class.getClassLoader().getResourceAsStream("service.properties");
|
||||||
***REMOVED*** loading properites from properties file
|
|
||||||
|
***REMOVED***read from filesystem
|
||||||
|
FileInputStream input;
|
||||||
try {
|
try {
|
||||||
props.load(input);
|
input = new FileInputStream(home+"/dpmConfig/service.properties");
|
||||||
***REMOVED*** catch (IOException e) {
|
***REMOVED*** loading properites from properties file
|
||||||
|
try {
|
||||||
|
props.load(input);
|
||||||
|
***REMOVED*** catch (IOException e) {
|
||||||
|
***REMOVED*** TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
***REMOVED***
|
||||||
|
***REMOVED*** catch (FileNotFoundException e1) {
|
||||||
***REMOVED*** TODO Auto-generated catch block
|
***REMOVED*** TODO Auto-generated catch block
|
||||||
e.printStackTrace();
|
e1.printStackTrace();
|
||||||
***REMOVED***
|
***REMOVED***
|
||||||
|
|
||||||
***REMOVED*** reading proeprty
|
***REMOVED*** reading propeprty
|
||||||
String path = props.getProperty("STAGING_HOST");
|
String path = props.getProperty("STAGING_HOST");
|
||||||
return path;
|
return path;
|
||||||
|
|
||||||
***REMOVED***
|
***REMOVED***
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) throws FileNotFoundException {
|
||||||
***REMOVED***Props a = new Props();
|
Props a = new Props();
|
||||||
System.out.println(new Props().getSVNrepo());
|
System.out.println(new Props().getSVNrepo());
|
||||||
***REMOVED***System.out.println(a.getStagingHost());
|
System.out.println(a.getStagingHost());
|
||||||
|
System.out.println(a.getCSVUrl());
|
||||||
***REMOVED***
|
***REMOVED***
|
||||||
***REMOVED***
|
***REMOVED***
|
||||||
|
|
Loading…
Reference in New Issue