Github user felixcheung commented on the issue:

    https://github.com/apache/zeppelin/pull/2229
  
    actually, I wasn't referring to the function name at all. instead of having 
this fairly hive specific, how about a function like this to take the user name 
property name and value 
    
    ```
    // Untested!
     private void appendProxyUserToURL(StringBuilder connectionUrl, String 
user) {
         if ("true".equalsIgnoreCase(property.getProperty("jdbc.url.set.user") {
           Integer lastIndexOfUrl = connectionUrl.indexOf("?");
           if (lastIndexOfUrl == -1) {
             lastIndexOfUrl = connectionUrl.length();
           }
     
           if (user != null && !user.equals("anonymous") &&
               property.getProperty("jdbc.url.user.property").length() > 1)  { 
// check not empty or whitespace instead
             logger.info("Using jdbc user as :" + user);
             connectionUrl.insert(lastIndexOfUrl, ";" + 
property.getProperty("jdbc.url.user.property") + "=" + user + ";");
           }
         }
       }
    ```



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to