当前位置: 首页>>代码示例>>Java>>正文


Java TestableZooKeeper.getData方法代码示例

本文整理汇总了Java中org.apache.zookeeper.TestableZooKeeper.getData方法的典型用法代码示例。如果您正苦于以下问题:Java TestableZooKeeper.getData方法的具体用法?Java TestableZooKeeper.getData怎么用?Java TestableZooKeeper.getData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.zookeeper.TestableZooKeeper的用法示例。


在下文中一共展示了TestableZooKeeper.getData方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testFourLetterWordsAllDisabledByDefault

import org.apache.zookeeper.TestableZooKeeper; //导入方法依赖的package包/类
@Test(timeout=30000)
public void testFourLetterWordsAllDisabledByDefault() throws Exception {
    stopServer();
    FourLetterCommands.resetWhiteList();
    System.setProperty("zookeeper.4lw.commands.whitelist", "stat");
    startServer();

    // Default white list for 3.5.x is empty, so all command should fail.
    verifyAllCommandsFail();

    TestableZooKeeper zk = createClient();

    verifyAllCommandsFail();

    zk.getData("/", true, null);

    verifyAllCommandsFail();

    zk.close();

    verifyFuzzyMatch("stat", "Outstanding");
    verifyAllCommandsFail();
}
 
开发者ID:didichuxing2,项目名称:https-github.com-apache-zookeeper,代码行数:24,代码来源:FourLetterWordsWhiteListTest.java

示例2: testFourLetterWordsAllDisabledByDefault

import org.apache.zookeeper.TestableZooKeeper; //导入方法依赖的package包/类
@Test(timeout=30000)
public void testFourLetterWordsAllDisabledByDefault() throws Exception {
    stopServer();
    ServerCnxn.resetWhiteList();
    System.setProperty("zookeeper.4lw.commands.whitelist", "stat");
    startServer();

    // Default white list for 3.5.x is empty, so all command should fail.
    verifyAllCommandsFail();

    TestableZooKeeper zk = createClient();

    verifyAllCommandsFail();

    zk.getData("/", true, null);

    verifyAllCommandsFail();

    zk.close();

    verifyFuzzyMatch("stat", "Outstanding");
    verifyAllCommandsFail();
}
 
开发者ID:l294265421,项目名称:ZooKeeper,代码行数:24,代码来源:FourLetterWordsWhiteListTest.java

示例3: testFourLetterWords

import org.apache.zookeeper.TestableZooKeeper; //导入方法依赖的package包/类
/** Test the various four letter words */
@Test
public void testFourLetterWords() throws Exception {
    verify("ruok", "imok");
    verify("envi", "java.version");
    verify("conf", "clientPort");
    verify("stat", "Outstanding");
    verify("srvr", "Outstanding");
    verify("cons", "queued");
    verify("dump", "Session");
    verify("wchs", "watches");
    verify("wchp", "");
    verify("wchc", "");

    verify("srst", "reset");
    verify("crst", "reset");

    verify("stat", "Outstanding");
    verify("srvr", "Outstanding");
    verify("cons", "queued");

    TestableZooKeeper zk = createClient();
    String sid = getHexSessionId(zk.getSessionId());

    verify("stat", "queued");
    verify("srvr", "Outstanding");
    verify("cons", sid);
    verify("dump", sid);

    zk.getData("/", true, null);

    verify("stat", "queued");
    verify("srvr", "Outstanding");
    verify("cons", sid);
    verify("dump", sid);

    verify("wchs", "watching 1");
    verify("wchp", sid);
    verify("wchc", sid);
    zk.close();

    verify("ruok", "imok");
    verify("envi", "java.version");
    verify("conf", "clientPort");
    verify("stat", "Outstanding");
    verify("srvr", "Outstanding");
    verify("cons", "queued");
    verify("dump", "Session");
    verify("wchs", "watch");
    verify("wchp", "");
    verify("wchc", "");

    verify("srst", "reset");
    verify("crst", "reset");

    verify("stat", "Outstanding");
    verify("srvr", "Outstanding");
    verify("cons", "queued");
    verify("mntr", "zk_server_state\tstandalone");
    verify("mntr", "num_alive_connections");
    verify("stat", "Connections");
    verify("srvr", "Connections");
}
 
