/** * Main entry point for starting elasticsearch */ public static void main(final String[] args) throws Exception { overrideDnsCachePolicyProperties(); /* * We want the JVM to think there is a security manager installed so that if internal policy decisions that would be based on the * presence of a security manager or lack thereof act as if there is a security manager present (e.g., DNS cache policy). This * forces such policies to take effect immediately. */ System.setSecurityManager(new SecurityManager() { @Override public void checkPermission(Permission perm) { // grant all permissions so that we can later set the security manager to the one that we want } }); LogConfigurator.registerErrorListener(); final Elasticsearch elasticsearch = new Elasticsearch(); int status = main(args, elasticsearch, Terminal.DEFAULT); if (status != ExitCodes.OK) { exit(status); } }
/** * Main entry point for starting elasticsearch */ public static void main(final String[] args) throws Exception { // we want the JVM to think there is a security manager installed so that if internal policy decisions that would be based on the // presence of a security manager or lack thereof act as if there is a security manager present (e.g., DNS cache policy) System.setSecurityManager(new SecurityManager() { @Override public void checkPermission(Permission perm) { // grant all permissions so that we can later set the security manager to the one that we want } }); LogConfigurator.registerErrorListener(); final Elasticsearch elasticsearch = new Elasticsearch(); int status = main(args, elasticsearch, Terminal.DEFAULT); if (status != ExitCodes.OK) { exit(status); } }
/** * Main entry point for starting elasticsearch */ public static void main(final String[] args) throws Exception { // we want the JVM to think there is a security manager installed so that if internal policy decisions that would be based on the // presence of a security manager or lack thereof act as if there is a security manager present (e.g., DNS cache policy) System.setSecurityManager(new SecurityManager() { @Override public void checkPermission(Permission perm) { // grant all permissions so that we can later set the security manager to the one that we want } }); LogConfigurator.registerErrorListener(); final Elasticsearch elasticsearch = new Elasticsearch(); int status = main(args, elasticsearch, Terminal.DEFAULT); if (status != ExitCodes.OK) { exit(status); } }
/** * Main entry point for starting elasticsearch */ public static void main(final String[] args) throws Exception { // we want the JVM to think there is a security manager installed so that if internal policy decisions that would be based on the // presence of a security manager or lack thereof act as if there is a security manager present (e.g., DNS cache policy) System.setSecurityManager(new SecurityManager() { @Override public void checkPermission(Permission perm) { // grant all permissions so that we can later set the security manager to the one that we want } }); LogConfigurator.registerErrorListener(); final Elasticsearch elasticsearch = new Elasticsearch(); int status = main(args, elasticsearch, Terminal.DEFAULT); if (status != ExitCodes.OK) { exit(status); } }
@Override protected void before() throws Throwable { File tempDir = new File(System.getProperty("java.io.tmpdir")); File basePath = new File(tempDir, "vertexium-test-" + UUID.randomUUID().toString()); LOGGER.info("base path: %s", basePath); File vertexiumPluginDir = new File(basePath, "plugins/vertexium"); vertexiumPluginDir.mkdirs(); expandVertexiumPlugin(vertexiumPluginDir); LogConfigurator.registerErrorListener(); runner = new ElasticsearchClusterRunner(); runner.onBuild((i, builder) -> builder.put("script.inline", "true") .put("cluster.name", clusterName) .put("http.type", "netty3") .put("transport.type", "netty3") ).build(newConfigs().basePath(basePath.getAbsolutePath()).numOfNode(1)); runner.ensureGreen(); }
final Environment environment = new Environment(settings, confPath); if (!disableESLogger) { LogConfigurator.registerErrorListener(); LogConfigurator.configure(environment);