[ https://issues.apache.org/jira/browse/SDAP-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16480030#comment-16480030 ]
ASF GitHub Bot commented on SDAP-72: ------------------------------------ quintinali commented on issue #17: SDAP-72 URL: https://github.com/apache/incubator-sdap-mudrod/pull/17#issuecomment-390074295 @lewismc Yes, I still have issues with the try-with-resources. If I create ESTransportClient using try-with-resources as follow, an error occurs. ` if (hosts != null && port > 1) { try (TransportClient transportClient = new ESTransportClient(settings)) { for (String host : hosts){ transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(host), port)); } client = transportClient; } } else if (clusterName != null) { node = new Node(settings); client = node.client(); } ` 2018-05-17 22:17:02,276 ERROR main.MudrodEngine (MudrodEngine.java:main(398)) - Error whilst parsing command line. java.lang.IllegalStateException: transport client is closed at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:240) at org.elasticsearch.client.transport.TransportProxyClient.execute(TransportProxyClient.java:59) at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:356) at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:403) at org.elasticsearch.client.support.AbstractClient$IndicesAdmin.execute(AbstractClient.java:1226) at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:80) at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:54) at org.apache.sdap.mudrod.driver.ESDriver.putMapping(ESDriver.java:142) at org.apache.sdap.mudrod.discoveryengine.MudrodAbstract.initMudrod(MudrodAbstract.java:84) at org.apache.sdap.mudrod.discoveryengine.MudrodAbstract.<init>(MudrodAbstract.java:56) at org.apache.sdap.mudrod.discoveryengine.DiscoveryEngineAbstract.<init>(DiscoveryEngineAbstract.java:29) at org.apache.sdap.mudrod.discoveryengine.WeblogDiscoveryEngine.<init>(WeblogDiscoveryEngine.java:50) at org.apache.sdap.mudrod.main.MudrodEngine.startFullIngest(MudrodEngine.java:242) at org.apache.sdap.mudrod.main.MudrodEngine.main(MudrodEngine.java:388) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Fix bugs in ESDriver.java > ------------------------- > > Key: SDAP-72 > URL: https://issues.apache.org/jira/browse/SDAP-72 > Project: Apache Science Data Analytics Platform > Issue Type: Bug > Components: mudrod > Reporter: Yun Li > Priority: Major > Fix For: 0.1 > > > Solve MUDROD bugs found by sonar coverage @[~lewismc] -- This message was sent by Atlassian JIRA (v7.6.3#76005)