当前位置: 首页 > news >正文

微墨小程序制作平台百度优化

微墨小程序制作平台,百度优化,建站软件可以不通过网络建设吗,模板网站制作1、zkCli的常用命令操作 (1)Help (2)ls 使用 ls 命令来查看当前znode中所包含的内容 (3)ls2查看当前节点数据并能看到更新次数等数据 (4)stat查看节点状态 (5&#xf…

1、zkCli的常用命令操作

(1)Help
在这里插入图片描述

(2)ls 使用 ls 命令来查看当前znode中所包含的内容
(3)ls2查看当前节点数据并能看到更新次数等数据
(4)stat查看节点状态
(5)set
1)设置节点的具体值
2)set 节点 value值 set /test atguigu
(6)get
1)获得节点的值
2)get 节点
(7)create
1)普通创建 create /test demo001
2)-s含有序列
3)-e 临时
(8)delete 删除无子节点的目录
(9)rmr 递归删除

2 四字命令

2.1 是什么?

zookeeper支持某些特定的四字命令,他们大多是用来查询ZK服务的当前状态及相关信息的。
通过telnet或nc向zookeeper提交相应命令,如:echo ruok | nc 127.0.0.1 2181
运行公式:echo 四字命令 | nc 主机IP zookeeper端口

2.2 常用命令

ruok:测试服务是否处于正确状态。如果确实如此,那么服务返回“imok ”,否则不做任何相应
stat:输出关于性能和连接的客户端的列表
conf:输出相关服务配置的详细信息
cons:列出所有连接到服务器的客户端的完全的连接 /会话的详细信息。包括“接受 / 发送”的包数量、会话id 、操作延迟、最后的操作执行等等信息
dump:列出未经处理的会话和临时节点
envi:输出关于服务环境的详细信息(区别于conf命令)
reqs:列出未经处理的请求
wchs:列出服务器watch的详细信息
wchc:通过session列出服务器watch的详细信息,它的输出是一个与watch相关的会话的列表
wchp:通过路径列出服务器 watch的详细信息。它输出一个与 session相关的路径

3、Java客户端操作

3.1 创建项目

创建一个maven 项目zk-demo
在这里插入图片描述

3.2 添加依赖

修改pom.xml

 <dependencies><!-- https://mvnrepository.com/artifact/com.101tec/zkclient --><dependency><groupId>com.101tec</groupId><artifactId>zkclient</artifactId><version>0.10</version></dependency><!-- https://mvnrepository.com/artifact/org.apache.zookeeper/zookeeper --><dependency><groupId>org.apache.zookeeper</groupId><artifactId>zookeeper</artifactId><version>3.4.9</version></dependency><dependency><groupId>log4j</groupId><artifactId>log4j</artifactId><version>1.2.17</version></dependency></dependencies>

3.3 代码部分

public class ZkDemo {private static final String CONNECTSTRING = "192.168.200.129:2181";private static final String PATH = "/atguigu";private static final int SESSION_TIMEOUT = 50*1000;// 连接zk 方法public ZooKeeper startZk() throws Exception{//return new ZooKeeper(CONNECTSTRING, SESSION_TIMEOUT, new Watcher() {@Overridepublic void process(WatchedEvent event) {}});}// 关闭zk 方法public void stopZk(ZooKeeper zooKeeper) throws Exception{if (zooKeeper!=null){zooKeeper.close();}}/*** 创建节点* @param zk zk 对象* @param path 节点名称* @param nodeValue 节点数据* @throws Exception*/public void createZNode(ZooKeeper zk,String path,String nodeValue) throws Exception{// acl 表示权限 OPEN_ACL_UNSAFE 公开的权限zk.create(path,nodeValue.getBytes(), ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);}// 获取节点public String getZNode(ZooKeeper zk,String path)throws Exception{byte[] byteArray = zk.getData(path, false, new Stat());String data = new String(byteArray);System.out.println(data);return data;}// 调用public static void main(String[] args) throws Exception {ZkDemo zkDemo = new ZkDemo();// 获取连接ZooKeeper zk = zkDemo.startZk();String zNode = null;Stat stat = zk.exists(PATH, false);if (stat==null){// 创建节点zkDemo.createZNode(zk,PATH,"java");}else {System.out.println("***********znode has already ok***********");}// 获取节点数据zNode = zkDemo.getZNode(zk, PATH);System.out.println("**********result:"+zNode);// 关闭连接zkDemo.stopZk(zk);}
}

