007、zookeeper图形化的客户端工具简介
本文最后更新于 258 天前,其中的信息可能已经过时,如有错误请发送邮件到wuxianglongblog@163.com

zookeeper图形化的客户端工具简介

一.zookeeper图形化的客户端工具简介

    Zookeeper作为常用的集群协调者组件被广泛应用,尤其是在大数据生态圈中。

    Zookeeper集群存储各个节点信息,包括:Hadoop、Hbase、Storm、Kafka等。

    那如何查看Zookeeper中的数据呢,我们可以通过ZkCli.sh命令客户端查看,但是不太直观,因为ZK本身数据是以树型结构存储组织的。

    所以今天推荐一个实用的界面操作工具"ZooInspector"和"ZkWeb"工具。

二.windows系统的zookeeper可视化工具-ZooInspector

1.ZooInspector简介

    ZooInspector是一款在Java语言开发的zookeeper图形化的客户端。

    ZooInspector的下载地址:
        https://issues.apache.org/jira/secure/attachment/12436620/ZooInspector.zip

2.启动ZooInspector

    如下图所示,解压ZooInspector软件包后,进入"build"目录并运行"zookeeper-dev-ZooInspector.jar"该文件即可。
        D:\Softwares\linux\Kafka\softwares\ZooInspector>cd build

        D:\Softwares\linux\Kafka\softwares\ZooInspector\build>
        D:\Softwares\linux\Kafka\softwares\ZooInspector\build>dir
         驱动器 D 中的卷是 SSD
         卷的序列号是 720F-300D

         D:\Softwares\linux\Kafka\softwares\ZooInspector\build 的目录

        2010/02/22  19:52    <DIR>          .
        2010/02/22  19:52    <DIR>          ..
        2010/02/22  19:52    <DIR>          classes
        2010/02/22  19:52    <DIR>          config
        2010/02/22  19:52    <DIR>          icons
        2010/02/22  19:52    <DIR>          lib
        2010/02/22  19:52    <DIR>          licences
        2010/02/22  19:52    <DIR>          test
        2010/02/21  17:50            95,390 zookeeper-dev-ZooInspector.jar
                       1 个文件         95,390 字节
                       8 个目录 30,906,249,216 可用字节

        D:\Softwares\linux\Kafka\softwares\ZooInspector\build>
        D:\Softwares\linux\Kafka\softwares\ZooInspector\build>java -jar zookeeper-dev-ZooInspector.jar

3.使用ZooInspector连接zookeeper集群

    如下图所示,使用ZooInspector连接zookeeper集群。

4.使用ZooInspector连接zookeeper集群成功

    如下图所示,zookeeper集群连接成功啦~

5.使用ZooInspector访问zookeeper集群

    如下图所示,我们可以使用ZooInspector访问zookeeper集群,并可以用其管理节点哟~

三.ZkWeb管理zookeeper集群

1.下载zkWeb

    如下图所示,浏览器访问"https://github.com/zhitom/zkweb/releases",就可以下载zkWeb工具啦。

2.运行zkWeb服务

[root@kafka102.yinzhengjie.com ~]# java -jar zkWeb-v1.2.1.jar  # 如下图所示,浏览器访问当前主机的8099端口即可访问zkWeb服务啦!
17:27:03.031 [main] INFO com.yasenagat.zkweb.ZkWebSpringBootApplication - applicationYamlFileName(application-zkweb.yaml)=file:/root/zkWeb-v1.2.1.jar!/BOOT-INF/classes!/application-zkweb.ya
ml
  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.0.2.RELEASE)

