zookeeper,有些听说过,有些人没有,本人也是因为自己在做一个分布式的系统,由dubbo+zookeeper整合,所以接触一下。到底是什么东西?关于这个问题我首先到其官网和百度百科。其大致就是zookepper是hadoop的一个子项目,Apache软件基金会下的一个项目,作为分布式协调作用的,作用类型与我们的大脑。而至于hadoop是什么的话,我只能告诉你,是一个大数据的框架,具体是什么,小的不清楚,哈哈。其实zookeeper在hadoop的作用,我可以再打个比喻。不管是hadoop还是其它分布式系统,就好比我们人的身体,有心脏,胃,有呼吸道系统。腿,手。。。。。等等。这么多的子系统处于分布式环境,怎么协调呢?那就是我们大脑(zookeeper),大家可以把zookeepr想成大脑,本身没有其它功能,只有负责协调,联络子系统的功能,具体有哪些协调功能,往下看
回到主题,zookeeper官网是这么介绍它的
ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. All of these kinds of services are used in some form or another by distributed applications. Each time they are implemented there is a lot of work that goes into fixing the bugs and race conditions that are inevitable. Because of the difficulty of implementing these kinds of services, applications initially usually skimp on them ,which make them brittle in the presence of change and difficult to manage. Even when done correctly, different implementations of these services lead to management complexity when the applications are deployed.
中文翻译
ZooKeeper是一个集中式服务,用于维护配置信息,命名,提供分布式同步和提供组服务。所有这些类型的服务以分布式应用程序的某种形式或另一种形式使用。每次他们被实现,有很多工作,以修复错误和竞争条件是不可避免的。由于实现这些服务的难度,应用程序最初通常嘲弄它们,这使得它们在变化的存在下变得脆弱并且难以管理。即使正确地完成,这些服务的不同实施导致在应用被部署时的管理复杂性。
其实zookeeper怎么协调hadoop以及其它的分布式系统的,我们可以从其介绍看出(标红色部分),下面针对以上4个,我们简单讲一下,目的就是大家能简单知道,了解zookeeper。
1、维护配置信息