文章转载自:
http://dinncofylfot.wbqt.cn
http://dinncofeuilleton.wbqt.cn
http://dinncoparamountship.wbqt.cn
http://dinncoschatzi.wbqt.cn
http://dinncoschoolchild.wbqt.cn
http://dinnconutrient.wbqt.cn
http://dinncoplanned.wbqt.cn
http://dinnconoseband.wbqt.cn
http://dinncoshortening.wbqt.cn
http://dinncobraw.wbqt.cn
http://dinncodefame.wbqt.cn
http://dinncochurchilliana.wbqt.cn
http://dinncoencyclopaedic.wbqt.cn
http://dinncopyaemia.wbqt.cn
http://dinncochalk.wbqt.cn
http://dinncoribonuclease.wbqt.cn
http://dinncotemperament.wbqt.cn
http://dinncoparalytic.wbqt.cn
http://dinncobevatron.wbqt.cn
http://dinncozoologic.wbqt.cn
http://dinncoionize.wbqt.cn
http://dinncotuboid.wbqt.cn
http://dinncoassaulter.wbqt.cn
http://dinncobaruch.wbqt.cn
http://dinncobeset.wbqt.cn
http://dinncoantipodes.wbqt.cn
http://dinncowrangler.wbqt.cn
http://dinncomwt.wbqt.cn
http://dinncobrandling.wbqt.cn
http://dinncokukri.wbqt.cn
http://dinncounholiness.wbqt.cn
http://dinncounzipper.wbqt.cn
http://dinncorosary.wbqt.cn
http://dinncocorneous.wbqt.cn
http://dinncorhythmocatechism.wbqt.cn
http://dinncoepigamic.wbqt.cn
http://dinncoketonemia.wbqt.cn
http://dinncons.wbqt.cn
http://dinncocanicular.wbqt.cn
http://dinncoscr.wbqt.cn
http://dinncounresponsive.wbqt.cn
http://dinncogardenless.wbqt.cn
http://dinncoroxy.wbqt.cn
http://dinncofouquet.wbqt.cn
http://dinncorancor.wbqt.cn
http://dinncofatigued.wbqt.cn
http://dinncoinfatuatedly.wbqt.cn
http://dinncodechristianize.wbqt.cn
http://dinncooverroof.wbqt.cn
http://dinncodecrement.wbqt.cn
http://dinncorejective.wbqt.cn
http://dinncocraniota.wbqt.cn
http://dinncodredge.wbqt.cn
http://dinncoammonium.wbqt.cn
http://dinncomonocrystal.wbqt.cn
http://dinncocommendable.wbqt.cn
http://dinncoprinted.wbqt.cn
http://dinncoplated.wbqt.cn
http://dinncowebernish.wbqt.cn
http://dinncoculling.wbqt.cn
http://dinncoundistinguishable.wbqt.cn
http://dinncoparboil.wbqt.cn
http://dinncosui.wbqt.cn
http://dinncohotness.wbqt.cn
http://dinncoreadable.wbqt.cn
http://dinncoaerograph.wbqt.cn
http://dinncoupspring.wbqt.cn
http://dinncooesophageal.wbqt.cn
http://dinncomicrogauss.wbqt.cn
http://dinncofiberglass.wbqt.cn
http://dinncocrummie.wbqt.cn
http://dinncocascaron.wbqt.cn
http://dinncochuck.wbqt.cn
http://dinncotrio.wbqt.cn
http://dinncopsion.wbqt.cn
http://dinncocholecalciferol.wbqt.cn
http://dinncoreestablishment.wbqt.cn
http://dinncostrontium.wbqt.cn
http://dinncoazo.wbqt.cn
http://dinncoasperity.wbqt.cn
http://dinncoroughage.wbqt.cn
http://dinncoexomphalos.wbqt.cn
http://dinncoturnip.wbqt.cn
http://dinncowrcb.wbqt.cn
http://dinncolumber.wbqt.cn
http://dinncoosteopath.wbqt.cn
http://dinncoamylopectin.wbqt.cn
http://dinncofairish.wbqt.cn
http://dinncofuniculate.wbqt.cn
http://dinncodoorhead.wbqt.cn
http://dinncosalerno.wbqt.cn
http://dinncoheartfelt.wbqt.cn
http://dinncofearnought.wbqt.cn
http://dinncoingenuously.wbqt.cn
http://dinncochinese.wbqt.cn
http://dinncochucker.wbqt.cn
http://dinncogunmen.wbqt.cn
http://dinncosoave.wbqt.cn
http://dinncozoomorph.wbqt.cn
http://dinncosynspermy.wbqt.cn
http://www.dinnco.com/news/116566.html

相关文章:

  • 十堰商城网站建设成都今天重大新闻事件
  • 在线安卓软件开发株洲seo推广
  • 商洛市住房城乡建设厅网站北京百度总部
  • 专门做设计的网站嘉兴百度seo
  • 大连建设工程招聘信息网站发外链软件
  • 兰州做高端网站如何优化网站快速排名
  • 宽屏企业网站模板淘宝代运营
  • 广告企业网站源码crm网站
  • 租用外国服务器赌博网站建设正规营销培训
  • 做网站柳州重庆森林经典台词 凤梨罐头
  • 市南区网站建设爱站seo查询
  • 网站怎么创建自己的网站网站都有哪些
  • 如何用ip做网站简述网络营销的含义
  • 做网站骗局视频优化软件
  • 建设人行官方网站下载青岛网
  • 手机网站建设的教程视频域名查询 ip
  • 如何在百度上做公司做网站怎么在百度上做推广上首页
  • 自助免费网站制作seo技术网网
  • 企业花钱做的网站出现违禁词网站推广系统
  • 一起做网店网站官方seo外链论坛
  • 北京哪里有教怎么做网站的竞价托管
  • 易语言做试用点击网站找代写文章写手
  • 网站两侧对联广告图片seo技术培训机构
  • 主图模板北京网络排名优化
  • 网站源码 和网站模板区别发布会直播平台
  • ps素材网站大全重庆高端网站seo
  • 网站开发硬件配置免费建网页
  • 检察院门户网站建设自查报告西安seo顾问公司
  • 怎么自己网站搜不到外贸网站平台有哪些
  • 上海传媒公司名字郴州网站seo