• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java InternalSettingsPreparer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.elasticsearch.node.internal.InternalSettingsPreparer的典型用法代码示例。如果您正苦于以下问题:Java InternalSettingsPreparer类的具体用法?Java InternalSettingsPreparer怎么用?Java InternalSettingsPreparer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



InternalSettingsPreparer类属于org.elasticsearch.node.internal包,在下文中一共展示了InternalSettingsPreparer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:20,代码来源:PluginManagerCliParser.java


示例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();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:8,代码来源:CliTool.java


示例3: setup

import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入依赖的package包/类
private void setup(boolean addShutdownHook, Settings settings, Environment environment) throws Exception {
    initializeNatives(environment.tmpFile(),
                      settings.getAsBoolean("bootstrap.mlockall", false),
                      settings.getAsBoolean("bootstrap.seccomp", true),
                      settings.getAsBoolean("bootstrap.ctrlhandler", true));

    // initialize probes before the security manager is installed
    initializeProbes();

    if (addShutdownHook) {
        Runtime.getRuntime().addShutdownHook(new Thread() {
            @Override
            public void run() {
                if (node != null) {
                    node.close();
                }
            }
        });
    }

    // look for jar hell
    JarHell.checkJarHell();

    // install SM after natives, shutdown hooks, etc.
    setupSecurity(settings, environment);

    // We do not need to reload system properties here as we have already applied them in building the settings and
    // reloading could cause multiple prompts to the user for values if a system property was specified with a prompt
    // placeholder
    Settings nodeSettings = Settings.settingsBuilder()
            .put(settings)
            .put(InternalSettingsPreparer.IGNORE_SYSTEM_PROPERTIES_SETTING, true)
            .build();

    NodeBuilder nodeBuilder = NodeBuilder.nodeBuilder().settings(nodeSettings);
    node = nodeBuilder.build();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:38,代码来源:Bootstrap.java


示例4: 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)
  );
}
 
开发者ID:streamsets,项目名称:datacollector,代码行数:8,代码来源:ElasticsearchBaseIT.java


示例5: build

import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入依赖的package包/类
/**
 * Builds a new instance of the transport client.
 */
public TransportClient build() {
    Settings settings = InternalSettingsPreparer.prepareSettings(this.settings);
    settings = settingsBuilder()
            .put(NettyTransport.PING_SCHEDULE, "5s") // enable by default the transport schedule ping interval
            .put(settings)
            .put("network.server", false)
            .put("node.client", true)
            .put(CLIENT_TYPE_SETTING, CLIENT_TYPE)
            .build();

    PluginsService pluginsService = new PluginsService(settings, null, null, pluginClasses);
    this.settings = pluginsService.updatedSettings();

    Version version = Version.CURRENT;

    final ThreadPool threadPool = new ThreadPool(settings);
    NamedWriteableRegistry namedWriteableRegistry = new NamedWriteableRegistry();

    boolean success = false;
    try {
        ModulesBuilder modules = new ModulesBuilder();
        modules.add(new Version.Module(version));
        // plugin modules must be added here, before others or we can get crazy injection errors...
        for (Module pluginModule : pluginsService.nodeModules()) {
            modules.add(pluginModule);
        }
        modules.add(new PluginsModule(pluginsService));
        modules.add(new SettingsModule(this.settings));
        modules.add(new NetworkModule(namedWriteableRegistry));
        modules.add(new ClusterNameModule(this.settings));
        modules.add(new ThreadPoolModule(threadPool));
        modules.add(new TransportModule(this.settings, namedWriteableRegistry));
        modules.add(new SearchModule() {
            @Override
            protected void configure() {
                // noop
            }
        });
        modules.add(new ActionModule(true));
        modules.add(new ClientTransportModule());
        modules.add(new CircuitBreakerModule(this.settings));

        pluginsService.processModules(modules);

        Injector injector = modules.createInjector();
        final TransportService transportService = injector.getInstance(TransportService.class);
        transportService.start();
        transportService.acceptIncomingRequests();

        TransportClient transportClient = new TransportClient(injector);
        success = true;
        return transportClient;
    } finally {
        if (!success) {
            ThreadPool.terminate(threadPool, 10, TimeUnit.SECONDS);
        }
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:62,代码来源:TransportClient.java


示例6: 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);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:5,代码来源:Bootstrap.java


示例7: 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();
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:5,代码来源:ElasticTestNode.java


示例8: MockNode

import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入依赖的package包/类
public MockNode(Settings settings, Collection<Class<? extends Plugin>> classpathPlugins) {
    super(InternalSettingsPreparer.prepareEnvironment(settings, null), classpathPlugins);
}
 
开发者ID:jprante,项目名称:elasticsearch-analysis-hyphen,代码行数:4,代码来源:MockNode.java


示例9: PluginNode

import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入依赖的package包/类
public PluginNode(final Settings settings) {
  super(InternalSettingsPreparer.prepareEnvironment(settings, null), list);
}
 
开发者ID:apache,项目名称:beam,代码行数:4,代码来源:HIFIOWithElasticTest.java


示例10: 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);
}
 