开发者ID:maoling,项目名称:fuck_zookeeper,代码行数:64,代码来源:FourLetterWordsTest.java

示例4: testFourLetterWords

import org.apache.zookeeper.TestableZooKeeper; //导入方法依赖的package包/类
/** Test the various four letter words */
@Test
public void testFourLetterWords() throws Exception {
    String servers[] = hostPort.split(",");
    for (String hp : servers) {
        verify(hp, "ruok", "imok");
        verify(hp, "envi", "java.version");
        verify(hp, "conf", "clientPort");
        verify(hp, "stat", "Outstanding");
        verify(hp, "srvr", "Outstanding");
        verify(hp, "cons", "queued");
        verify(hp, "dump", "Session");
        verify(hp, "wchs", "watches");
        verify(hp, "wchp", "");
        verify(hp, "wchc", "");

        verify(hp, "srst", "reset");
        verify(hp, "crst", "reset");

        verify(hp, "stat", "Outstanding");
        verify(hp, "srvr", "Outstanding");
        verify(hp, "cons", "queued");

        TestableZooKeeper zk = createClient(hp);
        String sid = getHexSessionId(zk.getSessionId());

        verify(hp, "stat", "queued");
        verify(hp, "srvr", "Outstanding");
        verify(hp, "cons", sid);
        verify(hp, "dump", sid);

        zk.getData("/", true, null);

        verify(hp, "stat", "queued");
        verify(hp, "srvr", "Outstanding");
        verify(hp, "cons", sid);
        verify(hp, "dump", sid);
        verify(hp, "wchs", "watching 1");
        verify(hp, "wchp", sid);
        verify(hp, "wchc", sid);

        zk.close();

        verify(hp, "ruok", "imok");
        verify(hp, "envi", "java.version");
        verify(hp, "conf", "clientPort");
        verify(hp, "stat", "Outstanding");
        verify(hp, "srvr", "Outstanding");
        verify(hp, "cons", "queued");
        verify(hp, "dump", "Session");
        verify(hp, "wchs", "watch");
        verify(hp, "wchp", "");
        verify(hp, "wchc", "");

        verify(hp, "srst", "reset");
        verify(hp, "crst", "reset");

        verify(hp, "stat", "Outstanding");
        verify(hp, "srvr", "Outstanding");
        verify(hp, "cons", "queued");

        verify(hp, "mntr", "zk_version\t");
    }
}
 
开发者ID:maoling,项目名称:fuck_zookeeper,代码行数:65,代码来源:FourLetterWordsQuorumTest.java

示例5: testFourLetterWords

import org.apache.zookeeper.TestableZooKeeper; //导入方法依赖的package包/类
/** Test the various four letter words */
@Test
public void testFourLetterWords() throws Exception {
    verify("ruok", "imok");
    verify("envi", "java.version");
    verify("conf", "clientPort");
    verify("stat", "Outstanding");
    verify("srvr", "Outstanding");
    verify("cons", "queued");
    verify("dump", "Session");
    verify("wchs", "watches");
    verify("wchp", "");
    verify("wchc", "");

    verify("srst", "reset");
    verify("crst", "reset");

    verify("stat", "Outstanding");
    verify("srvr", "Outstanding");
    verify("cons", "queued");
    verify("gtmk", "306");
    verify("isro", "rw");

    TestableZooKeeper zk = createClient();
    String sid = getHexSessionId(zk.getSessionId());

    verify("stat", "queued");
    verify("srvr", "Outstanding");
    verify("cons", sid);
    verify("dump", sid);
    verify("dirs", "size");

    zk.getData("/", true, null);

    verify("stat", "queued");
    verify("srvr", "Outstanding");
    verify("cons", sid);
    verify("dump", sid);

    verify("wchs", "watching 1");
    verify("wchp", sid);
    verify("wchc", sid);
    verify("dirs", "size");
    zk.close();

    verify("ruok", "imok");
    verify("envi", "java.version");
    verify("conf", "clientPort");
    verify("stat", "Outstanding");
    verify("srvr", "Outstanding");
    verify("cons", "queued");
    verify("dump", "Session");
    verify("wchs", "watch");
    verify("wchp", "");
    verify("wchc", "");

    verify("srst", "reset");
    verify("crst", "reset");

    verify("stat", "Outstanding");
    verify("srvr", "Outstanding");
    verify("cons", "queued");
    verify("mntr", "zk_server_state\tstandalone");
    verify("mntr", "num_alive_connections");
    verify("stat", "Connections");
    verify("srvr", "Connections");
    verify("dirs", "size");
}
 
