美文网首页
Zookeeper学习笔记

Zookeeper学习笔记

作者: 63e29c663713 | 来源:发表于2016-08-18 22:22 被阅读21次

启动zk server

zkServer start // or in linux: zkServer.sh start

配置conf/zoo.cfg

  • tickTime
    the basic time unit in milliseconds used by ZooKeeper. It is used to do heartbeats and the minimum session timeout will be twice the tickTime.
  • dataDir
    the location to store the in-memory database snapshots and, unless specified otherwise, the transaction log of updates to the database.
  • clientPort
    the port to listen for client connections
  • initLimit
    initLimit is timeouts ZooKeeper uses to limit the length of time the ZooKeeper servers in quorum have to connect to a leader.
  • syncLimit
    syncLimit limits how far out of date a server can be from a leader
  • server.1=localhost:2888:3888 # zk cluster

client connect to zk server:

zkCli -server server_ip:2181

#creates a new znode and associates the string "my_data" with the node
create /zk_test my_data

# list zk nodes
ls /
ls /abc/def

# get node_name detail info
get /node_name
get /node_name/sub_node

# set the data associated with node_name
set /node_name data

# delete the node
delete /node_name

相关文章

  • 2019-04-08 Zookeeper学习笔记(一)

    Zookeeper学习笔记(一) 1.zookeeper是什么? 1.1 zookeeper概览 zookeepe...

  • Zookeeper 概念与原理介绍

    中间件:Zookeeper注:本文是作者学习Zookeeper时得笔记和经验总结 1. ZooKeeper 特点 ...

  • ZooKeeper学习笔记

    一、ZooKeeper概念和基础 1、ZooKeeper的使命就是在分布系统中协作多个任务。一个协作任务就是指一...

  • Zookeeper学习笔记

    首先先引入官网对Zookeeper介绍: 意思就是说:Zookeeper是一个集中服务,用于维护配置信息,命名,提...

  • Zookeeper学习笔记

    创建客户端 ZkClientzkClient = zkHelper.getZkClient(); //节点是否存在...

  • Zookeeper学习笔记

    启动zk server 配置conf/zoo.cfg tickTimethe basic time unit in...

  • zookeeper 学习笔记

    基本概念 角色zookeeper 集群中的节点共有三种角色,每个节点同时只能是一种角色。集群中的所有机器通过一个 ...

  • Zookeeper学习笔记

    简介 Zookeeper是一个分布式的、开源的程序协调服务,是 hadoop 项目下的一个子项目。他提供的主要功 ...

  • Zookeeper学习笔记

    一、Zookeeper简介 1.什么是Zookeeper Apache Zookeeper是一个开源的分布式服务框...

  • Zookeeper学习笔记

    Zookeeper是一个开源的,为分布式应用提供协调服务的 Apache 项目。从设计模式的角度来理解:Zooke...

网友评论

      本文标题:Zookeeper学习笔记

      本文链接:https://www.haomeiwen.com/subject/plipsttx.html