Mercurial > hg > Members > shoshi > jungle > jungle-core
changeset 361:33c04f3bec82
add logupdate finish
author | suruga |
---|---|
date | Thu, 01 Feb 2018 19:21:23 +0900 |
parents | d10d35c0960a |
children | afa721d9e9bb |
files | src/test/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/logupdate/LogupdateFinish.java src/test/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/logupdate/LogupdateTestStartCodeSegment.java |
diffstat | 2 files changed, 13 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/logupdate/LogupdateFinish.java Wed Jan 31 19:16:11 2018 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/logupdate/LogupdateFinish.java Thu Feb 01 19:21:23 2018 +0900 @@ -12,7 +12,8 @@ private Receiver clist = ids.create(CommandType.PEEK); LogupdateFinish() { - finish.setKey("jungleControl"); + finish.setKey("finish"); + clist.setKey("_CLIST"); } @Override @@ -22,11 +23,14 @@ @SuppressWarnings("unchecked") List<String> list = clist.asClass(List.class); for (String node : list) {//他ノードへlogの書き込み - if (!node.equals(finish.from)) - ods.put(node, "jungleControl", 1); + if (!node.equals(finish.from)) { + ods.put(node, "finish", 1); + } } - if (command == 1) { - ods.finish("local"); + for (String node : list) {//他ノードへlogの書き込み + if (!node.equals(finish.from)) { + ods.finish(node); + } } } }
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/logupdate/LogupdateTestStartCodeSegment.java Wed Jan 31 19:16:11 2018 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/logupdate/LogupdateTestStartCodeSegment.java Thu Feb 01 19:21:23 2018 +0900 @@ -53,18 +53,16 @@ ods.put("updator", cassaBBS); new LogUpdateCodeSegment(); + new LogupdateFinish(); if (config.isWriteMode()) { for (int i = config.writeCount;i>0;i--) { bbsTest.createMessage(); } try { bbsTest.checkTime(); - @SuppressWarnings("unchecked") - List<String> list = clist.asClass(List.class); - for (String node : list) {//他ノードへlogの書き込み - ods.put(node, "jungleControl", 1); - } - ods.finish("local"); + ods.put("finish",0); + ods.put("manager","finish",0); + // ods.finish("manager"); } catch (IOException e) { e.printStackTrace(); }