use of com.spotify.helios.master.ZooKeeperMasterModel in project helios by spotify.
the class UndeployFilteringTest method setUp.
@Before
public void setUp() throws Exception {
// make zookeeper interfaces
curator = zk().curatorWithSuperAuth();
final ZooKeeperClientProvider zkcp = new ZooKeeperClientProvider(new DefaultZooKeeperClient(curator), ZooKeeperModelReporter.noop());
final List<EventSender> eventSenders = Collections.emptyList();
zkMasterModel = new ZooKeeperMasterModel(zkcp, getClass().getName(), eventSenders, "");
startDefaultMaster();
agent = startDefaultAgent(TEST_HOST);
client = defaultClient();
awaitHostRegistered(client, TEST_HOST, LONG_WAIT_SECONDS, SECONDS);
}
use of com.spotify.helios.master.ZooKeeperMasterModel in project helios by spotify.
the class TaskHistoryWriterTest method setUp.
@Before
public void setUp() throws Exception {
zk = new ZooKeeperTestingServerManager();
agentStateDirs = Files.createTempDirectory("helios-agents");
client = new DefaultZooKeeperClient(zk.curatorWithSuperAuth());
makeWriter(client);
final ZooKeeperClientProvider zkProvider = new ZooKeeperClientProvider(client, ZooKeeperModelReporter.noop());
final List<EventSender> eventSenders = Collections.emptyList();
masterModel = new ZooKeeperMasterModel(zkProvider, "test", eventSenders, TaskStatusEvent.TASK_STATUS_EVENT_TOPIC);
client.ensurePath(Paths.configJobs());
client.ensurePath(Paths.configJobRefs());
client.ensurePath(Paths.historyJobHostEvents(JOB_ID, HOSTNAME));
masterModel.registerHost(HOSTNAME, "foo");
masterModel.addJob(JOB);
}
use of com.spotify.helios.master.ZooKeeperMasterModel in project helios by spotify.
the class ZooKeeperMasterModelIntegrationTest method setup.
@Before
public void setup() throws Exception {
final RetryPolicy retryPolicy = new ExponentialBackoffRetry(1000, 3);
final CuratorFramework curator = CuratorFrameworkFactory.newClient(zk.connectString(), retryPolicy);
curator.start();
final ZooKeeperClient client = new DefaultZooKeeperClient(curator);
// TODO (dano): this bootstrapping is essentially duplicated from MasterService,
// should be moved into ZooKeeperMasterModel?
client.ensurePath(Paths.configHosts());
client.ensurePath(Paths.configJobs());
client.ensurePath(Paths.configJobRefs());
client.ensurePath(Paths.statusHosts());
client.ensurePath(Paths.statusMasters());
client.ensurePath(Paths.historyJobs());
final ZooKeeperClientProvider zkProvider = new ZooKeeperClientProvider(client, ZooKeeperModelReporter.noop());
final List<EventSender> eventSenders = ImmutableList.of(eventSender);
model = new ZooKeeperMasterModel(zkProvider, getClass().getName(), eventSenders, deploymentGroupEventTopic);
}
Aggregations