You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@crail.apache.org by GitBox <gi...@apache.org> on 2019/03/08 08:33:17 UTC

[GitHub] [incubator-crail] PepperJo commented on a change in pull request #72: Allow namenode as parameter instead of conf file.

PepperJo commented on a change in pull request #72: Allow namenode as parameter instead of conf file.
URL: https://github.com/apache/incubator-crail/pull/72#discussion_r263700220
 
 

 ##########
 File path: client/src/main/java/org/apache/crail/conf/CrailConfiguration.java
 ##########
 @@ -39,6 +39,17 @@ public CrailConfiguration() throws IOException {
 		mergeProperties(properties);
 	}
 
+  // This constructor is useful, when a client does
+  // not have access to a file system, but only needs the configuration
+  // of the namenode address. As an example, an OpenWHisk function
+  // does not have a filesystem associated and therefore cannot
+  // read the namenode address from any configuration file.
+  public CrailConfiguration(String nameNodeAddress) throws IOException {
+    conf = new ConcurrentHashMap<>();
+    conf.put("crail.namenode.address", nameNodeAddress);
 
 Review comment:
   Why not instead make a constructor which creates an empty configuration? and the client can then set all the configuration parameters to its liking?

----------------------------------------------------------------
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