m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2020-01-29 22:36:00 +0100
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2020-01-29 22:36:00 +0100
commitfc5a509de696fa71d5d81c47bd65aac984fffe92 (patch)
tree48e30f084b755d9dc74d667ffc3004a45661d134 /src
parente077bc66a89220b0326f65f0bc5fea96f2576483 (diff)
parent60102d4c2b644c6e30f1f8281086e8a55664e4d4 (diff)
Merge remote-tracking branch 'origin2/final-cleanup' into final-cleanup
Diffstat (limited to 'src')
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/agent/HierarchyConfig.java13
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java12
2 files changed, 6 insertions, 19 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/HierarchyConfig.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/HierarchyConfig.java
index 71ccf3d..280a11f 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/HierarchyConfig.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/HierarchyConfig.java
@@ -66,7 +66,7 @@ public class HierarchyConfig {
System.out.println("Interrupted while initiating gossip");
} catch (Exception e) {
System.out.println("ERROR: something happened " + e.toString());
- e.printStackTrace();
+ e.printStackTrace();
}
}
};
@@ -131,9 +131,9 @@ public class HierarchyConfig {
}
private <T> ValueContact selectContactFromSet(Set<T> contacts) throws Exception {
- if (contacts.size() == 0) {
- return null;
- }
+ if (contacts.size() == 0) {
+ return null;
+ }
int i = random.nextInt(contacts.size());
for (T contact : contacts) {
if (i == 0) {
@@ -150,7 +150,7 @@ public class HierarchyConfig {
List<ZMI> siblingsImm = root.findDescendant(path).getFather().getSons();
List<ZMI> siblings = new ArrayList();
for (ZMI siblingOrI : siblingsImm) {
- siblings.add(siblingOrI);
+ siblings.add(siblingOrI);
}
return siblings;
} catch (ZMI.NoSuchZoneException e) {
@@ -166,8 +166,7 @@ public class HierarchyConfig {
ValueSet contacts = (ValueSet) zmi.getAttributes().getOrNull("contacts");
if (contacts == null || contacts.isNull() || contacts.isEmpty() || onlyContactIsUs(contacts)) {
iterator.remove();
- } else {
- }
+ }
}
}
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java b/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java
index bbdb8dc..a83e403 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java
@@ -45,21 +45,9 @@ public class ClientController {
String agentHostname = System.getProperty("agent_hostname");
Registry registry = LocateRegistry.getRegistry(agentHostname);
this.agentApi = (Api) registry.lookup("Api");
- System.out.println("agent api:");
- System.out.println(this.agentApi);
-
String querySignerHostname = System.getProperty("query_signer_hostname");
Registry querySignerRegistry = LocateRegistry.getRegistry(querySignerHostname);
- System.out.println("querySignerHostname: " + querySignerHostname);
- System.out.println(InetAddress.getByName("localhost"));
- System.out.println(InetAddress.getByName(querySignerHostname));
- System.out.println("LIST:");
- System.out.println(querySignerRegistry.list());
- System.out.println("registry:");
- System.out.println(querySignerRegistry);
this.querySignerApi = (QuerySignerApi) querySignerRegistry.lookup("QuerySignerApi");
- System.out.println("api:");
- System.out.println(this.querySignerApi);
} catch (Exception e) {
System.err.println("Client exception:");
e.printStackTrace();