开发者ID:didichuxing2,项目名称:https-github.com-apache-zookeeper,代码行数:69,代码来源:FourLetterWordsTest.java

示例6: verifyAllCommandsSuccess

import org.apache.zookeeper.TestableZooKeeper; //导入方法依赖的package包/类
private void verifyAllCommandsSuccess() throws Exception {
    verifyExactMatch("ruok", "imok");
    verifyFuzzyMatch("envi", "java.version");
    verifyFuzzyMatch("conf", "clientPort");
    verifyFuzzyMatch("stat", "Outstanding");
    verifyFuzzyMatch("srvr", "Outstanding");
    verifyFuzzyMatch("cons", "queued");
    verifyFuzzyMatch("dump", "Session");
    verifyFuzzyMatch("wchs", "watches");
    verifyFuzzyMatch("wchp", "");
    verifyFuzzyMatch("wchc", "");

    verifyFuzzyMatch("srst", "reset");
    verifyFuzzyMatch("crst", "reset");

    verifyFuzzyMatch("stat", "Outstanding");
    verifyFuzzyMatch("srvr", "Outstanding");
    verifyFuzzyMatch("cons", "queued");
    verifyFuzzyMatch("gtmk", "306");
    verifyFuzzyMatch("isro", "rw");

    TestableZooKeeper zk = createClient();
    String sid = getHexSessionId(zk.getSessionId());

    verifyFuzzyMatch("stat", "queued");
    verifyFuzzyMatch("srvr", "Outstanding");
    verifyFuzzyMatch("cons", sid);
    verifyFuzzyMatch("dump", sid);
    verifyFuzzyMatch("dirs", "size");

    zk.getData("/", true, null);

    verifyFuzzyMatch("stat", "queued");
    verifyFuzzyMatch("srvr", "Outstanding");
    verifyFuzzyMatch("cons", sid);
    verifyFuzzyMatch("dump", sid);

    verifyFuzzyMatch("wchs", "watching 1");
    verifyFuzzyMatch("wchp", sid);
    verifyFuzzyMatch("wchc", sid);
    verifyFuzzyMatch("dirs", "size");
    zk.close();

    verifyExactMatch("ruok", "imok");
    verifyFuzzyMatch("envi", "java.version");
    verifyFuzzyMatch("conf", "clientPort");
    verifyFuzzyMatch("stat", "Outstanding");
    verifyFuzzyMatch("srvr", "Outstanding");
    verifyFuzzyMatch("cons", "queued");
    verifyFuzzyMatch("dump", "Session");
    verifyFuzzyMatch("wchs", "watch");
    verifyFuzzyMatch("wchp", "");
    verifyFuzzyMatch("wchc", "");

    verifyFuzzyMatch("srst", "reset");
    verifyFuzzyMatch("crst", "reset");

    verifyFuzzyMatch("stat", "Outstanding");
    verifyFuzzyMatch("srvr", "Outstanding");
    verifyFuzzyMatch("cons", "queued");
    verifyFuzzyMatch("mntr", "zk_server_state\tstandalone");
    verifyFuzzyMatch("mntr", "num_alive_connections");
    verifyFuzzyMatch("stat", "Connections");
    verifyFuzzyMatch("srvr", "Connections");
    verifyFuzzyMatch("dirs", "size");
}
 
