mgaido91 commented on a change in pull request #275: [LIVY-745] Ensure that a 
single LivyClientFactory gets loaded.
URL: https://github.com/apache/incubator-livy/pull/275#discussion_r371453472
 
 

 ##########
 File path: api/src/main/java/org/apache/livy/LivyClientBuilder.java
 ##########
 @@ -118,24 +121,21 @@ public LivyClient build() {
     }
 
     LivyClient client = null;
-    ServiceLoader<LivyClientFactory> loader = 
ServiceLoader.load(LivyClientFactory.class,
-      classLoader());
-    if (!loader.iterator().hasNext()) {
-      throw new IllegalStateException("No LivyClientFactory implementation was 
found.");
 
 Review comment:
   I think we can also do this only once when the `ServiceLoader` is created. 
But I do see value in keeping the behavior consistent so that a user who faced 
this issue once, knows what to do facing it again.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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


With regards,
Apache Git Services

Reply via email to