[ 
https://issues.apache.org/jira/browse/METRON-939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16054057#comment-16054057
 ] 

ASF GitHub Bot commented on METRON-939:
---------------------------------------

Github user cestella commented on a diff in the pull request:

    https://github.com/apache/metron/pull/619#discussion_r122715927
  
    --- Diff: 
metron-platform/metron-elasticsearch/src/test/java/org/apache/metron/elasticsearch/integration/components/ElasticSearchComponent.java
 ---
    @@ -102,40 +103,57 @@ public void start() throws UnableToStartException {
                 throw new UnableToStartException("Unable to clean log or data 
directories", e);
             }
     
    -        Settings.Builder settingsBuilder = Settings.settingsBuilder()
    -                .put("node.http.enabled", true)
    -                .put("http.port", httpPort)
    +        Settings.Builder settingsBuilder = Settings.builder()
    +                .put("cluster.name", "metron")
                     .put("path.logs",logDir.getAbsolutePath())
                     .put("path.data",dataDir.getAbsolutePath())
                     .put("path.home", indexDir.getAbsoluteFile())
    -                .put("index.number_of_shards", 1)
    -                .put("node.mode", "network")
    -                .put("index.number_of_replicas", 1);
    +                .put("transport.type", "netty4");
    +
     
             if(extraElasticSearchSettings != null) {
     
                 settingsBuilder = 
settingsBuilder.put(extraElasticSearchSettings);
    -
             }
     
    -        node = 
NodeBuilder.nodeBuilder().settings(settingsBuilder).clusterName("metron").node();
    -        node.start();
    +        Collection plugins = Collections.singletonList(Netty4Plugin.class);
     
    +        node = new PluginConfigurableNode(settingsBuilder.build(), 
plugins);
             client = node.client();
     
    -        waitForCluster(client, ClusterHealthStatus.YELLOW, new 
TimeValue(60000));
    +        waitForCluster(node, ClusterHealthStatus.YELLOW, new 
TimeValue(60000));
     
         }
     
    -    public static void waitForCluster(ElasticsearchClient client, 
ClusterHealthStatus status, TimeValue timeout) throws UnableToStartException {
    +    private static class PluginConfigurableNode extends Node {
    +        PluginConfigurableNode(Settings settings, Collection<Class<? 
extends Plugin>> classpathPlugins) {
    +            super(InternalSettingsPreparer.prepareEnvironment(settings, 
null), classpathPlugins);
    +        }
    +    }
    +
    +    public static void waitForCluster(Node node, ClusterHealthStatus 
status, TimeValue timeout) throws UnableToStartException {
             try {
    +           node.start();
    +
                 ClusterHealthResponse healthResponse =
    -                    
(ClusterHealthResponse)client.execute(ClusterHealthAction.INSTANCE, new 
ClusterHealthRequest().waitForStatus(status).timeout(timeout)).actionGet();
    +                    (ClusterHealthResponse) 
node.client().execute(ClusterHealthAction.INSTANCE, new 
ClusterHealthRequest().waitForStatus(status).timeout(timeout)).actionGet();
                 if (healthResponse != null && healthResponse.isTimedOut()) {
                     throw new UnableToStartException("cluster state is " + 
healthResponse.getStatus().name()
                             + " and not " + status.name()
                             + ", from here on, everything will fail!");
                 }
    +
    +            byte[] indexTemplate = new byte[0];
    +            try {
    +                indexTemplate = 
Files.readAllBytes(Paths.get("/Users/wbekker/metron/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/files/yaf_index.template"));
    --- End diff --
    
    This path should be relative.


> Upgrade ElasticSearch and Kibana
> --------------------------------
>
>                 Key: METRON-939
>                 URL: https://issues.apache.org/jira/browse/METRON-939
>             Project: Metron
>          Issue Type: Improvement
>            Reporter: Jon Zeolla
>
> Upgrade ElasticSearch and Kibana (latest is 5.4 as of writing this).  Among 
> other benefits, this allows us to use periods in field names 
> (https://github.com/elastic/elasticsearch/pull/19937/files), which has been 
> available as of 5.0 and 2.4, and the ability to index an IPv6 address 
> properly 
> (https://www.elastic.co/blog/indexing-ipv6-addresses-in-elasticsearch).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to