开发者ID:didichuxing2,项目名称:https-github.com-apache-zookeeper,代码行数:67,代码来源:FourLetterWordsWhiteListTest.java

示例7: testFourLetterWords

import org.apache.zookeeper.TestableZooKeeper; //导入方法依赖的package包/类
/** Test the various four letter words */
@Test
public void testFourLetterWords() throws Exception {
    String servers[] = hostPort.split(",");
    for (String hp : servers) {
        verify(hp, "ruok", "imok");
        verify(hp, "envi", "java.version");
        verify(hp, "conf", "clientPort");
        verify(hp, "stat", "Outstanding");
        verify(hp, "srvr", "Outstanding");
        verify(hp, "cons", "queued");
        verify(hp, "dump", "Session");
        verify(hp, "wchs", "watches");
        verify(hp, "wchp", "");
        verify(hp, "wchc", "");

        verify(hp, "srst", "reset");
        verify(hp, "crst", "reset");

        verify(hp, "stat", "Outstanding");
        verify(hp, "srvr", "Outstanding");
        verify(hp, "cons", "queued");

        TestableZooKeeper zk = createClient(hp);
        String sid = getHexSessionId(zk.getSessionId());

        verify(hp, "stat", "queued");
        verify(hp, "srvr", "Outstanding");
        verify(hp, "cons", sid);
        verify(hp, "dump", sid);
        verify(hp, "dirs", "size");

        zk.getData("/", true, null);

        verify(hp, "stat", "queued");
        verify(hp, "srvr", "Outstanding");
        verify(hp, "cons", sid);
        verify(hp, "dump", sid);
        verify(hp, "wchs", "watching 1");
        verify(hp, "wchp", sid);
        verify(hp, "wchc", sid);
        verify(hp, "dirs", "size");

        zk.close();

        verify(hp, "ruok", "imok");
        verify(hp, "envi", "java.version");
        verify(hp, "conf", "clientPort");
        verify(hp, "stat", "Outstanding");
        verify(hp, "srvr", "Outstanding");
        verify(hp, "cons", "queued");
        verify(hp, "dump", "Session");
        verify(hp, "wchs", "watch");
        verify(hp, "wchp", "");
        verify(hp, "wchc", "");
        verify(hp, "dirs", "size");

        verify(hp, "srst", "reset");
        verify(hp, "crst", "reset");

        verify(hp, "stat", "Outstanding");
        verify(hp, "srvr", "Outstanding");
        verify(hp, "cons", "queued");

        verify(hp, "mntr", "zk_version\t");
    }
}
 
开发者ID:didichuxing2,项目名称:https-github.com-apache-zookeeper,代码行数:68,代码来源:FourLetterWordsQuorumTest.java

示例8: verifyAllCommandsSuccess

