Search in sources :

Example 11 with HostMessenger

use of org.voltcore.messaging.HostMessenger in project voltdb by VoltDB.

the class TestStateMachine method recoverSite.

public void recoverSite(int site) throws Exception {
    HostMessenger.Config config = new HostMessenger.Config();
    config.internalPort += site;
    config.acceptor = criteria;
    int clientPort = m_ports.next();
    config.zkInterface = "127.0.0.1:" + clientPort;
    m_siteIdToZKPort.put(site, clientPort);
    config.networkThreads = 1;
    HostMessenger hm = new HostMessenger(config, null);
    hm.start();
    MeshProber.prober(hm).waitForDetermination();
    m_messengers.set(site, hm);
    addStateMachinesFor(site);
}
Also used : HostMessenger(org.voltcore.messaging.HostMessenger)

Aggregations

HostMessenger (org.voltcore.messaging.HostMessenger)11 ZooKeeper (org.apache.zookeeper_voltpatches.ZooKeeper)6 HostAndPort (com.google_voltpatches.common.net.HostAndPort)3 JSONObject (org.json_voltpatches.JSONObject)3 Test (org.junit.Test)3 IOException (java.io.IOException)2 Matchers.anyLong (org.mockito.Matchers.anyLong)2 BinaryPayloadMessage (org.voltcore.messaging.BinaryPayloadMessage)2 VoltMessage (org.voltcore.messaging.VoltMessage)2 MeshProber (org.voltdb.probe.MeshProber)2 Supplier (com.google_voltpatches.common.base.Supplier)1 Sets (com.google_voltpatches.common.collect.Sets)1 PrintWriter (java.io.PrintWriter)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 SocketException (java.net.SocketException)1 SimpleDateFormat (java.text.SimpleDateFormat)1 ArrayList (java.util.ArrayList)1 Date (java.util.Date)1 Map (java.util.Map)1