use of org.elasticsearch.transport.Netty4Plugin in project sonarqube by SonarSource.
the class EsTester method startNode.
private static Node startNode(Path tempDir, int httpPort) throws NodeValidationException {
Settings settings = Settings.builder().put(Environment.PATH_HOME_SETTING.getKey(), tempDir).put("node.name", "EsTester").put(NodeEnvironment.MAX_LOCAL_STORAGE_NODES_SETTING.getKey(), Integer.MAX_VALUE).put("logger.level", "INFO").put("action.auto_create_index", false).put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_LOW_DISK_WATERMARK_SETTING.getKey(), "1b").put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_HIGH_DISK_WATERMARK_SETTING.getKey(), "1b").put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_DISK_FLOOD_STAGE_WATERMARK_SETTING.getKey(), "1b").put(RecoverySettings.INDICES_RECOVERY_RETRY_DELAY_STATE_SYNC_SETTING.getKey(), TimeValue.timeValueMillis(20)).put(HttpTransportSettings.SETTING_HTTP_PORT.getKey(), httpPort).put(HttpTransportSettings.SETTING_HTTP_BIND_HOST.getKey(), "localhost").put(DiscoveryModule.DISCOVERY_TYPE_SETTING.getKey(), "single-node").build();
Node node = new Node(InternalSettingsPreparer.prepareEnvironment(settings, Collections.emptyMap(), null, null), ImmutableList.of(CommonAnalysisPlugin.class, // Netty4Plugin provides http and tcp transport
Netty4Plugin.class, // install ParentJoin plugin required to create field of type "join"
ParentJoinPlugin.class), true) {
};
return node.start();
}
Aggregations