You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Grant Henke (Code Review)" <ge...@cloudera.org> on 2018/05/06 18:08:21 UTC

[kudu-CR] KUDU-2403: Fix FakeDNS to work in Java 9+

Grant Henke has uploaded this change for review. ( http://gerrit.cloudera.org:8080/10321


Change subject: KUDU-2403: Fix FakeDNS to work in Java 9+
......................................................................

KUDU-2403: Fix FakeDNS to work in Java 9+

This fixes the FakeDNS implimentation in Java 9+ by
first trying to use reflection to replace the internal
java.net.InetAddress$NameService implimentation (Java 9 or later)
with our own. If the java.net.InetAddress$NameService field
doesn’t exist, we add our NameService
implimentation to the java.net.InetAddress$NameServices
field (Java 8 or earlier).

All Java versions have the same NamService interface.
The main difference is the field names and class location.
That allows us to use the same Implimentation to replace
the default NameService in all versions.

Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
---
M java/kudu-client/src/test/java/org/apache/kudu/client/FakeDNS.java
1 file changed, 41 insertions(+), 14 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/21/10321/1
-- 
To view, visit http://gerrit.cloudera.org:8080/10321
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
Gerrit-Change-Number: 10321
Gerrit-PatchSet: 1
Gerrit-Owner: Grant Henke <gr...@apache.org>

[kudu-CR] KUDU-2403: Fix FakeDNS to work in Java 9+

Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Grant Henke has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/10321 )

Change subject: KUDU-2403: Fix FakeDNS to work in Java 9+
......................................................................

KUDU-2403: Fix FakeDNS to work in Java 9+

This fixes the FakeDNS implementation in Java 9+ by
first trying to use reflection to replace the internal
java.net.InetAddress$NameService implementation (Java 9 or later)
with our own. If the java.net.InetAddress$NameService field
doesn’t exist, we add our NameService
implementation to the java.net.InetAddress$NameServices
field (Java 8 or earlier).

All Java versions have the same NameService interface.
The main difference is the field names and class location.
That allows us to use the same implementation to replace
the default NameService in all versions.

Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
Reviewed-on: http://gerrit.cloudera.org:8080/10321
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Tested-by: Grant Henke <gr...@apache.org>
---
M java/gradle/tests.gradle
M java/kudu-client/src/test/java/org/apache/kudu/client/FakeDNS.java
2 files changed, 98 insertions(+), 17 deletions(-)

Approvals:
  Adar Dembo: Looks good to me, approved
  Grant Henke: Verified

