From 477b497dd9bfe3a5512dd6257d037358cd2bf9cc Mon Sep 17 00:00:00 2001 From: Sergey Yakubov <sergey.yakubov@desy.de> Date: Tue, 18 Sep 2018 10:23:34 +0200 Subject: [PATCH] cleanup --- deploy/nomad_jobs/asapo-test.nmd | 177 ----------------- .../src/single_folder_watch_windows.cpp | 4 - .../src/system_folder_watch_linux.cpp | 1 - tests/manual/tests_via_nomad/asapo-test.nomad | 182 ++++++++++++++++++ 4 files changed, 182 insertions(+), 182 deletions(-) delete mode 100644 deploy/nomad_jobs/asapo-test.nmd create mode 100644 tests/manual/tests_via_nomad/asapo-test.nomad diff --git a/deploy/nomad_jobs/asapo-test.nmd b/deploy/nomad_jobs/asapo-test.nmd deleted file mode 100644 index db71a705a..000000000 --- a/deploy/nomad_jobs/asapo-test.nmd +++ /dev/null @@ -1,177 +0,0 @@ -job "asapo-test" { - datacenters = ["dc1"] - - type = "batch" - - group "windows-test" { - - constraint { - attribute = "${attr.kernel.name}" - value = "windows" - } - - count = 0 - task "producer" { - driver = "raw_exec" - - config { - command = "local/dummy-data-producer.exe" - args = [ - "psana002:8400", - "asapo_test1", - "100", - "1000000", - "8", - "0", - "1000"] - } - - artifact { - source = "http://nims.desy.de/extra/asapo/dummy-data-producer.exe" - mode = "file" - destination = "local/dummy-data-producer.exe" - - } - - # resources { - # cpu = 5000 - # memory = 128 - # network { - # mbits = 10000 - # } - } - - } #windows - - group "worker-linux1" { - - constraint { - attribute = "${attr.kernel.name}" - value = "linux" - } - -# constraint { -# attribute = "${meta.location}" -# operator = "!=" -# value = "petra3" -# } - - count = 1 - - task "worker-linux" { - driver = "raw_exec" - - config { - command = "local/getnext_broker" - args = [ - "psana002:8400", - "asapo_test1", - "16", - "oTsKsj8i6WcW_gVzeIFvZCtSfMErjDELJEyAI23n7Ik=", - "30000"] - } - - resources { - cpu = 5000 - memory = 128 - network { - mbits = 10000 - } - } - - artifact { - source = "http://nims.desy.de/extra/asapo/getnext_broker" - } - } - - } # worker-linux1 - - -group "worker-linux2" { - - constraint { - attribute = "${attr.kernel.name}" - value = "linux" - } - -# constraint { -# attribute = "${meta.location}" -# operator = "!=" -# value = "petra3" -# } - - count = 1 - - task "worker-linux" { - driver = "raw_exec" - - config { - command = "local/getnext_broker" - args = [ - "psana002:8400", - "asapo_test2", - "16", - "yzgAcLmijSLWIm8dBiGNCbc0i42u5HSm-zR6FRqo__Y=", - "30000"] - } - resources { - cpu = 5000 - memory = 128 - network { - mbits = 10000 - } - } - - artifact { - source = "http://nims.desy.de/extra/asapo/getnext_broker" - } - } - - } # worker-linux2 - - - group "linux-test" { - - constraint { - attribute = "${attr.kernel.name}" - value = "linux" - } - - constraint { - attribute = "${meta.location}" - value = "petra3" - } - - count = 1 - - task "producer" { - driver = "raw_exec" - - config { - command = "local/dummy-data-producer" - args = [ - "psana002:8400", - "asapo_test2", - "100", - "1000000", - "8", - "0", - "1000"] - } - - artifact { - source = "http://nims.desy.de/extra/asapo/dummy-data-producer" - } - - # resources { - # cpu = 5000 - # memory = 128 - # network { - # mbits = 10000 - # } - # } - - } - - } #linux -} diff --git a/producer/event_monitor_producer/src/single_folder_watch_windows.cpp b/producer/event_monitor_producer/src/single_folder_watch_windows.cpp index 3edfe8849..a0aa050c8 100644 --- a/producer/event_monitor_producer/src/single_folder_watch_windows.cpp +++ b/producer/event_monitor_producer/src/single_folder_watch_windows.cpp @@ -14,7 +14,6 @@ SingleFolderWatch::SingleFolderWatch(std::string root_folder, std::string folder folder_{std::move(folder)}, buffer_{new char[kBufLen]}, event_list_{event_list} - { } @@ -43,7 +42,6 @@ Error SingleFolderWatch::Watch() { ProcessEvents(bytes_read); } return err; - } Error SingleFolderWatch::ProcessEvent(const WinEvent& event) { @@ -56,8 +54,6 @@ Error SingleFolderWatch::ProcessEvent(const WinEvent& event) { if (watch_io__->IsDirectory(root_folder_ + kPathSeparator + fname)) { return nullptr; } - - event.Print(); event_list_->AddEvent(fname, event.ShouldBeProcessedAfterDelay()); return nullptr; } diff --git a/producer/event_monitor_producer/src/system_folder_watch_linux.cpp b/producer/event_monitor_producer/src/system_folder_watch_linux.cpp index 84e68ffdd..c8f6249c8 100644 --- a/producer/event_monitor_producer/src/system_folder_watch_linux.cpp +++ b/producer/event_monitor_producer/src/system_folder_watch_linux.cpp @@ -85,7 +85,6 @@ Error SystemFolderWatch::FindEventPaths(const InotifyEvent& event, std::string* } Error SystemFolderWatch::ProcessFileEvent(const InotifyEvent& event, FilesToSend* files) { - event.Print(); if (!event.IsNewFileInFolderEvent()) { return nullptr; } diff --git a/tests/manual/tests_via_nomad/asapo-test.nomad b/tests/manual/tests_via_nomad/asapo-test.nomad new file mode 100644 index 000000000..26a71f6fa --- /dev/null +++ b/tests/manual/tests_via_nomad/asapo-test.nomad @@ -0,0 +1,182 @@ +job "asapo-test" { + datacenters = [ + "dc1"] + + type = "batch" + + group "producer-windows" { + + constraint { + attribute = "${attr.kernel.name}" + value = "windows" + } + + count = 1 + task "producer" { + driver = "raw_exec" + + config { + command = "local/dummy-data-producer.exe" + args = [ + "psana002:8400", + "asapo_test1", + "100", + "1000000", + "8", + "0", + "1000"] + } + + artifact { + source = "http://nims.desy.de/extra/asapo/dummy-data-producer.exe" + mode = "file" + destination = "local/dummy-data-producer.exe" + + } + + # resources { + # cpu = 5000 + # memory = 128 + # network { + # mbits = 10000 + # } + } + + } + #windows + + group "producer-linux" { + + constraint { + attribute = "${attr.kernel.name}" + value = "linux" + } + + constraint { + attribute = "${meta.location}" + value = "petra3" + } + + count = 1 + + task "producer" { + driver = "raw_exec" + + config { + command = "local/dummy-data-producer" + args = [ + "psana002:8400", + "asapo_test2", + "100", + "1000000", + "8", + "0", + "1000"] + } + + artifact { + source = "http://nims.desy.de/extra/asapo/dummy-data-producer" + } + + # resources { + # cpu = 5000 + # memory = 128 + # network { + # mbits = 10000 + # } + # } + + } + + } + #linux +} + + +group "worker-linux1" { + + constraint { + attribute = "${attr.kernel.name}" + value = "linux" + } + + # constraint { + # attribute = "${meta.location}" + # operator = "!=" + # value = "petra3" + # } + + count = 1 + + task "worker-linux" { + driver = "raw_exec" + + config { + command = "local/getnext_broker" + args = [ + "psana002:8400", + "asapo_test1", + "16", + "oTsKsj8i6WcW_gVzeIFvZCtSfMErjDELJEyAI23n7Ik=", + "30000"] + } + + resources { + cpu = 5000 + memory = 128 + network { + mbits = 10000 + } + } + + artifact { + source = "http://nims.desy.de/extra/asapo/getnext_broker" + } + } + +} +# worker-linux1 + + +group "worker-linux2" { + + constraint { + attribute = "${attr.kernel.name}" + value = "linux" + } + + # constraint { + # attribute = "${meta.location}" + # operator = "!=" + # value = "petra3" + # } + + count = 1 + + task "worker-linux" { + driver = "raw_exec" + + config { + command = "local/getnext_broker" + args = [ + "psana002:8400", + "asapo_test2", + "16", + "yzgAcLmijSLWIm8dBiGNCbc0i42u5HSm-zR6FRqo__Y=", + "30000"] + } + resources { + cpu = 5000 + memory = 128 + network { + mbits = 10000 + } + } + + artifact { + source = "http://nims.desy.de/extra/asapo/getnext_broker" + } + } + +} +# worker-linux2 -- GitLab