import org.apache.zookeeper.TestableZooKeeper; //导入方法依赖的package包/类
private void verifyAllCommandsSuccess() throws Exception {
    verifyExactMatch("ruok", "imok");
    verifyFuzzyMatch("envi", "java.version");
    verifyFuzzyMatch("conf", "clientPort");
    verifyFuzzyMatch("stat", "Outstanding");
    verifyFuzzyMatch("srvr", "Outstanding");
    verifyFuzzyMatch("cons", "queued");
    verifyFuzzyMatch("dump", "Session");
    verifyFuzzyMatch("wchs", "watches");
    verifyFuzzyMatch("wchp", "");
    verifyFuzzyMatch("wchc", "");

    verifyFuzzyMatch("srst", "reset");
    verifyFuzzyMatch("crst", "reset");

    verifyFuzzyMatch("stat", "Outstanding");
    verifyFuzzyMatch("srvr", "Outstanding");
    verifyFuzzyMatch("cons", "queued");
    verifyFuzzyMatch("gtmk", "306");
    verifyFuzzyMatch("isro", "rw");

    TestableZooKeeper zk = createClient();
    String sid = getHexSessionId(zk.getSessionId());

    verifyFuzzyMatch("stat", "queued");
    verifyFuzzyMatch("srvr", "Outstanding");
    verifyFuzzyMatch("cons", sid);
    verifyFuzzyMatch("dump", sid);

    zk.getData("/", true, null);

    verifyFuzzyMatch("stat", "queued");
    verifyFuzzyMatch("srvr", "Outstanding");
    verifyFuzzyMatch("cons", sid);
    verifyFuzzyMatch("dump", sid);

    verifyFuzzyMatch("wchs", "watching 1");
    verifyFuzzyMatch("wchp", sid);
    verifyFuzzyMatch("wchc", sid);
    zk.close();

    verifyExactMatch("ruok", "imok");
    verifyFuzzyMatch("envi", "java.version");
    verifyFuzzyMatch("conf", "clientPort");
    verifyFuzzyMatch("stat", "Outstanding");
    verifyFuzzyMatch("srvr", "Outstanding");
    verifyFuzzyMatch("cons", "queued");
    verifyFuzzyMatch("dump", "Session");
    verifyFuzzyMatch("wchs", "watch");
    verifyFuzzyMatch("wchp", "");
    verifyFuzzyMatch("wchc", "");

    verifyFuzzyMatch("srst", "reset");
    verifyFuzzyMatch("crst", "reset");

    verifyFuzzyMatch("stat", "Outstanding");
    verifyFuzzyMatch("srvr", "Outstanding");
    verifyFuzzyMatch("cons", "queued");
    verifyFuzzyMatch("mntr", "zk_server_state\tstandalone");
    verifyFuzzyMatch("mntr", "num_alive_connections");
    verifyFuzzyMatch("stat", "Connections");
    verifyFuzzyMatch("srvr", "Connections");
}
 
开发者ID:l294265421,项目名称:ZooKeeper,代码行数:64,代码来源:FourLetterWordsWhiteListTest.java

示例9: testFourLetterWords

import org.apache.zookeeper.TestableZooKeeper; //导入方法依赖的package包/类
/** Test the various four letter words */
@Test
public void testFourLetterWords() throws Exception {
    verify("ruok", "imok");
    verify("envi", "java.version");
    verify("conf", "clientPort");
    verify("stat", "Outstanding");
    verify("srvr", "Outstanding");
    verify("cons", "queued");
    verify("dump", "Session");
    verify("wchs", "watches");
    verify("wchp", "");
    verify("wchc", "");

    verify("srst", "reset");
    verify("crst", "reset");

    verify("stat", "Outstanding");
    verify("srvr", "Outstanding");
    verify("cons", "queued");

    TestableZooKeeper zk = createClient();
    String sid = "0x" + Long.toHexString(zk.getSessionId());

    verify("stat", "queued");
    verify("srvr", "Outstanding");
    verify("cons", sid);
    verify("dump", sid);

    zk.getData("/", true, null);

    verify("stat", "queued");
    verify("srvr", "Outstanding");
    verify("cons", sid);
    verify("dump", sid);

    verify("wchs", "watching 1");
    verify("wchp", sid);
    verify("wchc", sid);
    zk.close();

    verify("ruok", "imok");
    verify("envi", "java.version");
    verify("conf", "clientPort");
    verify("stat", "Outstanding");
    verify("srvr", "Outstanding");
    verify("cons", "queued");
    verify("dump", "Session");
    verify("wchs", "watch");
    verify("wchp", "");
    verify("wchc", "");

    verify("srst", "reset");
    verify("crst", "reset");

    verify("stat", "Outstanding");
    verify("srvr", "Outstanding");
    verify("cons", "queued");
    verify("mntr", "zk_server_state\tstandalone");
    verify("mntr", "num_alive_connections");
    verify("stat", "Connections");
    verify("srvr", "Connections");
}
 
开发者ID:gerritjvv,项目名称:bigstreams,代码行数:64,代码来源:FourLetterWordsTest.java

示例10: testFourLetterWords

