You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/12/08 09:32:09 UTC

[GitHub] [dolphinscheduler] wangbowen1024 opened a new issue #7268: [Bug] [commom] hive zookeeper url only support one hosts

wangbowen1024 opened a new issue #7268:
URL: https://github.com/apache/dolphinscheduler/issues/7268


   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### What happened
   
   ![image](https://user-images.githubusercontent.com/48642743/145181755-d25953d5-8ece-4b69-a732-be5039329481.png)
   
   
   ### What you expected to happen
   
   ![image](https://user-images.githubusercontent.com/48642743/145181942-e7ed5b78-f418-446e-ac89-c8e01b914688.png)
   
   
   ### How to reproduce
   
   when i use url with multi zookeeper hosts like (jdbc:hive2://xxx.master:2181,xxx.slave01:2181,xxx.slave02:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2) is not supported
   
   i find hosts check in this code:
   ```java
    public abstract class AbstractDatasourceProcessor implements DatasourceProcessor {
   
       private static final Pattern IPV4_PATTERN = Pattern.compile("^[a-zA-Z0-9\\_\\-\\.]+$");
   
       private static final Pattern IPV6_PATTERN = Pattern.compile("^[a-zA-Z0-9\\_\\-\\.\\:\\[\\]]+$");
   
       // other code ......
   
       /**
        * Check the host is valid
        *
        * @param host datasource host
        */
       protected void checkHost(String host) {
           if (!IPV4_PATTERN.matcher(host).matches() || !IPV6_PATTERN.matcher(host).matches()) {
               throw new IllegalArgumentException("datasource host illegal");
           }
       }
       // other code ......
   }
   ```
   
   and then i solve it, like this:
   ```java
   public class HiveDatasourceProcessor extends AbstractDatasourceProcessor {
       // other code ......
   
       @Override
       public void checkDatasourceParam(BaseDataSourceParamDTO baseDataSourceParamDTO) {
           String[] hosts = baseDataSourceParamDTO.getHost().split(Constants.COMMA);
           for (String host : hosts) {
               checkHost(host);
           }
           checkDatasourcePatter(baseDataSourceParamDTO.getDatabase());
           checkOther(baseDataSourceParamDTO.getOther());
       }
   }
   ```
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   2.0.0
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


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

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [dolphinscheduler] wangbowen1024 commented on issue #7268: [Bug] [commom] hive zookeeper url only support one hosts

Posted by GitBox <gi...@apache.org>.
wangbowen1024 commented on issue #7268:
URL: https://github.com/apache/dolphinscheduler/issues/7268#issuecomment-997192862


   it slove in 2.0.1


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

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [dolphinscheduler] wangbowen1024 closed issue #7268: [Bug] [commom] hive zookeeper url only support one hosts

Posted by GitBox <gi...@apache.org>.
wangbowen1024 closed issue #7268:
URL: https://github.com/apache/dolphinscheduler/issues/7268


   


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

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #7268: [Bug] [commom] hive zookeeper url only support one hosts

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #7268:
URL: https://github.com/apache/dolphinscheduler/issues/7268#issuecomment-988645672


   Hi:
   * Thank you for your feedback, we have received your issue, Please wait patiently for a reply.
   * In order for us to understand your request as soon as possible, please provide detailed information、version or pictures.
   * If you haven't received a reply for a long time, you can subscribe to the developer's email,Mail subscription steps reference https://dolphinscheduler.apache.org/en-us/community/development/subscribe.html ,Then write the issue URL in the email content and send question to dev@dolphinscheduler.apache.org.


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

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org