本文整理了Java中org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse.toString()
方法的一些代码示例,展示了ClusterHealthResponse.toString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ClusterHealthResponse.toString()
方法的具体详情如下:
包路径:org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse
类名称:ClusterHealthResponse
方法名:toString
暂无
代码示例来源:origin: stackoverflow.com
final Node node = NodeBuilder.nodeBuilder()
.settings(ImmutableSettings.builder().put("shield.enabled", false))
.local(true).node();
Client client = node.client();
ClusterHealthResponse response = client.admin().cluster().prepareHealth().get();
System.out.println(response.toString());
代码示例来源:origin: org.neolumin.vertexium/vertexium-elasticsearch-base
@SuppressWarnings("unused")
protected void createIndex(String indexName, boolean storeSourceData) throws IOException {
CreateIndexResponse createResponse = client.admin().indices().prepareCreate(indexName).execute().actionGet();
LOGGER.debug(createResponse.toString());
ClusterHealthResponse health = client.admin().cluster().prepareHealth(indexName)
.setWaitForGreenStatus()
.execute().actionGet();
LOGGER.debug("Index status: " + health.toString());
if (health.isTimedOut()) {
LOGGER.warn("timed out waiting for green index status, for index: " + indexName);
}
}
代码示例来源:origin: org.securegraph/securegraph-elasticsearch-base
@SuppressWarnings("unused")
protected void createIndex(String indexName, boolean storeSourceData) throws IOException {
CreateIndexResponse createResponse = client.admin().indices().prepareCreate(indexName).execute().actionGet();
LOGGER.debug(createResponse.toString());
ClusterHealthResponse health = client.admin().cluster().prepareHealth(indexName)
.setWaitForGreenStatus()
.execute().actionGet();
LOGGER.debug("Index status: " + health.toString());
if (health.isTimedOut()) {
LOGGER.warn("timed out waiting for green index status, for index: " + indexName);
}
}
代码示例来源:origin: lumifyio/securegraph
@SuppressWarnings("unused")
protected void createIndex(String indexName, boolean storeSourceData) throws IOException {
CreateIndexResponse createResponse = client.admin().indices().prepareCreate(indexName).execute().actionGet();
LOGGER.debug(createResponse.toString());
ClusterHealthResponse health = client.admin().cluster().prepareHealth(indexName)
.setWaitForGreenStatus()
.execute().actionGet();
LOGGER.debug("Index status: " + health.toString());
if (health.isTimedOut()) {
LOGGER.warn("timed out waiting for green index status, for index: " + indexName);
}
}
代码示例来源:origin: org.vertexium/vertexium-elasticsearch2
@SuppressWarnings("unused")
protected void createIndex(String indexName) throws IOException {
CreateIndexResponse createResponse = client.admin().indices().prepareCreate(indexName)
.setSettings(Settings.settingsBuilder()
.put("number_of_shards", getConfig().getNumberOfShards())
.put("number_of_replicas", getConfig().getNumberOfReplicas())
)
.execute().actionGet();
ClusterHealthResponse health = client.admin().cluster().prepareHealth(indexName)
.setWaitForGreenStatus()
.execute().actionGet();
LOGGER.debug("Index status: %s", health.toString());
if (health.isTimedOut()) {
LOGGER.warn("timed out waiting for yellow/green index status, for index: %s", indexName);
}
}
代码示例来源:origin: org.vertexium/vertexium-elasticsearch5
@SuppressWarnings("unused")
protected void createIndex(String indexName) throws IOException {
CreateIndexResponse createResponse = client.admin().indices().prepareCreate(indexName)
.setSettings(XContentFactory.jsonBuilder()
.startObject()
.startObject("analysis")
.startObject("normalizer")
.startObject(LOWERCASER_NORMALIZER_NAME)
.field("type", "custom")
.array("filter", "lowercase")
.endObject()
.endObject()
.endObject()
.field("number_of_shards", getConfig().getNumberOfShards())
.field("number_of_replicas", getConfig().getNumberOfReplicas())
.field("index.mapping.total_fields.limit", getConfig().getIndexMappingTotalFieldsLimit())
.field("refresh_interval", getConfig().getIndexRefreshInterval())
.endObject()
)
.execute().actionGet();
ClusterHealthResponse health = client.admin().cluster().prepareHealth(indexName)
.setWaitForGreenStatus()
.execute().actionGet();
LOGGER.debug("Index status: %s", health.toString());
if (health.isTimedOut()) {
LOGGER.warn("timed out waiting for yellow/green index status, for index: %s", indexName);
}
}
代码示例来源:origin: visallo/vertexium
@SuppressWarnings("unused")
protected void createIndex(String indexName) throws IOException {
CreateIndexResponse createResponse = client.admin().indices().prepareCreate(indexName)
.setSettings(XContentFactory.jsonBuilder()
.startObject()
.startObject("analysis")
.startObject("normalizer")
.startObject(LOWERCASER_NORMALIZER_NAME)
.field("type", "custom")
.array("filter", "lowercase")
.endObject()
.endObject()
.endObject()
.field("number_of_shards", getConfig().getNumberOfShards())
.field("number_of_replicas", getConfig().getNumberOfReplicas())
.field("index.mapping.total_fields.limit", getConfig().getIndexMappingTotalFieldsLimit())
.field("refresh_interval", getConfig().getIndexRefreshInterval())
.endObject()
)
.execute().actionGet();
ClusterHealthResponse health = client.admin().cluster().prepareHealth(indexName)
.setWaitForGreenStatus()
.execute().actionGet();
LOGGER.debug("Index status: %s", health.toString());
if (health.isTimedOut()) {
LOGGER.warn("timed out waiting for yellow/green index status, for index: %s", indexName);
}
}
代码示例来源:origin: org.vertexium/vertexium-elasticsearch-singledocument
@SuppressWarnings("unused")
protected void createIndex(String indexName) throws IOException {
CreateIndexResponse createResponse = client.admin().indices().prepareCreate(indexName)
.setSettings(ImmutableSettings.settingsBuilder()
.put("number_of_shards", getConfig().getNumberOfShards())
.put("number_of_replicas", getConfig().getNumberOfReplicas())
)
.execute().actionGet();
ClusterHealthResponse health = client.admin().cluster().prepareHealth(indexName)
.setWaitForGreenStatus()
.execute().actionGet();
LOGGER.debug("Index status: %s", health.toString());
if (health.isTimedOut()) {
LOGGER.warn("timed out waiting for green index status, for index: %s", indexName);
}
}
内容来源于网络,如有侵权,请联系作者删除!