Package org.I0Itec.zkclient

Examples of org.I0Itec.zkclient.ZkClient.readData()


        assertDeployment("http://localhost:8080/s4/" + s4rToDeploy.getName());

        // check resource loading (we use a zkclient without custom serializer)
        ZkClient client2 = new ZkClient("localhost:" + CommTestUtils.ZK_PORT);
        Assert.assertEquals("Salut!", client2.readData("/resourceData"));

    }

    private void initializeS4Node() throws ConfigurationException, IOException, InterruptedException {
        // 0. package s4 app
View Full Code Here


            ZNRecord record = new ZNRecord(String.valueOf(System.currentTimeMillis()));
            record.putSimpleField(DistributedDeploymentManager.S4R_URI, uri);
            record.putSimpleField("name", deployArgs.appName);
            String deployedAppPath = "/s4/clusters/" + deployArgs.clusterName + "/app/s4App";
            if (zkClient.exists(deployedAppPath)) {
                ZNRecord readData = zkClient.readData(deployedAppPath);
                logger.error("Cannot deploy app [{}], because app [{}] is already deployed", deployArgs.appName,
                        readData.getSimpleField("name"));
                System.exit(1);
            }
View Full Code Here

    LOG.info("restoring indices meta data...");
    String oldIndicesPath = getOldIndicesPath(zkConf);
    List<String> indices = zkClient.getChildren(oldIndicesPath);
    LOG.info("found " + indices.size() + " old indices");
    for (String indexName : indices) {
      net.sf.katta.index.IndexMetaData oldIndexMD = zkClientForWriables.readData(oldIndicesPath + "/" + indexName);
      IndexMetaData newIndexMD = new IndexMetaData(indexName, oldIndexMD.getPath(), oldIndexMD.getReplicationLevel());
      IndexReinitializeOperation deployOperation = new IndexReinitializeOperation(newIndexMD);
      protocol.addMasterOperation(deployOperation);
      protocol.publishIndex(newIndexMD);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.