import org.apache.zookeeper.TestableZooKeeper; //导入方法依赖的package包/类
/** Test the various four letter words */
@Test
public void testFourLetterWords() throws Exception {
    String servers[] = hostPort.split(",");
    for (String hp : servers) {
        verify(hp, "ruok", "imok");
        verify(hp, "envi", "java.version");
        verify(hp, "conf", "clientPort");
        verify(hp, "stat", "Outstanding");
        verify(hp, "srvr", "Outstanding");
        verify(hp, "cons", "queued");
        verify(hp, "dump", "Session");
        verify(hp, "wchs", "watches");
        verify(hp, "wchp", "");
        verify(hp, "wchc", "");

        verify(hp, "srst", "reset");
        verify(hp, "crst", "reset");

        verify(hp, "stat", "Outstanding");
        verify(hp, "srvr", "Outstanding");
        verify(hp, "cons", "queued");

        TestableZooKeeper zk = createClient(hp);
        String sid = "0x" + Long.toHexString(zk.getSessionId());

        verify(hp, "stat", "queued");
        verify(hp, "srvr", "Outstanding");
        verify(hp, "cons", sid);
        verify(hp, "dump", sid);

        zk.getData("/", true, null);

        verify(hp, "stat", "queued");
        verify(hp, "srvr", "Outstanding");
        verify(hp, "cons", sid);
        verify(hp, "dump", sid);
        verify(hp, "wchs", "watching 1");
        verify(hp, "wchp", sid);
        verify(hp, "wchc", sid);

        zk.close();

        verify(hp, "ruok", "imok");
        verify(hp, "envi", "java.version");
        verify(hp, "conf", "clientPort");
        verify(hp, "stat", "Outstanding");
        verify(hp, "srvr", "Outstanding");
        verify(hp, "cons", "queued");
        verify(hp, "dump", "Session");
        verify(hp, "wchs", "watch");
        verify(hp, "wchp", "");
        verify(hp, "wchc", "");

        verify(hp, "srst", "reset");
        verify(hp, "crst", "reset");

        verify(hp, "stat", "Outstanding");
        verify(hp, "srvr", "Outstanding");
        verify(hp, "cons", "queued");

        verify(hp, "mntr", "zk_version\t");
    }
}
 
开发者ID:gerritjvv,项目名称:bigstreams,代码行数:65,代码来源:FourLetterWordsQuorumTest.java

示例11: testFourLetterWords

import org.apache.zookeeper.TestableZooKeeper; //导入方法依赖的package包/类
/** Test the various four letter words */
@Test
public void testFourLetterWords() throws Exception {
    verify("ruok", "imok");
    verify("envi", "java.version");
    verify("conf", "clientPort");
    verify("stat", "Outstanding");
    verify("srvr", "Outstanding");
    verify("cons", "queued");
    verify("dump", "Session");
    verify("wchs", "watches");
    verify("wchp", "");
    verify("wchc", "");

    verify("srst", "reset");
    verify("crst", "reset");

    verify("stat", "Outstanding");
    verify("srvr", "Outstanding");
    verify("cons", "queued");

    TestableZooKeeper zk = createClient();
    String sid = "0x" + Long.toHexString(zk.getSessionId());

    verify("stat", "queued");
    verify("srvr", "Outstanding");
    verify("cons", sid);
    verify("dump", sid);

    zk.getData("/", true, null);

    verify("stat", "queued");
    verify("srvr", "Outstanding");
    verify("cons", sid);
    verify("dump", sid);

    verify("wchs", "watching 1");
    verify("wchp", sid);
    verify("wchc", sid);
    zk.close();

    verify("ruok", "imok");
    verify("envi", "java.version");
    verify("conf", "clientPort");
    verify("stat", "Outstanding");
    verify("srvr", "Outstanding");
    verify("cons", "queued");
    verify("dump", "Session");
    verify("wchs", "watch");
    verify("wchp", "");
    verify("wchc", "");

    verify("srst", "reset");
    verify("crst", "reset");

    verify("stat", "Outstanding");
    verify("srvr", "Outstanding");
    verify("cons", "queued");
    verify("mntr", "zk_server_state\tstandalone");
}
 
开发者ID:gerritjvv,项目名称:bigstreams,代码行数:61,代码来源:FourLetterWordsTest.java


注:本文中的org.apache.zookeeper.TestableZooKeeper.getData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。