{"action":"created","issue":{"url":"https://api.github.com/repos/brianoliver/migration/issues/47","repository_url":"https://api.github.com/repos/brianoliver/migration","labels_url":"https://api.github.com/repos/brianoliver/migration/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/brianoliver/migration/issues/47/comments","events_url":"https://api.github.com/repos/brianoliver/migration/issues/47/events","html_url":"https://github.com/brianoliver/migration/issues/47","id":153456473,"number":47,"title":"Provide the ability to safely (when status HA) kill or stop a random member of a Cluster","user":{"login":"brianoliver","id":2628293,"avatar_url":"https://avatars.githubusercontent.com/u/2628293?v=3","gravatar_id":"","url":"https://api.github.com/users/brianoliver","html_url":"https://github.com/brianoliver","followers_url":"https://api.github.com/users/brianoliver/followers","following_url":"https://api.github.com/users/brianoliver/following{/other_user}","gists_url":"https://api.github.com/users/brianoliver/gists{/gist_id}","starred_url":"https://api.github.com/users/brianoliver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianoliver/subscriptions","organizations_url":"https://api.github.com/users/brianoliver/orgs","repos_url":"https://api.github.com/users/brianoliver/repos","events_url":"https://api.github.com/users/brianoliver/events{/privacy}","received_events_url":"https://api.github.com/users/brianoliver/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/brianoliver/migration/labels/Improvement","name":"Improvement","color":"c3e88d"},{"url":"https://api.github.com/repos/brianoliver/migration/labels/Major","name":"Major","color":"7aa1d3"},{"url":"https://api.github.com/repos/brianoliver/migration/labels/Module:%20Coherence","name":"Module: Coherence","color":"bc5940"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-06T13:56:47Z","updated_at":"2016-05-06T13:56:49Z","closed_at":null,"body":"Typically we kill random members in like this:\n\nAssert.assertThat(eventually(invoking(cluster.iterator().next())\n.getMBeanAttribute(new ObjectName(\"Coherence:type=Service,name=Federated[DistributedCache],nodeId=1\"),\n\"StatusHA\", String.class)), (Matcher<String>) not(\"ENDANGERED\"));\n\nClusterMember memberKilled = null;\n\nif (isKillMember())\n{\nRandom random = Base.getRandom();\n\nint nTarget = random.nextInt(nClusterMembers);\nint c       = 0;\n\n// todo: add cluster.killRandomMember\n    for (ClusterMember member : cluster)\n{\nif (c++ == nTarget)\n{\nBase.log(\"Killing: \" + member);\nmember.destroy();\nmemberKilled = member;\n}\n}\n}\n\nWe could add a Helper class to provide this functionality, or perhaps a specialized Cluster implementation"},"comment":{"url":"https://api.github.com/repos/brianoliver/migration/issues/comments/217447261","html_url":"https://github.com/brianoliver/migration/issues/47#issuecomment-217447261","issue_url":"https://api.github.com/repos/brianoliver/migration/issues/47","id":217447261,"user":{"login":"brianoliver","id":2628293,"avatar_url":"https://avatars.githubusercontent.com/u/2628293?v=3","gravatar_id":"","url":"https://api.github.com/users/brianoliver","html_url":"https://github.com/brianoliver","followers_url":"https://api.github.com/users/brianoliver/followers","following_url":"https://api.github.com/users/brianoliver/following{/other_user}","gists_url":"https://api.github.com/users/brianoliver/gists{/gist_id}","starred_url":"https://api.github.com/users/brianoliver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianoliver/subscriptions","organizations_url":"https://api.github.com/users/brianoliver/orgs","repos_url":"https://api.github.com/users/brianoliver/repos","events_url":"https://api.github.com/users/brianoliver/events{/privacy}","received_events_url":"https://api.github.com/users/brianoliver/received_events","type":"User","site_admin":false},"created_at":"2016-05-06T13:56:49Z","updated_at":"2016-05-06T13:56:49Z","body":"Fixed as part of #78"}}