[2021-04-30 17:27:04 INFO  main  StartupInfoLogger.java:50] c.y.zkweb.ZkWebSpringBootApplication --> Starting ZkWebSpringBootApplication vv1.2.1 on kafka102.yinzhengjie.com with PID 14963 (
/root/zkWeb-v1.2.1.jar started by root in /root)[2021-04-30 17:27:04 INFO  main  SpringApplication.java:663] c.y.zkweb.ZkWebSpringBootApplication --> The following profiles are active: local
[2021-04-30 17:27:04 INFO  main  AbstractApplicationContext.java:590] o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext --> Refreshing org.springframework.boot.web.servlet.cont
ext.AnnotationConfigServletWebServerApplicationContext@2812cbfa: startup date [Fri Apr 30 17:27:04 CST 2021]; root of context hierarchy[2021-04-30 17:27:04 INFO  main  DefaultListableBeanFactory.java:824] o.s.b.f.s.DefaultListableBeanFactory --> Overriding bean definition for bean 'requestMappingHandlerAdapter' with a diff
erent definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=zkSpringBootConfiguration; factoryMethodName=requestMappingHandlerAdapter; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/yasenagat/zkweb/util/ZkSpringBootConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration; factoryMethodName=requestMappingHandlerAdapter; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]][2021-04-30 17:27:05 INFO  main  TomcatWebServer.java:91] o.s.b.w.e.tomcat.TomcatWebServer --> Tomcat initialized with port(s): 8099 (http)
[2021-04-30 17:27:05 INFO  main  DirectJDKLog.java:180] o.a.coyote.http11.Http11NioProtocol --> Initializing ProtocolHandler ["http-nio-8099"]
[2021-04-30 17:27:05 INFO  main  DirectJDKLog.java:180] o.a.catalina.core.StandardService --> Starting service [Tomcat]
[2021-04-30 17:27:05 INFO  main  DirectJDKLog.java:180] o.a.catalina.core.StandardEngine --> Starting Servlet Engine: Apache Tomcat/8.5.31
[2021-04-30 17:27:05 INFO  localhost-startStop-1  DirectJDKLog.java:180] o.a.c.core.AprLifecycleListener --> The APR based Apache Tomcat Native library which allows optimal performance in p
roduction environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib][2021-04-30 17:27:05 INFO  localhost-startStop-1  DirectJDKLog.java:180] o.a.c.c.C.[Tomcat].[localhost].[/] --> Initializing Spring embedded WebApplicationContext
[2021-04-30 17:27:05 INFO  localhost-startStop-1  ServletWebServerApplicationContext.java:285] o.s.web.context.ContextLoader --> Root WebApplicationContext: initialization completed in 1636
 ms[2021-04-30 17:27:05 INFO  localhost-startStop-1  ServletRegistrationBean.java:185] o.s.b.w.s.ServletRegistrationBean --> Servlet dispatcherServlet mapped to [/]