-- 
To view, visit http://gerrit.cloudera.org:8080/10321
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
Gerrit-Change-Number: 10321
Gerrit-PatchSet: 10
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-2403: Fix FakeDNS to work in Java 9+

Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Grant Henke has posted comments on this change. ( http://gerrit.cloudera.org:8080/10321 )

Change subject: KUDU-2403: Fix FakeDNS to work in Java 9+
......................................................................


Patch Set 7:

(7 comments)

http://gerrit.cloudera.org:8080/#/c/10321/4//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/10321/4//COMMIT_MSG@11
PS4, Line 11: implementation
> implementation
Done


http://gerrit.cloudera.org:8080/#/c/10321/4//COMMIT_MSG@14
PS4, Line 14: implementation
> same
Done


http://gerrit.cloudera.org:8080/#/c/10321/4//COMMIT_MSG@17
PS4, Line 17: NameServic
> NameService
Done


http://gerrit.cloudera.org:8080/#/c/10321/4//COMMIT_MSG@19
PS4, Line 19: implementation
> same
Done


http://gerrit.cloudera.org:8080/#/c/10321/4/java/gradle/tests.gradle
File java/gradle/tests.gradle:

http://gerrit.cloudera.org:8080/#/c/10321/4/java/gradle/tests.gradle@39
PS4, Line 39:   if (JavaVersion.current().isJava9Compatible()) {
> Could you reformat this a bit to reduce the duplication? Like, maybe a list
Done


http://gerrit.cloudera.org:8080/#/c/10321/7/java/kudu-client/src/test/java/org/apache/kudu/client/FakeDNS.java
File java/kudu-client/src/test/java/org/apache/kudu/client/FakeDNS.java:

http://gerrit.cloudera.org:8080/#/c/10321/7/java/kudu-client/src/test/java/org/apache/kudu/client/FakeDNS.java@145
PS7, Line 145: } catch (Exception e) {
             :         throw new UnknownHostException(e.getMessage());
> wouldn't 'e' usually be an InvocationTargetException here, and then we woul
The exceptions that could be thrown are NoSuchMethodException,  IllegalAccessException, or InvocationTargetException. InvocationTargetException is likely to be the only one actually thrown unless some future java version breaks things. 

I think your suggested approach is a better way of handling this. I will also change this to only catch ReflectiveOperationException's given that covers all the expected exceptions.


http://gerrit.cloudera.org:8080/#/c/10321/7/java/kudu-client/src/test/java/org/apache/kudu/client/FakeDNS.java@170
PS7, Line 170:         throw new UnknownHostException(e.getMessage());
> same
Done



-- 
To view, visit http://gerrit.cloudera.org:8080/10321
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
Gerrit-Change-Number: 10321
Gerrit-PatchSet: 7
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Mon, 07 May 2018 18:55:45 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2403: Fix FakeDNS to work in Java 9+

Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Adar Dembo, Todd Lipcon, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/10321

to look at the new patch set (#5).

Change subject: KUDU-2403: Fix FakeDNS to work in Java 9+
......................................................................

KUDU-2403: Fix FakeDNS to work in Java 9+

This fixes the FakeDNS implementation in Java 9+ by
first trying to use reflection to replace the internal
java.net.InetAddress$NameService implimentation (Java 9 or later)
with our own. If the java.net.InetAddress$NameService field
doesn’t exist, we add our NameService
implementation to the java.net.InetAddress$NameServices
field (Java 8 or earlier).

All Java versions have the same NameService interface.
The main difference is the field names and class location.
That allows us to use the same implementation to replace
the default NameService in all versions.

Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
---
M java/gradle/tests.gradle
M java/kudu-client/src/test/java/org/apache/kudu/client/FakeDNS.java
2 files changed, 97 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/21/10321/5
-- 
To view, visit http://gerrit.cloudera.org:8080/10321
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
Gerrit-Change-Number: 10321
Gerrit-PatchSet: 5
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-2403: Fix FakeDNS to work in Java 9+

Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Grant Henke has removed a vote on this change.

Change subject: KUDU-2403: Fix FakeDNS to work in Java 9+
......................................................................


Removed Verified-1 by Kudu Jenkins (120)
-- 
To view, visit http://gerrit.cloudera.org:8080/10321
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
Gerrit-Change-Number: 10321
Gerrit-PatchSet: 9
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-2403: Fix FakeDNS to work in Java 9+

Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/10321

to look at the new patch set (#3).

Change subject: KUDU-2403: Fix FakeDNS to work in Java 9+
......................................................................

KUDU-2403: Fix FakeDNS to work in Java 9+

This fixes the FakeDNS implimentation in Java 9+ by
first trying to use reflection to replace the internal
java.net.InetAddress$NameService implimentation (Java 9 or later)
with our own. If the java.net.InetAddress$NameService field
doesn’t exist, we add our NameService
implimentation to the java.net.InetAddress$NameServices
field (Java 8 or earlier).

All Java versions have the same NamService interface.
The main difference is the field names and class location.
That allows us to use the same Implimentation to replace
the default NameService in all versions.

Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
---
M java/gradle/tests.gradle
M java/kudu-client/src/test/java/org/apache/kudu/client/FakeDNS.java
2 files changed, 89 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/21/10321/3
-- 
To view, visit http://gerrit.cloudera.org:8080/10321
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
Gerrit-Change-Number: 10321
Gerrit-PatchSet: 3
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins

[kudu-CR] KUDU-2403: Fix FakeDNS to work in Java 9+

Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/10321

to look at the new patch set (#2).

Change subject: KUDU-2403: Fix FakeDNS to work in Java 9+
......................................................................

KUDU-2403: Fix FakeDNS to work in Java 9+

This fixes the FakeDNS implimentation in Java 9+ by
first trying to use reflection to replace the internal
java.net.InetAddress$NameService implimentation (Java 9 or later)
with our own. If the java.net.InetAddress$NameService field
doesn’t exist, we add our NameService
implimentation to the java.net.InetAddress$NameServices
field (Java 8 or earlier).

All Java versions have the same NamService interface.
The main difference is the field names and class location.
That allows us to use the same Implimentation to replace
the default NameService in all versions.

Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
---
M java/kudu-client/src/test/java/org/apache/kudu/client/FakeDNS.java
1 file changed, 41 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/21/10321/2
-- 
To view, visit http://gerrit.cloudera.org:8080/10321
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
Gerrit-Change-Number: 10321
Gerrit-PatchSet: 2
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins

[kudu-CR] KUDU-2403: Fix FakeDNS to work in Java 9+

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/10321 )

Change subject: KUDU-2403: Fix FakeDNS to work in Java 9+
......................................................................


Patch Set 7:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/10321/7/java/kudu-client/src/test/java/org/apache/kudu/client/FakeDNS.java
File java/kudu-client/src/test/java/org/apache/kudu/client/FakeDNS.java:

http://gerrit.cloudera.org:8080/#/c/10321/7/java/kudu-client/src/test/java/org/apache/kudu/client/FakeDNS.java@145
PS7, Line 145: } catch (Exception e) {
             :         throw new UnknownHostException(e.getMessage());
wouldn't 'e' usually be an InvocationTargetException here, and then we would want to do something like:

Throwables.propagateIfPossible(e.getCause(), UnknownHostException.class);
throw new AssertionError("unexpected reflection issue", e);


http://gerrit.cloudera.org:8080/#/c/10321/7/java/kudu-client/src/test/java/org/apache/kudu/client/FakeDNS.java@170
PS7, Line 170:         throw new UnknownHostException(e.getMessage());
same



-- 
To view, visit http://gerrit.cloudera.org:8080/10321
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
Gerrit-Change-Number: 10321
Gerrit-PatchSet: 7
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Mon, 07 May 2018 17:23:56 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2403: Fix FakeDNS to work in Java 9+

Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Adar Dembo, Todd Lipcon, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/10321

to look at the new patch set (#9).

Change subject: KUDU-2403: Fix FakeDNS to work in Java 9+
......................................................................

KUDU-2403: Fix FakeDNS to work in Java 9+

This fixes the FakeDNS implementation in Java 9+ by
first trying to use reflection to replace the internal
java.net.InetAddress$NameService implementation (Java 9 or later)
with our own. If the java.net.InetAddress$NameService field
doesn’t exist, we add our NameService
implementation to the java.net.InetAddress$NameServices
field (Java 8 or earlier).

All Java versions have the same NameService interface.
The main difference is the field names and class location.
That allows us to use the same implementation to replace
the default NameService in all versions.

Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
---
M java/gradle/tests.gradle
M java/kudu-client/src/test/java/org/apache/kudu/client/FakeDNS.java
2 files changed, 98 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/21/10321/9
-- 
To view, visit http://gerrit.cloudera.org:8080/10321
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
Gerrit-Change-Number: 10321
Gerrit-PatchSet: 9
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-2403: Fix FakeDNS to work in Java 9+

Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Grant Henke has posted comments on this change. ( http://gerrit.cloudera.org:8080/10321 )

Change subject: KUDU-2403: Fix FakeDNS to work in Java 9+
......................................................................


Patch Set 9: Verified+1


-- 
To view, visit http://gerrit.cloudera.org:8080/10321
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
Gerrit-Change-Number: 10321
Gerrit-PatchSet: 9
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Mon, 07 May 2018 20:24:46 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-2403: Fix FakeDNS to work in Java 9+

Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Adar Dembo, Todd Lipcon, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/10321

to look at the new patch set (#8).

Change subject: KUDU-2403: Fix FakeDNS to work in Java 9+
......................................................................

KUDU-2403: Fix FakeDNS to work in Java 9+

This fixes the FakeDNS implementation in Java 9+ by
first trying to use reflection to replace the internal
java.net.InetAddress$NameService implementation (Java 9 or later)
with our own. If the java.net.InetAddress$NameService field
doesn’t exist, we add our NameService
implementation to the java.net.InetAddress$NameServices
field (Java 8 or earlier).

All Java versions have the same NameService interface.
The main difference is the field names and class location.
That allows us to use the same implementation to replace
the default NameService in all versions.

Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
---
M java/gradle/tests.gradle
M java/kudu-client/src/test/java/org/apache/kudu/client/FakeDNS.java
2 files changed, 97 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/21/10321/8
-- 
To view, visit http://gerrit.cloudera.org:8080/10321
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
Gerrit-Change-Number: 10321
Gerrit-PatchSet: 8
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-2403: Fix FakeDNS to work in Java 9+

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/10321 )

Change subject: KUDU-2403: Fix FakeDNS to work in Java 9+
......................................................................


Patch Set 9: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/10321
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
Gerrit-Change-Number: 10321
Gerrit-PatchSet: 9
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Mon, 07 May 2018 19:53:20 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-2403: Fix FakeDNS to work in Java 9+

Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/10321

to look at the new patch set (#4).

Change subject: KUDU-2403: Fix FakeDNS to work in Java 9+
......................................................................

KUDU-2403: Fix FakeDNS to work in Java 9+

This fixes the FakeDNS implimentation in Java 9+ by
first trying to use reflection to replace the internal
java.net.InetAddress$NameService implimentation (Java 9 or later)
with our own. If the java.net.InetAddress$NameService field
doesn’t exist, we add our NameService
implimentation to the java.net.InetAddress$NameServices
field (Java 8 or earlier).

All Java versions have the same NamService interface.
The main difference is the field names and class location.
That allows us to use the same Implimentation to replace
the default NameService in all versions.

Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
---
M java/gradle/tests.gradle
M java/kudu-client/src/test/java/org/apache/kudu/client/FakeDNS.java
2 files changed, 98 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/21/10321/4
-- 
To view, visit http://gerrit.cloudera.org:8080/10321
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
Gerrit-Change-Number: 10321
Gerrit-PatchSet: 4
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins

[kudu-CR] KUDU-2403: Fix FakeDNS to work in Java 9+

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/10321 )

Change subject: KUDU-2403: Fix FakeDNS to work in Java 9+
......................................................................


Patch Set 4:

(5 comments)

http://gerrit.cloudera.org:8080/#/c/10321/4//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/10321/4//COMMIT_MSG@11
PS4, Line 11: implimentation
implementation


http://gerrit.cloudera.org:8080/#/c/10321/4//COMMIT_MSG@14
PS4, Line 14: implimentation
same


http://gerrit.cloudera.org:8080/#/c/10321/4//COMMIT_MSG@17
PS4, Line 17: NamService
NameService


http://gerrit.cloudera.org:8080/#/c/10321/4//COMMIT_MSG@19
PS4, Line 19: Implimentation
same


http://gerrit.cloudera.org:8080/#/c/10321/4/java/gradle/tests.gradle
File java/gradle/tests.gradle:

http://gerrit.cloudera.org:8080/#/c/10321/4/java/gradle/tests.gradle@39
PS4, Line 39:   if (JavaVersion.current().isJava9Compatible()) {
Could you reformat this a bit to reduce the duplication? Like, maybe a list of module/packages that is iterated over?



-- 
To view, visit http://gerrit.cloudera.org:8080/10321
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
Gerrit-Change-Number: 10321
Gerrit-PatchSet: 4
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Mon, 07 May 2018 15:47:49 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2403: Fix FakeDNS to work in Java 9+

Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Adar Dembo, Todd Lipcon, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/10321

to look at the new patch set (#6).

Change subject: KUDU-2403: Fix FakeDNS to work in Java 9+
......................................................................

KUDU-2403: Fix FakeDNS to work in Java 9+

This fixes the FakeDNS implementation in Java 9+ by
first trying to use reflection to replace the internal
java.net.InetAddress$NameService implementation (Java 9 or later)
with our own. If the java.net.InetAddress$NameService field
doesn’t exist, we add our NameService
implementation to the java.net.InetAddress$NameServices
field (Java 8 or earlier).

All Java versions have the same NameService interface.
The main difference is the field names and class location.
That allows us to use the same implementation to replace
the default NameService in all versions.

Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
---
M java/gradle/tests.gradle
M java/kudu-client/src/test/java/org/apache/kudu/client/FakeDNS.java
2 files changed, 97 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/21/10321/6
-- 
To view, visit http://gerrit.cloudera.org:8080/10321
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I319f42b6b878531325d6a48ce6ccdcc9b40fe2bc
Gerrit-Change-Number: 10321
Gerrit-PatchSet: 6
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>