• bigdata_zookeeper 可视化界面zkui


    安装zkui

            zookeeper节点的可视化界面有很多种,我使用的是zkui,比较直观,而且可以导入文件,他的Git地址:                     https://github.com/DeemOpen/zkui。

    使用

            1、 从github上可以下载下来,maven clean install成jar,运行zkui-2.0-SNAPSHOT.jar 或者直接在编译器中运行main函数,启动jetty插件。

            2、配置文件config.cfg  zookeeper相关配置如下 

    [html] view plain copy
     
     print?
    1. #Server Port  
    2. serverPort=9090  
    3. #Comma seperated list of all the zookeeper servers  
    4. zkServer=127.0.0.1:2181,127.0.0.1:2182,127.0.0.1:2183  
    5. #Http path of the repository. Ignore if you dont intent to upload files from repository.  
    6. scmRepo=http://myserver.com/@rev1=  
    7. #Path appended to the repo url. Ignore if you dont intent to upload files from repository.  
    8. scmRepoPath=//appconfig.txt  
    9. #if set to true then userSet is used for authentication, else ldap authentication is used.  
    10. ldapAuth=false  
    11. ldapDomain=mycompany,mydomain  
    12. #ldap authentication url. Ignore if using file based authentication.  
    13. ldapUrl=ldap://<ldap_host>:<ldap_port>/dc=mycom,dc=com  
    14. #Specific roles for ldap authenticated users. Ignore if using file based authentication.  
    15. ldapRoleSet={"users": [{ "username":"domain\user1" , "role": "ADMIN" }]}  
    16. userSet = {"users": [{ "username":"admin" , "password":"123456","role": "ADMIN" },{ "username":"appconfig" , "password":"appconfig","role": "USER" }]}  
    17. #Set to prod in production and dev in local. Setting to dev will clear history each time.  
    18. env=prod  
    19. jdbcClass=org.h2.Driver  
    20. jdbcUrl=jdbc:h2:zkui  
    21. jdbcUser=root  
    22. jdbcPwd=manager  
    23. #If you want to use mysql db to store history then comment the h2 db section.  
    24. #jdbcClass=com.mysql.jdbc.Driver  
    25. #jdbcUrl=jdbc:mysql://localhost:3306/zkui  
    26. #jdbcUser=root  
    27. #jdbcPwd=manager  
    28. loginMessage=Please login using admin/manager or appconfig/appconfig.  
    29. #session timeout 5 mins/300 secs.  
    30. sessionTimeout=300  
    31. #Default 5 seconds to keep short lived zk sessions. If you have large data then the read will take more than 30 seconds so increase this accordingly.   
    32. #A bigger zkSessionTimeout means the connection will be held longer and resource consumption will be high.  
    33. zkSessionTimeout=5  
    34. #Block PWD exposure over rest call.  
    35. blockPwdOverRest=false  
    36. #ignore rest of the props below if https=false.  
    37. https=false  
    38. keystoreFile=/home/user/keystore.jks  
    39. keystorePwd=password  
    40. keystoreManagerPwd=password  
    41. # The default ACL to use for all creation of nodes. If left blank, then all nodes will be universally accessible  
    42. # Permissions are based on single character flags: c (Create), r (read), w (write), d (delete), a (admin), * (all)  
    43. # For example defaultAcl={"acls": [{"scheme":"ip", "id":"192.168.1.192", "perms":"*"}, {"scheme":"ip", id":"192.168.1.0/24", "perms":"r"}]  
    44. defaultAcl=  


            serverPort访问zk ui的端口号,默认是9090,zkServer zookeeper集群节点,userSet:用户名角色及其密码设置,在这里设置的admin密码为123456。

            3、在linxu中启动jar,或者是在自己本地的编译器中启动main函数,输入localhost:9090,zookeeer中相关配置的节点就可以在可视化界面中看到。界面如下

            下一篇,Java操作zookeeper,添加删除节点

            欢迎指教~

     

    转载: http://blog.csdn.net/lovesummerforever/article/details/48997797

  • 相关阅读:
    Python2 升级Python3
    'builtin_function_or_method' object has no attribute 'translate'
    antd-mobile的DatePicker分钟精度半小时
    Windows10远程报错:由于CredSSP加密Oracle修正
    Nginx配置
    MySQL之索引优化
    Ubuntu下删除VMware的方法
    控制窗体的显示和隐藏
    os模块
    树莓派 使用3.5耳机口输出音频
  • 原文地址:https://www.cnblogs.com/cphmvp/p/6402444.html
Copyright © 2020-2023  润新知