rlevas commented on a change in pull request #62: KNOX-474 - Added Kerberos 
related configuration validation at gateway startup time
URL: https://github.com/apache/knox/pull/62#discussion_r262271888
 
 

 ##########
 File path: 
gateway-server/src/main/java/org/apache/knox/gateway/config/impl/GatewayConfigImpl.java
 ##########
 @@ -235,8 +238,35 @@
       "NAMENODE", "JOBTRACKER", "WEBHDFS", "WEBHCAT",
       "OOZIE", "WEBHBASE", "HIVE", "RESOURCEMANAGER");
 
-  public GatewayConfigImpl() {
+  public GatewayConfigImpl() throws GatewayConfigurationException {
     init();
+    validate();
+  }
+
+  private void validate() throws GatewayConfigurationException {
 
 Review comment:
   It seems like this would be better done right before it is used.  Like in 
`org.apache.knox.gateway.GatewayServer#configureKerberosSecurity`.  I guess for 
code reuse, this might be ok. However, the KnoxCLI will unnecessarily fail if 
all is not setup properly for the Gateway.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to