You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sdap.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/06/11 18:30:00 UTC

[jira] [Commented] (SDAP-72) Fix bugs in ESDriver.java

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

ASF GitHub Bot commented on SDAP-72:
------------------------------------

lewismc closed pull request #17: SDAP-72
URL: https://github.com/apache/incubator-sdap-mudrod/pull/17
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/core/src/main/java/org/apache/sdap/mudrod/driver/ESDriver.java b/core/src/main/java/org/apache/sdap/mudrod/driver/ESDriver.java
index 6a751f2..a058faa 100644
--- a/core/src/main/java/org/apache/sdap/mudrod/driver/ESDriver.java
+++ b/core/src/main/java/org/apache/sdap/mudrod/driver/ESDriver.java
@@ -133,6 +133,7 @@ public void destroyBulkProcessor() {
       refreshIndex();
     } catch (InterruptedException e) {
       LOG.error("Error destroying the Bulk Processor.", e);
+      Thread.currentThread().interrupt();
     }
   }
 
@@ -473,12 +474,11 @@ protected Client makeClient(Properties props) throws IOException {
 
     Client client = null;
 
-    // Prefer TransportClient
-    if (hosts != null && port > 1) {
+    if (hosts != null && port > 1) {  
       TransportClient transportClient = new ESTransportClient(settings);
       for (String host : hosts)
         transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(host), port));
-      client = transportClient;
+      return transportClient;
     } else if (clusterName != null) {
       node = new Node(settings);
       client = node.client();


 

----------------------------------------------------------------
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:
users@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)