Alexey Serbin has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/23415 )

Change subject: KUDU-3698 fix NPE in TableLocationsCache.get() in kudu-client
......................................................................

KUDU-3698 fix NPE in TableLocationsCache.get() in kudu-client

It might happen that the special table location entry for Kudu master
is absent in the cache, but the code since [1] doesn't check for null
before calling isStale() on the item returned from the cache.  This
results in a NPE in Kudu Java client.

This patch addresses the issue.  This is a follow-up to [1].

[1] https://github.com/apache/kudu/commit/a50aa5bfd

Change-Id: Ic1bf9001eb88e85c2d9913b804d3f223ab022cdc
Reviewed-on: http://gerrit.cloudera.org:8080/22958
Reviewed-by: Abhishek Chennaka <[email protected]>
Tested-by: Alexey Serbin <[email protected]>
(cherry picked from commit adc8f2f84e5b909a1e8bcb030a34139b21bda94c)
Reviewed-on: http://gerrit.cloudera.org:8080/23415
---
M java/kudu-client/src/main/java/org/apache/kudu/client/TableLocationsCache.java
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Abhishek Chennaka: Looks good to me, approved
  Alexey Serbin: Verified

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

Gerrit-Project: kudu
Gerrit-Branch: branch-1.18.x
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic1bf9001eb88e85c2d9913b804d3f223ab022cdc
Gerrit-Change-Number: 23415
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <[email protected]>

Reply via email to