Use the configuration object
This patch changes the APIClient to read the connection string from the configuration object. Main uses the same configuraion API to print it's connecting message and call the configuration setup. Signed-off-by: Amnon Heiman <amnon@scylladb.com>
This commit is contained in:
parent
39b50f63c7
commit
43e07fda0e
@ -74,8 +74,7 @@ public class APIClient {
|
||||
.getLogger(APIClient.class.getName());
|
||||
|
||||
public static String getBaseUrl() {
|
||||
return "http://" + System.getProperty("apiaddress", "localhost") + ":"
|
||||
+ System.getProperty("apiport", "10000");
|
||||
return APIConfig.getBaseUrl();
|
||||
}
|
||||
|
||||
public Invocation.Builder get(String path, MultivaluedMap<String, String> queryParams) {
|
||||
|
@ -3,7 +3,7 @@
|
||||
*/
|
||||
package com.cloudius.urchin.main;
|
||||
|
||||
import com.cloudius.urchin.api.APIClient;
|
||||
import com.cloudius.urchin.api.APIConfig;
|
||||
|
||||
import org.apache.cassandra.db.ColumnFamilyStore;
|
||||
import org.apache.cassandra.db.commitlog.CommitLog;
|
||||
@ -19,7 +19,8 @@ import org.apache.cassandra.service.StorageService;
|
||||
public class Main {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
System.out.println("Connecting to " + APIClient.getBaseUrl());
|
||||
APIConfig.setConfig();
|
||||
System.out.println("Connecting to " + APIConfig.getBaseUrl());
|
||||
System.out.println("Starting the JMX server");
|
||||
StorageService.getInstance();
|
||||
StorageProxy.getInstance();
|
||||
|
Loading…
x
Reference in New Issue
Block a user