From 8fad57f105b62772d9c679dda9666d60c93a814d Mon Sep 17 00:00:00 2001 From: cwy-p8d-u1 <sven-ove.haensel@stud.hs-hannover.de> Date: Mon, 19 Aug 2024 11:55:37 +0200 Subject: [PATCH] tag: marke changed code --- code/eval/queries/cypher/memgraph/memgraph_queries.py | 2 +- code/infrastructure/docker-compose_memgraph.yml | 1 + .../eval/query/memgraph/queries/queries copy.txt | 1 - code/infrastructure/eval/query/memgraph/queries/queries.txt | 2 +- code/infrastructure/streaming/broker/mosquitto.conf | 2 +- code/infrastructure/streaming/clients/pub/pub_cdm.py | 1 - .../sub_mem_whole_batch_kind_oriented_using_Merge_no_label.py | 3 --- .../clients/sub/memgraph/Procedure_for_module_in_memgraph.py | 1 - .../streaming/clients/sub/memgraph/SOH_sub_mem.py | 1 - .../sub/memgraph/Unwind/sub_mem_whole_batch_using_unwind.py | 3 --- .../sub_mem_whole_batch_using_unwind_edges_in_Thread.py | 1 - .../Unwind/sub_mem_whole_batch_using_unwind_two_label.py | 1 - .../sub_mem_whole_batch_using_unwind_using_procedure_node.py | 1 - .../sub_mem_whole_batch_using_unwind_using_procedure_nodes.py | 1 - .../kind_oriented/sub_mem_whole_batch_kind_oriented.py | 4 ---- .../sub_mem_whole_batch_kind_oriented_no_Label.py | 4 ---- .../sub_mem_whole_batch_kind_oriented_no_Params.py | 4 ---- .../sub_mem_whole_batch_kind_oriented_two_label.py | 4 ---- ...batch_kind_oriented_two_label_internal_collision_handle.py | 3 --- .../sub/memgraph/sub_mem_original_sub_used_as_a_basis.py | 1 - .../sub_mem_whole_batch_subgraph_oriented.py | 1 - .../sub_mem_whole_batch_subgraph_oriented_using_Params.py | 1 - ...em_whole_batch_subgraph_oriented_using_Params_two_label.py | 1 - 23 files changed, 4 insertions(+), 40 deletions(-) diff --git a/code/eval/queries/cypher/memgraph/memgraph_queries.py b/code/eval/queries/cypher/memgraph/memgraph_queries.py index 0cd61a9..c88d8d0 100644 --- a/code/eval/queries/cypher/memgraph/memgraph_queries.py +++ b/code/eval/queries/cypher/memgraph/memgraph_queries.py @@ -137,4 +137,4 @@ if __name__ == "__main__": logging.info("Script interrupted by user") finally: driver.close() - logging.info("Database connection closed.") + logging.info("Database connection closed.") \ No newline at end of file diff --git a/code/infrastructure/docker-compose_memgraph.yml b/code/infrastructure/docker-compose_memgraph.yml index 611e5a9..f0a3f9f 100644 --- a/code/infrastructure/docker-compose_memgraph.yml +++ b/code/infrastructure/docker-compose_memgraph.yml @@ -24,6 +24,7 @@ services: - ./monitoring/prometheus/config:/etc/prometheus - ./monitoring/prometheus/data:/prometheus + # Container Advisor - Docker Compose Metriken zu scrapen cadvisor: image: gcr.io/cadvisor/cadvisor:v0.47.0 diff --git a/code/infrastructure/eval/query/memgraph/queries/queries copy.txt b/code/infrastructure/eval/query/memgraph/queries/queries copy.txt index 7748ae7..b712a70 100644 --- a/code/infrastructure/eval/query/memgraph/queries/queries copy.txt +++ b/code/infrastructure/eval/query/memgraph/queries/queries copy.txt @@ -7,7 +7,6 @@ path|MATCH path = ((a {uuid: 'A6A7C956-0132-5506-96D1-2A7DE97CB400'})-[*ALLSHORT Above Original queries - Own Query 2-hop|MATCH (a)-[*1]-(b) WHERE a.uuid='9FF334BB-9072-D756-B290-556656D73728' WITH COLLECT(DISTINCT b) as nodes_at_hop_1 RETURN nodes_at_hop_1 AS nodes UNION MATCH (a)-[*2]-(b) WHERE a.uuid='9FF334BB-9072-D756-B290-556656D73728' WITH COLLECT(DISTINCT b) as nodes_at_hop_2 RETURN nodes_at_hop_2 AS nodes; diff --git a/code/infrastructure/eval/query/memgraph/queries/queries.txt b/code/infrastructure/eval/query/memgraph/queries/queries.txt index e6ce440..ee3041c 100644 --- a/code/infrastructure/eval/query/memgraph/queries/queries.txt +++ b/code/infrastructure/eval/query/memgraph/queries/queries.txt @@ -1 +1 @@ -count|MATCH (n) return count(n); \ No newline at end of file +count|MATCH (n) return count(n); diff --git a/code/infrastructure/streaming/broker/mosquitto.conf b/code/infrastructure/streaming/broker/mosquitto.conf index 3da3806..d25773a 100644 --- a/code/infrastructure/streaming/broker/mosquitto.conf +++ b/code/infrastructure/streaming/broker/mosquitto.conf @@ -2,4 +2,4 @@ log_dest file /mosquitto/log/mosquitto.log allow_anonymous true listener 1883 0.0.0.0 -max_queued_messages 40000000 \ No newline at end of file +max_queued_messages 40000000 \ No newline at end of file diff --git a/code/infrastructure/streaming/clients/pub/pub_cdm.py b/code/infrastructure/streaming/clients/pub/pub_cdm.py index 7879c60..2b6bac4 100755 --- a/code/infrastructure/streaming/clients/pub/pub_cdm.py +++ b/code/infrastructure/streaming/clients/pub/pub_cdm.py @@ -74,7 +74,6 @@ def process_window_lines(window_data, window_nr): values = [json.loads(line) for line in window_data] send_message(window_data) - def send_message(messages): msg_count = 1 diff --git a/code/infrastructure/streaming/clients/sub/memgraph/Merge/sub_mem_whole_batch_kind_oriented_using_Merge_no_label.py b/code/infrastructure/streaming/clients/sub/memgraph/Merge/sub_mem_whole_batch_kind_oriented_using_Merge_no_label.py index 704b190..8a4abdd 100644 --- a/code/infrastructure/streaming/clients/sub/memgraph/Merge/sub_mem_whole_batch_kind_oriented_using_Merge_no_label.py +++ b/code/infrastructure/streaming/clients/sub/memgraph/Merge/sub_mem_whole_batch_kind_oriented_using_Merge_no_label.py @@ -59,9 +59,6 @@ def flatten_obj(key, val, target): target[key] = val - - - # BatchDataHolder: holds Data for the whole Batch and manages following variables # knownNodes: holds a dictionary with all known nodes, uses uuid as key and identifier as value # create_Nodes: holds a list of Cypher string parts to create the new nodes diff --git a/code/infrastructure/streaming/clients/sub/memgraph/Procedure_for_module_in_memgraph.py b/code/infrastructure/streaming/clients/sub/memgraph/Procedure_for_module_in_memgraph.py index 16dedb4..3299814 100644 --- a/code/infrastructure/streaming/clients/sub/memgraph/Procedure_for_module_in_memgraph.py +++ b/code/infrastructure/streaming/clients/sub/memgraph/Procedure_for_module_in_memgraph.py @@ -11,7 +11,6 @@ import mgp - @mgp.read_proc def bfs_non_only_host_neighbors(context: mgp.ProcCtx, start_node: mgp.Vertex, max_depth: int) -> mgp.Record(result=mgp.List[mgp.Vertex]): queue = [(start_node, 0)] # Queue of tuples (node, current_depth) diff --git a/code/infrastructure/streaming/clients/sub/memgraph/SOH_sub_mem.py b/code/infrastructure/streaming/clients/sub/memgraph/SOH_sub_mem.py index b431ff0..8edb219 100644 --- a/code/infrastructure/streaming/clients/sub/memgraph/SOH_sub_mem.py +++ b/code/infrastructure/streaming/clients/sub/memgraph/SOH_sub_mem.py @@ -50,7 +50,6 @@ def parse_json_to_cypher(input) : ,hasLocalPrincipal="" ) - # create relationships try: if nodeType == 'Subject': diff --git a/code/infrastructure/streaming/clients/sub/memgraph/Unwind/sub_mem_whole_batch_using_unwind.py b/code/infrastructure/streaming/clients/sub/memgraph/Unwind/sub_mem_whole_batch_using_unwind.py index 94f818a..3598f0b 100644 --- a/code/infrastructure/streaming/clients/sub/memgraph/Unwind/sub_mem_whole_batch_using_unwind.py +++ b/code/infrastructure/streaming/clients/sub/memgraph/Unwind/sub_mem_whole_batch_using_unwind.py @@ -109,9 +109,6 @@ class BatchDataHolder: - - - def parse_json_to_cypher(data_list) : ''' Create Cypher Query and parameters from publisher message diff --git a/code/infrastructure/streaming/clients/sub/memgraph/Unwind/sub_mem_whole_batch_using_unwind_edges_in_Thread.py b/code/infrastructure/streaming/clients/sub/memgraph/Unwind/sub_mem_whole_batch_using_unwind_edges_in_Thread.py index a0dce62..448fe14 100644 --- a/code/infrastructure/streaming/clients/sub/memgraph/Unwind/sub_mem_whole_batch_using_unwind_edges_in_Thread.py +++ b/code/infrastructure/streaming/clients/sub/memgraph/Unwind/sub_mem_whole_batch_using_unwind_edges_in_Thread.py @@ -58,7 +58,6 @@ def flatten_obj(key, val, target): else: target[key] = val - # BatchDataHolder: holds Data for a whole batch # nodes: dictionary with the labels as keys to a list of value_flat, the properties of nodes, # each element (dictionary) of the list represents one node diff --git a/code/infrastructure/streaming/clients/sub/memgraph/Unwind/sub_mem_whole_batch_using_unwind_two_label.py b/code/infrastructure/streaming/clients/sub/memgraph/Unwind/sub_mem_whole_batch_using_unwind_two_label.py index 4691b27..efc74df 100644 --- a/code/infrastructure/streaming/clients/sub/memgraph/Unwind/sub_mem_whole_batch_using_unwind_two_label.py +++ b/code/infrastructure/streaming/clients/sub/memgraph/Unwind/sub_mem_whole_batch_using_unwind_two_label.py @@ -58,7 +58,6 @@ def flatten_obj(key, val, target): else: target[key] = val - # BatchDataHolder: holds Data for a whole batch # nodes: dictionary with the labels as keys to a list of value_flat, the properties of nodes, # each element (dictionary) of the list represents one node diff --git a/code/infrastructure/streaming/clients/sub/memgraph/Unwind/sub_mem_whole_batch_using_unwind_using_procedure_node.py b/code/infrastructure/streaming/clients/sub/memgraph/Unwind/sub_mem_whole_batch_using_unwind_using_procedure_node.py index cb9e181..bf8a44a 100644 --- a/code/infrastructure/streaming/clients/sub/memgraph/Unwind/sub_mem_whole_batch_using_unwind_using_procedure_node.py +++ b/code/infrastructure/streaming/clients/sub/memgraph/Unwind/sub_mem_whole_batch_using_unwind_using_procedure_node.py @@ -57,7 +57,6 @@ def flatten_obj(key, val, target): else: target[key] = val - # BatchDataHolder: holds Data for a whole batch # nodes: list of dictionaries, each represents one node, with the label (type) and properties of this node # edges: dictionary with labels of edges as key and as value another dictionary diff --git a/code/infrastructure/streaming/clients/sub/memgraph/Unwind/sub_mem_whole_batch_using_unwind_using_procedure_nodes.py b/code/infrastructure/streaming/clients/sub/memgraph/Unwind/sub_mem_whole_batch_using_unwind_using_procedure_nodes.py index 069fbaa..c81496f 100644 --- a/code/infrastructure/streaming/clients/sub/memgraph/Unwind/sub_mem_whole_batch_using_unwind_using_procedure_nodes.py +++ b/code/infrastructure/streaming/clients/sub/memgraph/Unwind/sub_mem_whole_batch_using_unwind_using_procedure_nodes.py @@ -56,7 +56,6 @@ def flatten_obj(key, val, target): else: target[key] = val - # BatchDataHolder: holds Data for a whole batch # nodes: dictionary with the labels as keys to a list of value_flat, the properties of nodes, # each element (dictionary) of the list represents one node diff --git a/code/infrastructure/streaming/clients/sub/memgraph/kind_oriented/sub_mem_whole_batch_kind_oriented.py b/code/infrastructure/streaming/clients/sub/memgraph/kind_oriented/sub_mem_whole_batch_kind_oriented.py index a8aeaee..b912df1 100644 --- a/code/infrastructure/streaming/clients/sub/memgraph/kind_oriented/sub_mem_whole_batch_kind_oriented.py +++ b/code/infrastructure/streaming/clients/sub/memgraph/kind_oriented/sub_mem_whole_batch_kind_oriented.py @@ -56,10 +56,6 @@ def flatten_obj(key, val, target): else: target[key] = val - - - - # BatchDataHolder: holds Data for the whole Batch and manages following variables # knownNodes: holds a dictionary with all known nodes, uses uuid as key and identifier as value # create_Nodes: holds a list of Cypher string parts to create the new nodes diff --git a/code/infrastructure/streaming/clients/sub/memgraph/kind_oriented/sub_mem_whole_batch_kind_oriented_no_Label.py b/code/infrastructure/streaming/clients/sub/memgraph/kind_oriented/sub_mem_whole_batch_kind_oriented_no_Label.py index 7ad872e..5a38537 100644 --- a/code/infrastructure/streaming/clients/sub/memgraph/kind_oriented/sub_mem_whole_batch_kind_oriented_no_Label.py +++ b/code/infrastructure/streaming/clients/sub/memgraph/kind_oriented/sub_mem_whole_batch_kind_oriented_no_Label.py @@ -57,10 +57,6 @@ def flatten_obj(key, val, target): else: target[key] = val - - - - # BatchDataHolder: holds Data for the whole Batch and manages following variables # knownNodes: holds a dictionary with all known nodes, uses uuid as key and identifier as value # create_Nodes: holds a list of Cypher string parts to create the new nodes diff --git a/code/infrastructure/streaming/clients/sub/memgraph/kind_oriented/sub_mem_whole_batch_kind_oriented_no_Params.py b/code/infrastructure/streaming/clients/sub/memgraph/kind_oriented/sub_mem_whole_batch_kind_oriented_no_Params.py index 0103195..c661d48 100644 --- a/code/infrastructure/streaming/clients/sub/memgraph/kind_oriented/sub_mem_whole_batch_kind_oriented_no_Params.py +++ b/code/infrastructure/streaming/clients/sub/memgraph/kind_oriented/sub_mem_whole_batch_kind_oriented_no_Params.py @@ -55,10 +55,6 @@ def flatten_obj(key, val, target): else: target[key] = val - - - - # BatchDataHolder: holds Data for the whole Batch and manages following variables # knownNodes: holds a dictionary with all known nodes, uses uuid as key and identifier as value # create_Nodes: holds a list of Cypher string parts to create the new nodes diff --git a/code/infrastructure/streaming/clients/sub/memgraph/kind_oriented/sub_mem_whole_batch_kind_oriented_two_label.py b/code/infrastructure/streaming/clients/sub/memgraph/kind_oriented/sub_mem_whole_batch_kind_oriented_two_label.py index 1cc8e56..c778c64 100644 --- a/code/infrastructure/streaming/clients/sub/memgraph/kind_oriented/sub_mem_whole_batch_kind_oriented_two_label.py +++ b/code/infrastructure/streaming/clients/sub/memgraph/kind_oriented/sub_mem_whole_batch_kind_oriented_two_label.py @@ -57,10 +57,6 @@ def flatten_obj(key, val, target): else: target[key] = val - - - - # BatchDataHolder: holds Data for the whole Batch and manages following variables # knownNodes: holds a dictionary with all known nodes, uses uuid as key and identifier as value # create_Nodes: holds a list of Cypher string parts to create the new nodes diff --git a/code/infrastructure/streaming/clients/sub/memgraph/kind_oriented/sub_mem_whole_batch_kind_oriented_two_label_internal_collision_handle.py b/code/infrastructure/streaming/clients/sub/memgraph/kind_oriented/sub_mem_whole_batch_kind_oriented_two_label_internal_collision_handle.py index f6eba1d..0f13583 100644 --- a/code/infrastructure/streaming/clients/sub/memgraph/kind_oriented/sub_mem_whole_batch_kind_oriented_two_label_internal_collision_handle.py +++ b/code/infrastructure/streaming/clients/sub/memgraph/kind_oriented/sub_mem_whole_batch_kind_oriented_two_label_internal_collision_handle.py @@ -61,9 +61,6 @@ def flatten_obj(key, val, target): target[key] = val - - - # BatchDataHolder: holds Data for the whole Batch and manages following variables # knownNodes: holds a dictionary with all known nodes, uses uuid as key and identifier as value # create_Nodes: holds a list of Cypher string parts to create the new nodes diff --git a/code/infrastructure/streaming/clients/sub/memgraph/sub_mem_original_sub_used_as_a_basis.py b/code/infrastructure/streaming/clients/sub/memgraph/sub_mem_original_sub_used_as_a_basis.py index e765c54..223c64f 100644 --- a/code/infrastructure/streaming/clients/sub/memgraph/sub_mem_original_sub_used_as_a_basis.py +++ b/code/infrastructure/streaming/clients/sub/memgraph/sub_mem_original_sub_used_as_a_basis.py @@ -37,7 +37,6 @@ def parse_json_to_cypher(input) : #receives a message with one node. changed to value = input["datum"][jsonType] # variables to handle multiple nodes - relations = dict( runsOn="" ,isGeneratedBy="" diff --git a/code/infrastructure/streaming/clients/sub/memgraph/subgraph_oriented/sub_mem_whole_batch_subgraph_oriented.py b/code/infrastructure/streaming/clients/sub/memgraph/subgraph_oriented/sub_mem_whole_batch_subgraph_oriented.py index f8ab3ed..10cc898 100644 --- a/code/infrastructure/streaming/clients/sub/memgraph/subgraph_oriented/sub_mem_whole_batch_subgraph_oriented.py +++ b/code/infrastructure/streaming/clients/sub/memgraph/subgraph_oriented/sub_mem_whole_batch_subgraph_oriented.py @@ -57,7 +57,6 @@ def flatten_obj(key, val, target): else: target[key] = val - # subgraphNodeRelation: Holds Data for each separated Query, for each node creation # lookup_nodes: Holds a list of nodes to match # insert_relations: Holds the Cypher string parts to create the edges diff --git a/code/infrastructure/streaming/clients/sub/memgraph/subgraph_oriented/sub_mem_whole_batch_subgraph_oriented_using_Params.py b/code/infrastructure/streaming/clients/sub/memgraph/subgraph_oriented/sub_mem_whole_batch_subgraph_oriented_using_Params.py index 1066888..0eab71a 100644 --- a/code/infrastructure/streaming/clients/sub/memgraph/subgraph_oriented/sub_mem_whole_batch_subgraph_oriented_using_Params.py +++ b/code/infrastructure/streaming/clients/sub/memgraph/subgraph_oriented/sub_mem_whole_batch_subgraph_oriented_using_Params.py @@ -58,7 +58,6 @@ def flatten_obj(key, val, target): else: target[key] = val - class subgraphNodeRelation: ''' Holds Data for each with WITH separated Query, for each node and its relations diff --git a/code/infrastructure/streaming/clients/sub/memgraph/subgraph_oriented/sub_mem_whole_batch_subgraph_oriented_using_Params_two_label.py b/code/infrastructure/streaming/clients/sub/memgraph/subgraph_oriented/sub_mem_whole_batch_subgraph_oriented_using_Params_two_label.py index 64d6318..60c269e 100644 --- a/code/infrastructure/streaming/clients/sub/memgraph/subgraph_oriented/sub_mem_whole_batch_subgraph_oriented_using_Params_two_label.py +++ b/code/infrastructure/streaming/clients/sub/memgraph/subgraph_oriented/sub_mem_whole_batch_subgraph_oriented_using_Params_two_label.py @@ -128,7 +128,6 @@ class subgraphNodeRelation: else: return True - # BatchDataHolder: holds Data for the whole Batch # knownNodes: Holds a list with all known identifier as a dictonary to look up if the node is already known # with_list_identifier: Holds a list of identifiers, used to append a WITH at batch_query with all identifiers -- GitLab