m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules
diff options
context:
space:
mode:
authorMagdalena Grodzińska <mag.grodzinska@gmail.com>2020-01-14 22:33:17 +0100
committerMagdalena Grodzińska <mag.grodzinska@gmail.com>2020-01-14 22:33:17 +0100
commit9681d76b15cc68f2f8246972ae8266522b92fefe (patch)
treebef3eef6127fb98bedae6215a3d9def08c134ac4 /src/main/java/pl/edu/mimuw/cloudatlas/agent/modules
parentc4513b4817ec623d026fa35682b4934a211e1b8a (diff)
Add query installation check
Diffstat (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/modules')
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/GossipGirl.java2
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Qurnik.java3
2 files changed, 1 insertions, 4 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/GossipGirl.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/GossipGirl.java
index b6087e6..5137e0b 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/GossipGirl.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/GossipGirl.java
@@ -202,8 +202,6 @@ public class GossipGirl extends Module {
state.gotQuery(message);
Map<Attribute, ValueQuery> queries = new HashMap();
ValueQuery vq = message.getQuery();
- ValueTime timestamp = state.getTheirQueryTimestamp(message.getName());
- vq.setTimestamp(timestamp.getValue());
queries.put(message.getName(), vq);
UpdateQueriesMessage updateMessage = new UpdateQueriesMessage("", 0, queries);
System.out.println("INFO: GossipGirl sending UpdateQueriesMessage");
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Qurnik.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Qurnik.java
index 9a544d9..c94a87d 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Qurnik.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Qurnik.java
@@ -66,7 +66,6 @@ public class Qurnik extends Module {
}
private void executeAllQueries(ZMI zmi, List<ValueQuery> queries, PathName currentPath) throws InterruptedException {
- System.out.println("INFO: Qurnik executing all queries " + queries);
if(!zmi.getSons().isEmpty()) {
for(ZMI son : zmi.getSons()) {
Value sonName = son.getAttributes().getOrNull("name");
@@ -81,7 +80,7 @@ public class Qurnik extends Module {
Interpreter interpreter = new Interpreter(zmi);
AttributesMap newAttributes = new AttributesMap();
for (ValueQuery query : queries) {
- if (query != null) {
+ if (query != null && query.isInstalled()) {
try {
List<QueryResult> result = interpreter.interpretProgram(query.getQuery());
for(QueryResult r : result) {