You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@livy.apache.org by GitBox <gi...@apache.org> on 2020/02/04 22:34:36 UTC

[GitHub] [incubator-livy] squito commented on a change in pull request #275: [LIVY-745] Ensure that a single RSCClientFactory gets loaded.

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

 ##########
 File path: api/src/main/java/org/apache/livy/LivyClientBuilder.java
 ##########
 @@ -35,6 +37,19 @@
 
   public static final String LIVY_URI_KEY = "livy.uri";
 
+  private static final ServiceLoader<LivyClientFactory> CLIENT_FACTORY_LOADER =
+    ServiceLoader.load(LivyClientFactory.class, classLoader());
+
+  private static List<LivyClientFactory> getLivyClientFactories() {
+    List<LivyClientFactory> factories = new CopyOnWriteArrayList<>();
 
 Review comment:
   why does this need to be a copyonwriteArrayList?  here, you're touching it only from a single thread.  And it's not modified outside of this method.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services