本文整理汇总了Java中org.elasticsearch.node.internal.InternalSettingsPreparer.prepareEnvironment方法的典型用法代码示例。如果您正苦于以下问题:Java InternalSettingsPreparer.prepareEnvironment方法的具体用法?Java InternalSettingsPreparer.prepareEnvironment怎么用?Java InternalSettingsPreparer.prepareEnvironment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.elasticsearch.node.internal.InternalSettingsPreparer
的用法示例。
在下文中一共展示了InternalSettingsPreparer.prepareEnvironment方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入方法依赖的package包/类
public static void main(String[] args) {
// initialize default for es.logger.level because we will not read the logging.yml
String loggerLevel = System.getProperty("es.logger.level", "INFO");
// Set the appender for all potential log files to terminal so that other components that use the logger print out the
// same terminal.
// The reason for this is that the plugin cli cannot be configured with a file appender because when the plugin command is
// executed there is no way of knowing where the logfiles should be placed. For example, if elasticsearch
// is run as service then the logs should be at /var/log/elasticsearch but when started from the tar they should be at es.home/logs.
// Therefore we print to Terminal.
Environment env = InternalSettingsPreparer.prepareEnvironment(Settings.builder()
.put("appender.terminal.type", "terminal")
.put("rootLogger", "${es.logger.level}, terminal")
.put("es.logger.level", loggerLevel)
.build(), Terminal.DEFAULT);
// configure but do not read the logging conf file
LogConfigurator.configure(env.settings(), false);
int status = new PluginManagerCliParser().execute(args).status();
exit(status);
}
示例2: CliTool
import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入方法依赖的package包/类
protected CliTool(CliToolConfig config, Terminal terminal) {
Preconditions.checkArgument(config.cmds().size() != 0, "At least one command must be configured");
this.config = config;
this.terminal = terminal;
env = InternalSettingsPreparer.prepareEnvironment(EMPTY_SETTINGS, terminal);
settings = env.settings();
}
示例3: TestNode
import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入方法依赖的package包/类
TestNode(Settings settings) {
super(
InternalSettingsPreparer.prepareEnvironment(settings, null),
// To enable an http port in integration tests, the following plugin must be loaded.
Collections.singletonList(Netty4Plugin.class)
);
}
示例4: initialSettings
import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入方法依赖的package包/类
private static Environment initialSettings(boolean foreground) {
Terminal terminal = foreground ? Terminal.DEFAULT : null;
return InternalSettingsPreparer.prepareEnvironment(EMPTY_SETTINGS, terminal);
}
示例5: ElasticTestNode
import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入方法依赖的package包/类
public ElasticTestNode(Settings setting, Collection<Class<? extends Plugin>> pluginPaths) {
super(InternalSettingsPreparer.prepareEnvironment(setting, null), Version.CURRENT, pluginPaths);
this.start();
}
示例6: MockNode
import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入方法依赖的package包/类
public MockNode(Settings settings, Collection<Class<? extends Plugin>> classpathPlugins) {
super(InternalSettingsPreparer.prepareEnvironment(settings, null), classpathPlugins);
}
示例7: PluginNode
import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入方法依赖的package包/类
public PluginNode(final Settings settings) {
super(InternalSettingsPreparer.prepareEnvironment(settings, null), list);
}
示例8: MockNode
import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入方法依赖的package包/类
public MockNode(Settings settings, Collection<Class<? extends Plugin>> classpathPlugins) {
super(InternalSettingsPreparer.prepareEnvironment(settings, null), Version.CURRENT, classpathPlugins);
}
示例9: PluginConfigurableNode
import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入方法依赖的package包/类
public PluginConfigurableNode(Settings settings, Collection<Class<? extends Plugin>> classpathPlugins) {
super(InternalSettingsPreparer.prepareEnvironment(settings, null), Version.CURRENT, classpathPlugins);
}
示例10: PluginNode
import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入方法依赖的package包/类
public PluginNode(Settings settings) {
super(InternalSettingsPreparer.prepareEnvironment(settings, null), Collections.<Class<? extends Plugin>>singletonList(Netty3Plugin.class));
}
示例11: MeshNode
import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入方法依赖的package包/类
protected MeshNode(Settings settings, Collection<Class<? extends Plugin>> plugins) {
super(InternalSettingsPreparer.prepareEnvironment(settings, null), Version.CURRENT, plugins);
}
示例12: PluginUsingNode
import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入方法依赖的package包/类
public PluginUsingNode(final Settings preparedSettings, Collection<Class<? extends Plugin>> plugins) {
super(InternalSettingsPreparer.prepareEnvironment(preparedSettings, null), Version.CURRENT, plugins);
}
示例13: ArmorNode
import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入方法依赖的package包/类
public ArmorNode(Settings preparedSettings, Collection<Class<? extends Plugin>> plugins) {
super(InternalSettingsPreparer.prepareEnvironment(preparedSettings, null), Version.CURRENT, plugins);
}
示例14: PluginEnabledNode
import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入方法依赖的package包/类
public PluginEnabledNode(Settings preparedSettings, Collection<Class<? extends Plugin>> classpathPlugins) {
super(InternalSettingsPreparer.prepareEnvironment(preparedSettings, null), Version.CURRENT, classpathPlugins);
}
示例15: ElasticNode
import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入方法依赖的package包/类
@SafeVarargs
protected ElasticNode(Settings settings, Class<? extends Plugin>... plugins) {
super(InternalSettingsPreparer.prepareEnvironment(settings, null), //
Version.CURRENT, Arrays.asList(plugins));
}