/** * 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; }
@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; }
Builder settings = Settings.settingsBuilder() .put("cluster.name", DEFAULT_CLUSTER_NAME) .put("node.local", Boolean.toString(!remoteMode))
context.getProperty(PROP_SSL_CONTEXT_SERVICE).asControllerService(SSLContextService.class); Settings.Builder settingsBuilder = Settings.settingsBuilder() .put("cluster.name", clusterName) .put("client.transport.ping_timeout", pingTimeout)
/** * 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(); }
@BeforeClass public static void setUpBeforeClass() throws Exception { Builder builder = Settings.settingsBuilder(); builder.put("path.home", "target/data"); node = new NodeBuilder().settings(builder).node(); }
@BeforeClass public static void setUpBeforeClass() throws Exception { Builder builder = Settings.settingsBuilder(); builder.put("path.home", "target/data"); node = new NodeBuilder().settings(builder).node(); }
@BeforeClass public static void setUpBeforeClass() throws Exception { Builder builder = Settings.settingsBuilder(); builder.put("path.home", "target/data"); node = new NodeBuilder().settings(builder).node(); }
@BeforeClass public static void setUpBeforeClass() throws Exception { Builder builder = Settings.settingsBuilder(); builder.put("path.home", "target/data"); node = new NodeBuilder().settings(builder).node(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
@Before public void setup() throws Exception { if (!checkIfServerRunning()) { Builder builder = Settings.settingsBuilder(); builder.put("path.home", "target/data"); node = new NodeBuilder().settings(builder).node(); } }
/** * 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(); } }
/** * 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(); } }
/** * 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(); } }
/** * 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(); } }
@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(); }
@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(); }
@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(); }