From 9681d76b15cc68f2f8246972ae8266522b92fefe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Grodzi=C5=84ska?= Date: Tue, 14 Jan 2020 22:33:17 +0100 Subject: Add query installation check --- src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/GossipGirl.java | 2 -- src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Qurnik.java | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/modules') 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 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 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 result = interpreter.interpretProgram(query.getQuery()); for(QueryResult r : result) { -- cgit v1.2.3