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


Java SolrZkClient.printLayoutToStdOut方法代码示例

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


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

示例1: printLayout

import org.apache.solr.common.cloud.SolrZkClient; //导入方法依赖的package包/类
protected void printLayout() throws Exception {
  SolrZkClient zkClient = new SolrZkClient(zkServer.getZkHost(), AbstractZkTestCase.TIMEOUT);
  zkClient.printLayoutToStdOut();
  zkClient.close();
}
 
开发者ID:europeana,项目名称:search,代码行数:6,代码来源:AbstractDistribZkTestBase.java

示例2: printLayout

import org.apache.solr.common.cloud.SolrZkClient; //导入方法依赖的package包/类
protected void printLayout(String zkHost) throws Exception {
  SolrZkClient zkClient = new SolrZkClient(zkHost, AbstractZkTestCase.TIMEOUT);
  zkClient.printLayoutToStdOut();
  zkClient.close();
}
 
开发者ID:europeana,项目名称:search,代码行数:6,代码来源:AbstractZkTestCase.java

示例3: printLayout

import org.apache.solr.common.cloud.SolrZkClient; //导入方法依赖的package包/类
static void printLayout(String zkHost) throws Exception {
  SolrZkClient zkClient = new SolrZkClient(
      zkHost, AbstractZkTestCase.TIMEOUT);
  zkClient.printLayoutToStdOut();
  zkClient.close();
}
 
开发者ID:europeana,项目名称:search,代码行数:7,代码来源:ClusterStateUpdateTest.java

示例4: printLayout

import org.apache.solr.common.cloud.SolrZkClient; //导入方法依赖的package包/类
private void printLayout(String zkHost) throws Exception {
  SolrZkClient zkClient = new SolrZkClient(zkHost, AbstractZkTestCase.TIMEOUT);
  zkClient.printLayoutToStdOut();
  zkClient.close();
}
 
开发者ID:europeana,项目名称:search,代码行数:6,代码来源:LeaderElectionTest.java

示例5: testReadConfigName

import org.apache.solr.common.cloud.SolrZkClient; //导入方法依赖的package包/类
@Test
public void testReadConfigName() throws Exception {
  String zkDir = createTempDir("zkData").getAbsolutePath();
  CoreContainer cc = null;

  ZkTestServer server = new ZkTestServer(zkDir);
  try {
    server.run();

    AbstractZkTestCase.tryCleanSolrZkNode(server.getZkHost());
    AbstractZkTestCase.makeSolrZkNode(server.getZkHost());

    SolrZkClient zkClient = new SolrZkClient(server.getZkAddress(), TIMEOUT);
    String actualConfigName = "firstConfig";

    zkClient.makePath(ZkController.CONFIGS_ZKNODE + "/" + actualConfigName, true);
    
    Map<String,Object> props = new HashMap<>();
    props.put("configName", actualConfigName);
    ZkNodeProps zkProps = new ZkNodeProps(props);
    zkClient.makePath(ZkStateReader.COLLECTIONS_ZKNODE + "/"
        + COLLECTION_NAME, ZkStateReader.toJSON(zkProps),
        CreateMode.PERSISTENT, true);

    if (DEBUG) {
      zkClient.printLayoutToStdOut();
    }
    zkClient.close();
    
    cc = getCoreContainer();
    
    ZkController zkController = new ZkController(cc, server.getZkAddress(), TIMEOUT, 10000,
        "127.0.0.1", "8983", "solr", 0, 60000, true, new CurrentCoreDescriptorProvider() {
          
          @Override
          public List<CoreDescriptor> getCurrentDescriptors() {
            // do nothing
            return null;
          }
        });
    try {
      String configName = zkController.getZkStateReader().readConfigName(COLLECTION_NAME);
      assertEquals(configName, actualConfigName);
    } finally {
      zkController.close();
    }
  } finally {
    if (cc != null) {
      cc.shutdown();
    }
    server.shutdown();
  }

}
 
开发者ID:europeana,项目名称:search,代码行数:55,代码来源:ZkControllerTest.java

示例6: testReadConfigName

import org.apache.solr.common.cloud.SolrZkClient; //导入方法依赖的package包/类
@Test
public void testReadConfigName() throws Exception {
  String zkDir = dataDir.getAbsolutePath() + File.separator
      + "zookeeper/server1/data";
  CoreContainer cc = null;

  ZkTestServer server = new ZkTestServer(zkDir);
  try {
    server.run();

    AbstractZkTestCase.tryCleanSolrZkNode(server.getZkHost());
    AbstractZkTestCase.makeSolrZkNode(server.getZkHost());

    SolrZkClient zkClient = new SolrZkClient(server.getZkAddress(), TIMEOUT);
    String actualConfigName = "firstConfig";

    zkClient.makePath(ZkController.CONFIGS_ZKNODE + "/" + actualConfigName, true);
    
    Map<String,Object> props = new HashMap<String,Object>();
    props.put("configName", actualConfigName);
    ZkNodeProps zkProps = new ZkNodeProps(props);
    zkClient.makePath(ZkStateReader.COLLECTIONS_ZKNODE + "/"
        + COLLECTION_NAME, ZkStateReader.toJSON(zkProps),
        CreateMode.PERSISTENT, true);

    if (DEBUG) {
      zkClient.printLayoutToStdOut();
    }
    zkClient.close();
    
    cc = getCoreContainer();
    
    ZkController zkController = new ZkController(cc, server.getZkAddress(), TIMEOUT, 10000,
        "127.0.0.1", "8983", "solr", "0", 10000, 10000, new CurrentCoreDescriptorProvider() {
          
          @Override
          public List<CoreDescriptor> getCurrentDescriptors() {
            // do nothing
            return null;
          }
        });
    try {
      String configName = zkController.readConfigName(COLLECTION_NAME);
      assertEquals(configName, actualConfigName);
    } finally {
      zkController.close();
    }
  } finally {
    if (cc != null) {
      cc.shutdown();
    }
    server.shutdown();
  }

}
 
开发者ID:pkarmstr,项目名称:NYBC,代码行数:56,代码来源:ZkControllerTest.java


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