本文整理了Java中org.elasticsearch.common.settings.Settings.settingsBuilder()
方法的一些代码示例,展示了Settings.settingsBuilder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Settings.settingsBuilder()
方法的具体详情如下:
包路径:org.elasticsearch.common.settings.Settings
类名称:Settings
方法名:settingsBuilder
[英]Returns a builder to be used in order to build settings.
[中]返回用于生成设置的生成器。
代码示例来源:origin: apache/storm
/**
* Starts an ElasticSearch node.
* @return the started node.
*/
public static Node startEsNode() {
Node node = NodeBuilder.nodeBuilder().data(true).settings(
Settings.settingsBuilder()
.put(ClusterName.SETTING, EsConstants.CLUSTER_NAME)
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
.put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0)
.put(EsExecutors.PROCESSORS, 1)
.put("http.enabled", true)
.put("index.percolator.map_unmapped_fields_as_string",
true)
.put("index.store.type", "mmapfs")
.put("path.home", "./data")
).build();
node.start();
return node;
}
代码示例来源:origin: apache/flink
@Override
public TransportClient createClient(Map<String, String> clientConfig) {
Settings settings = Settings.settingsBuilder().put(clientConfig).build();
TransportClient transportClient = TransportClient.builder().settings(settings).build();
for (TransportAddress address : ElasticsearchUtils.convertInetSocketAddresses(transportAddresses)) {
transportClient.addTransportAddress(address);
}
// verify that we actually are connected to a cluster
if (transportClient.connectedNodes().isEmpty()) {
// close the transportClient here
IOUtils.closeQuietly(transportClient);
throw new RuntimeException("Elasticsearch client is not connected to any Elasticsearch nodes!");
}
if (LOG.isInfoEnabled()) {
LOG.info("Created Elasticsearch TransportClient with connected nodes {}", transportClient.connectedNodes());
}
return transportClient;
}
代码示例来源:origin: brianfrankcooper/YCSB
Builder settings = Settings.settingsBuilder()
.put("cluster.name", DEFAULT_CLUSTER_NAME)
.put("node.local", Boolean.toString(!remoteMode))
代码示例来源:origin: apache/nifi
context.getProperty(PROP_SSL_CONTEXT_SERVICE).asControllerService(SSLContextService.class);
Settings.Builder settingsBuilder = Settings.settingsBuilder()
.put("cluster.name", clusterName)
.put("client.transport.ping_timeout", pingTimeout)
代码示例来源:origin: Impetus/Kundera
/**
* Sets the up before class.
*
* @throws Exception
* the exception
*/
@BeforeClass
public static void setUpBeforeClass() throws Exception {
Builder builder = Settings.settingsBuilder();
builder.put("path.home", "target/data");
node = new NodeBuilder().settings(builder).node();
}
代码示例来源:origin: Impetus/Kundera
@BeforeClass
public static void setUpBeforeClass() throws Exception
{
Builder builder = Settings.settingsBuilder();
builder.put("path.home", "target/data");
node = new NodeBuilder().settings(builder).node();
}
代码示例来源:origin: Impetus/Kundera
@BeforeClass
public static void setUpBeforeClass() throws Exception
{
Builder builder = Settings.settingsBuilder();
builder.put("path.home", "target/data");
node = new NodeBuilder().settings(builder).node();
}
代码示例来源:origin: Impetus/Kundera
@BeforeClass
public static void setUpBeforeClass() throws Exception
{
Builder builder = Settings.settingsBuilder();
builder.put("path.home", "target/data");
node = new NodeBuilder().settings(builder).node();
}
代码示例来源:origin: Impetus/Kundera
@BeforeClass
public static void setUpBeforeClass() throws Exception
{
Builder builder = Settings.settingsBuilder();
builder.put("path.home", "target/data");
node = new NodeBuilder().settings(builder).node();
}
代码示例来源:origin: Impetus/Kundera
/**
* Sets the up before class.
*
* @throws Exception
* the exception
*/
@BeforeClass
public static void setUpBeforeClass() throws Exception
{
Builder builder = Settings.settingsBuilder();
builder.put("path.home", "target/data");
node = new NodeBuilder().settings(builder).node();
}
代码示例来源:origin: Impetus/Kundera
/**
* Sets the up before class.
*
* @throws Exception
* the exception
*/
@BeforeClass
public static void setUpBeforeClass() throws Exception
{
Builder builder = Settings.settingsBuilder();
builder.put("path.home", "target/data");
node = new NodeBuilder().settings(builder).node();
}
代码示例来源:origin: Impetus/Kundera
/**
* Sets the up before class.
*
* @throws Exception
* the exception
*/
@BeforeClass
public static void setUpBeforeClass() throws Exception
{
Builder builder = Settings.settingsBuilder();
builder.put("path.home", "target/data");
node = new NodeBuilder().settings(builder).node();
}
代码示例来源:origin: Impetus/Kundera
@Before
public void setup() throws Exception
{
if (!checkIfServerRunning())
{
Builder builder = Settings.settingsBuilder();
builder.put("path.home", "target/data");
node = new NodeBuilder().settings(builder).node();
}
}
代码示例来源:origin: Impetus/Kundera
/**
* Sets the up before class.
*
* @throws Exception
* the exception
*/
@BeforeClass
public static void setUpBeforeClass() throws Exception {
if (!checkIfServerRunning()) {
Builder builder = Settings.settingsBuilder();
builder.put("path.home", "target/data");
node = new NodeBuilder().settings(builder).node();
}
}
代码示例来源:origin: Impetus/Kundera
/**
* Sets the up before class.
*
* @throws Exception
* the exception
*/
@BeforeClass
public static void setUpBeforeClass() throws Exception
{
if (!checkIfServerRunning())
{
Builder builder = Settings.settingsBuilder();
builder.put("path.home", "target/data");
node = new NodeBuilder().settings(builder).node();
}
}
代码示例来源:origin: Impetus/Kundera
/**
* Before class setup.
*
* @throws Exception
* the exception
*/
@BeforeClass
public static void setUpBeforeClass() throws Exception
{
if (!checkIfServerRunning())
{
Builder builder = Settings.settingsBuilder();
builder.put("path.home", "target/data");
node = new NodeBuilder().settings(builder).node();
}
}
代码示例来源:origin: Impetus/Kundera
/**
* Sets the up before class.
*
* @throws Exception
* the exception
*/
@BeforeClass
public static void setUpBeforeClass() throws Exception
{
if (!checkIfServerRunning())
{
Builder builder = Settings.settingsBuilder();
builder.put("path.home", "target/data");
node = new NodeBuilder().settings(builder).node();
}
}
代码示例来源:origin: Impetus/Kundera
@Before
public void setUp() throws Exception
{
if (!checkIfServerRunning())
{
Builder builder = Settings.settingsBuilder();
builder.put("path.home", "target/data");
node = new NodeBuilder().settings(builder).node();
}
_PU = "es-pu";
setUpInternal();
}
代码示例来源:origin: Impetus/Kundera
@Before
public void setup() throws Exception
{
if (!checkIfServerRunning())
{
Builder builder = Settings.settingsBuilder();
builder.put("path.home", "target/data");
node = new NodeBuilder().settings(builder).node();
}
emf = getEntityManagerFactory();
}
代码示例来源:origin: Impetus/Kundera
@Before
public void setup()
{
if (!checkIfServerRunning())
{
Builder builder = Settings.settingsBuilder();
builder.put("path.home", "target/data");
node = new NodeBuilder().settings(builder).node();
}
persistenceUnit = "esMappedSuperClass-pu";
setupInternal();
}
内容来源于网络,如有侵权,请联系作者删除!