[2021-04-30 17:27:05 INFO  localhost-startStop-1  ServletRegistrationBean.java:185] o.s.b.w.s.ServletRegistrationBean --> Servlet webServlet mapped to [/console/*]
[2021-04-30 17:27:05 INFO  localhost-startStop-1  ServletRegistrationBean.java:185] o.s.b.w.s.ServletRegistrationBean --> Servlet cacheServlet mapped to [/cache/*]
[2021-04-30 17:27:05 INFO  localhost-startStop-1  AbstractFilterRegistrationBean.java:244] o.s.b.w.s.FilterRegistrationBean --> Mapping filter: 'characterEncodingFilter' to: [/*]
[2021-04-30 17:27:05 INFO  localhost-startStop-1  AbstractFilterRegistrationBean.java:244] o.s.b.w.s.FilterRegistrationBean --> Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
[2021-04-30 17:27:05 INFO  localhost-startStop-1  AbstractFilterRegistrationBean.java:244] o.s.b.w.s.FilterRegistrationBean --> Mapping filter: 'httpPutFormContentFilter' to: [/*]
[2021-04-30 17:27:05 INFO  localhost-startStop-1  AbstractFilterRegistrationBean.java:244] o.s.b.w.s.FilterRegistrationBean --> Mapping filter: 'requestContextFilter' to: [/*]
[2021-04-30 17:27:06 INFO  MLog-Init-Reporter  Slf4jMLog.java:212] com.mchange.v2.log.MLog --> MLog clients using slf4j logging.
[2021-04-30 17:27:06 INFO  main  Slf4jMLog.java:212] com.mchange.v2.c3p0.C3P0Registry --> Initializing c3p0-0.9.5.4 [built 23-March-2019 23:00:48 -0700; debug? true; trace: 10]
[2021-04-30 17:27:06 INFO  main  Slf4jMLog.java:212] c.m.v.c.i.AbstractPoolBackedDataSource --> Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, 
acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> 1bxv3omah9gna0h1ammcp3|13e39c73, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> org.h2.Driver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1bxv3omah9gna0h1ammcp3|13e39c73, idleConnectionTestPeriod -> 60, initialPoolSize -> 10, jdbcUrl -> jdbc:h2:file:~/.h2/zkweb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=TRUE;FILE_LOCK=SOCKET, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 60, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 20, maxStatements -> 100, maxStatementsPerConnection -> 0, minPoolSize -> 5, numHelperThreads -> 3, preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ][2021-04-30 17:27:06 INFO  main  ZkCache.java:41] com.yasenagat.zkweb.util.ZkCache --> zk info size=0
[2021-04-30 17:27:06 INFO  main  ZkCfgManagerImpl.java:436] c.y.zkweb.util.ZkCfgManagerImpl -->  afterPropertiesSet init 0 zk instance
[2021-04-30 17:27:06 INFO  main  RequestMappingHandlerAdapter.java:574] o.s.w.s.m.m.a.RequestMappingHandlerAdapter --> Looking for @ControllerAdvice: org.springframework.boot.web.servlet.co
ntext.AnnotationConfigServletWebServerApplicationContext@2812cbfa: startup date [Fri Apr 30 17:27:04 CST 2021]; root of context hierarchy[2021-04-30 17:27:06 INFO  main  AbstractUrlHandlerMapping.java:373] o.s.w.s.h.SimpleUrlHandlerMapping --> Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.
web.servlet.resource.ResourceHttpRequestHandler][2021-04-30 17:27:06 INFO  main  AbstractHandlerMethodMapping.java:547] o.s.w.s.m.m.a.RequestMappingHandlerMapping --> Mapped "{[/zkcfg/queryZkCfgById]}" onto public java.util.Map<java.lang
.String, java.lang.Object> com.yasenagat.zkweb.web.ZkCfgController.queryZkCfg(java.lang.String)[2021-04-30 17:27:06 INFO  main  AbstractHandlerMethodMapping.java:547] o.s.w.s.m.m.a.RequestMappingHandlerMapping --> Mapped "{[/zkcfg/queryZkCfg]}" onto public java.util.Map<java.lang.Str
ing, java.lang.Object> com.yasenagat.zkweb.web.ZkCfgController.queryZkCfg(int,int,java.lang.String)[2021-04-30 17:27:06 INFO  main  AbstractHandlerMethodMapping.java:547] o.s.w.s.m.m.a.RequestMappingHandlerMapping --> Mapped "{[/zkcfg/addZkCfg],produces=[text/html;charset=UTF-8]}" onto p
ublic java.lang.String com.yasenagat.zkweb.web.ZkCfgController.addZkCfg(java.lang.String,java.lang.String,java.lang.String)[2021-04-30 17:27:06 INFO  main  AbstractHandlerMethodMapping.java:547] o.s.w.s.m.m.a.RequestMappingHandlerMapping --> Mapped "{[/zkcfg/updateZkCfg],produces=[text/html;charset=UTF-8]}" ont
o public java.lang.String com.yasenagat.zkweb.web.ZkCfgController.updateZkCfg(java.lang.String,java.lang.String,java.lang.String,java.lang.String)[2021-04-30 17:27:06 INFO  main  AbstractHandlerMethodMapping.java:547] o.s.w.s.m.m.a.RequestMappingHandlerMapping --> Mapped "{[/zkcfg/delZkCfg],produces=[text/html;charset=UTF-8]}" onto p
ublic java.lang.String com.yasenagat.zkweb.web.ZkCfgController.delZkCfg(java.lang.String)[2021-04-30 17:27:06 INFO  main  AbstractHandlerMethodMapping.java:547] o.s.w.s.m.m.a.RequestMappingHandlerMapping --> Mapped "{[/zk/queryZnodeInfo],produces=[text/html;charset=UTF-8]}" ont
o public java.lang.String com.yasenagat.zkweb.web.ZkController.queryzNodeInfo(java.lang.String,org.springframework.ui.Model,java.lang.String)[2021-04-30 17:27:06 INFO  main  AbstractHandlerMethodMapping.java:547] o.s.w.s.m.m.a.RequestMappingHandlerMapping --> Mapped "{[/zk/queryZKOk]}" onto public java.lang.String com.yasenagat.
zkweb.web.ZkController.queryZKOk(org.springframework.ui.Model,java.lang.String)[2021-04-30 17:27:06 INFO  main  AbstractHandlerMethodMapping.java:547] o.s.w.s.m.m.a.RequestMappingHandlerMapping --> Mapped "{[/zk/queryZKJMXInfo],produces=[application/json;charset=UTF-8
]}" onto public java.util.List<com.yasenagat.zkweb.util.ZkManager$PropertyPanel> com.yasenagat.zkweb.web.ZkController.queryZKJMXInfo(java.lang.String,java.lang.String,javax.servlet.http.HttpServletResponse)[2021-04-30 17:27:06 INFO  main  AbstractHandlerMethodMapping.java:547] o.s.w.s.m.m.a.RequestMappingHandlerMapping --> Mapped "{[/zk/saveData],produces=[text/html;charset=UTF-8]}" onto publ
ic java.lang.String com.yasenagat.zkweb.web.ZkController.saveData(java.lang.String,java.lang.String,java.lang.String)[2021-04-30 17:27:06 INFO  main  AbstractHandlerMethodMapping.java:547] o.s.w.s.m.m.a.RequestMappingHandlerMapping --> Mapped "{[/zk/createNode],produces=[text/html;charset=UTF-8]}" onto pu
blic java.lang.String com.yasenagat.zkweb.web.ZkController.createNode(java.lang.String,java.lang.String,java.lang.String)[2021-04-30 17:27:06 INFO  main  AbstractHandlerMethodMapping.java:547] o.s.w.s.m.m.a.RequestMappingHandlerMapping --> Mapped "{[/zk/deleteNode],produces=[text/html;charset=UTF-8]}" onto pu
blic java.lang.String com.yasenagat.zkweb.web.ZkController.deleteNode(java.lang.String,java.lang.String)[2021-04-30 17:27:06 INFO  main  AbstractHandlerMethodMapping.java:547] o.s.w.s.m.m.a.RequestMappingHandlerMapping --> Mapped "{[/zk/queryZnode]}" onto public java.util.List<com.yasenagat.z
kweb.model.Tree> com.yasenagat.zkweb.web.ZkController.query(java.lang.String,java.lang.String,java.lang.String)[2021-04-30 17:27:06 INFO  main  AbstractHandlerMethodMapping.java:547] o.s.w.s.m.m.a.RequestMappingHandlerMapping --> Mapped "{[/error],produces=[text/html]}" onto public org.springframewo
rk.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)[2021-04-30 17:27:06 INFO  main  AbstractHandlerMethodMapping.java:547] o.s.w.s.m.m.a.RequestMappingHandlerMapping --> Mapped "{[/error]}" onto public org.springframework.http.ResponseEntit
y<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)[2021-04-30 17:27:06 INFO  main  AbstractUrlHandlerMapping.java:360] o.s.w.s.h.SimpleUrlHandlerMapping --> Root mapping to handler of type [class org.springframework.web.servlet.mvc.Paramet
erizableViewController][2021-04-30 17:27:06 INFO  main  AbstractUrlHandlerMapping.java:373] o.s.w.s.h.SimpleUrlHandlerMapping --> Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.
servlet.resource.ResourceHttpRequestHandler][2021-04-30 17:27:06 INFO  main  AbstractUrlHandlerMapping.java:373] o.s.w.s.h.SimpleUrlHandlerMapping --> Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.
resource.ResourceHttpRequestHandler][2021-04-30 17:27:06 INFO  main  AbstractUrlHandlerMapping.java:373] o.s.w.s.h.SimpleUrlHandlerMapping --> Mapped URL path [/resources/**] onto handler of type [class org.springframework.we
b.servlet.resource.ResourceHttpRequestHandler][2021-04-30 17:27:07 INFO  main  MBeanExporter.java:433] o.s.j.e.a.AnnotationMBeanExporter --> Registering beans for JMX exposure on startup
[2021-04-30 17:27:07 INFO  main  DirectJDKLog.java:180] o.a.coyote.http11.Http11NioProtocol --> Starting ProtocolHandler ["http-nio-8099"]
[2021-04-30 17:27:07 INFO  main  DirectJDKLog.java:180] o.a.tomcat.util.net.NioSelectorPool --> Using a shared selector for servlet write/read
[2021-04-30 17:27:07 INFO  main  DirectJDKLog.java:180] o.a.c.c.C.[Tomcat].[localhost].[/] --> Initializing Spring FrameworkServlet 'dispatcherServlet'
[2021-04-30 17:27:07 INFO  main  FrameworkServlet.java:494] o.s.web.servlet.DispatcherServlet --> FrameworkServlet 'dispatcherServlet': initialization started
[2021-04-30 17:27:07 INFO  main  FrameworkServlet.java:509] o.s.web.servlet.DispatcherServlet --> FrameworkServlet 'dispatcherServlet': initialization completed in 13 ms
[2021-04-30 17:27:07 INFO  main  TomcatWebServer.java:206] o.s.b.w.e.tomcat.TomcatWebServer --> Tomcat started on port(s): 8099 (http) with context path ''
[2021-04-30 17:27:07 INFO  main  StartupInfoLogger.java:59] c.y.zkweb.ZkWebSpringBootApplication --> Started ZkWebSpringBootApplication in 4.12 seconds (JVM running for 4.554)

3.ZkWeb管理zookeeper集群

    如下图所示,我们可以使用ZkWeb管理zookeeper集群。
谨此笔记,记录过往。凭君阅览,如能收益,莫大奢望。
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