Dan Burkert has posted comments on this change. Change subject: Statically cache kudu connections This avoids connection leak issues when running large spark jobs ......................................................................
Patch Set 1: (2 comments) http://gerrit.cloudera.org:8080/#/c/3115/1/java/kudu-spark/src/main/scala/org/kududb/spark/kudu/ConnectionCache.scala File java/kudu-spark/src/main/scala/org/kududb/spark/kudu/ConnectionCache.scala: Line 7: object ConnectionCache { Is it possible to put this functionality in a KuduConnection object and make the methods private? I think it would be better not to expose these publicly (at least for now). Line 17: syncCache.computeIfAbsent(kuduMaster, kuduMaker) Unfortunately this API is Java 8+, and we are trying to keep compatibility with JRE 7 for now. A good alternative that is Java 7 compatible is the Guava LoadingCache class. -- To view, visit http://gerrit.cloudera.org:8080/3115 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie560db5a9967597a800607446a7a5387cf3133ba Gerrit-PatchSet: 1 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Brent Gardner <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-HasComments: Yes