开发者ID:jprante,项目名称:elasticsearch-client-http,代码行数:4,代码来源:MockNode.java


示例11: 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);
}
 
开发者ID:xushjie1987,项目名称:es-hadoop-v2.2.0,代码行数:4,代码来源:EsEmbeddedServer.java


示例12: PluginNode

import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入依赖的package包/类
public PluginNode(Settings settings) {
	super(InternalSettingsPreparer.prepareEnvironment(settings, null), Collections.<Class<? extends Plugin>>singletonList(Netty3Plugin.class));
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:4,代码来源:EmbeddedElasticsearchNodeEnvironmentImpl.java


示例13: 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);
}
 
开发者ID:gentics,项目名称:mesh,代码行数:4,代码来源:MeshNode.java


示例14: 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);
}
 
开发者ID:sonatype,项目名称:nexus-public,代码行数:4,代码来源:PluginUsingNode.java


示例15: 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);
}
 
开发者ID:petalmd,项目名称:armor,代码行数:4,代码来源:ArmorNode.java


示例16: 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);
}
 
开发者ID:codecentric,项目名称:elasticsearch-shield-kerberos-realm,代码行数:4,代码来源:PluginEnabledNode.java


示例17: 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));
}
 
开发者ID:spacedog-io,项目名称:spacedog-server,代码行数:6,代码来源:ElasticNode.java


示例18: MyNode

import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入依赖的package包/类
public MyNode(Settings preparedSettings, Collection<Class<? extends Plugin>> classpathPlugins) {
  super(InternalSettingsPreparer.prepareEnvironment(preparedSettings, null), classpathPlugins);
}
 
开发者ID:the-james-burton,项目名称:the-turbine,代码行数:4,代码来源:ElasticsearchNativeServiceImplTest.java


示例19: PluginAwareNode

import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入依赖的package包/类
public PluginAwareNode(final Settings preparedSettings, final Collection<Class<? extends Plugin>> classpathPlugins) {
    super(InternalSettingsPreparer.prepareEnvironment(preparedSettings, null), Version.CURRENT, classpathPlugins);
}
 
开发者ID:salyh,项目名称:elasticsearch-imap,代码行数:4,代码来源:PluginAwareNode.java


示例20: build

import org.elasticsearch.node.internal.InternalSettingsPreparer; //导入依赖的package包/类
public TransportClient build() {
    Settings settings = InternalSettingsPreparer.prepareSettings(this.settings);
    settings = settingsBuilder()
            .put("transport.ping.schedule", this.settings.get("ping.interval", "30s"))
            .put(settings)
            .put("network.server", false)
            .put("node.client", true)
            .put(CLIENT_TYPE_SETTING, CLIENT_TYPE)
            .build();
    PluginsService pluginsService = new PluginsService(settings, null, null, pluginClasses);
    this.settings = pluginsService.updatedSettings();
    Version version = Version.CURRENT;
    final ThreadPool threadPool = new ThreadPool(settings);
    final NamedWriteableRegistry namedWriteableRegistry = new NamedWriteableRegistry();

    boolean success = false;
    try {
        ModulesBuilder modules = new ModulesBuilder();
        modules.add(new Version.Module(version));
        // plugin modules must be added here, before others or we can get crazy injection errors...
        for (Module pluginModule : pluginsService.nodeModules()) {
            modules.add(pluginModule);
        }
        modules.add(new PluginsModule(pluginsService));
        modules.add(new SettingsModule(this.settings));
        modules.add(new NetworkModule(namedWriteableRegistry));
        modules.add(new ClusterNameModule(this.settings));
        modules.add(new ThreadPoolModule(threadPool));
        modules.add(new TransportModule(this.settings, namedWriteableRegistry));
        modules.add(new SearchModule() {
            @Override
            protected void configure() {
                // noop
            }
        });
        modules.add(new ActionModule(true));
        modules.add(new ClientTransportModule(hostFailedListener));
        modules.add(new CircuitBreakerModule(this.settings));
        pluginsService.processModules(modules);
        Injector injector = modules.createInjector();
        injector.getInstance(TransportService.class).start();
        TransportClient transportClient = new TransportClient(injector);
        success = true;
        return transportClient;
    } finally {
        if (!success) {
            ThreadPool.terminate(threadPool, 10, TimeUnit.SECONDS);
        }
    }
}
 
开发者ID:jprante,项目名称:elasticsearch-helper,代码行数:51,代码来源:TransportClient.java



注:本文中的org.elasticsearch.node.internal.InternalSettingsPreparer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ECPrivateKey类代码示例发布时间:2022-05-21
下一篇:
Java MaterialRippleLayout类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap