apache-zookeeper

Is Zookeeper a must for Kafka?

≯℡__Kan透↙ 提交于 2019-11-30 06:12:55
问题 In Kafka, I would like to use only a single broker, single topic and a single partition having one producer and multiple consumers (each consumer getting its own copy of data from the broker). Given this, I do not want the overhead of using Zookeeper; Can I not just use the broker only? Why is a Zookeeper must? 回答1: Yes, Zookeeper is required for running Kafka. From the Kafka Getting Started documentation: Step 2: Start the server Kafka uses zookeeper so you need to first start a zookeeper

Offsets stored in Zookeeper or Kafka?

╄→尐↘猪︶ㄣ 提交于 2019-11-30 04:41:58
I'm a bit confused about where offsets are stored when using Kafka and Zookeeper. It seems like offsets in some cases are stored in Zookeeper, in other cases they are stored in Kafka. What determines whether the offset is stored in Kafka or in Zookeeper? And what the pros and cons? NB: Of course I could also store the offset on my own in some different data store but that is not part of the picture for this post. Some more details about my setup: I run these versions: KAFKA_VERSION="0.10.1.0", SCALA_VERSION="2.11" I connect to Kafka/Zookeeper using kafka-node from my NodeJS application. Older

Starting Zookeeper Cluster. Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain

风格不统一 提交于 2019-11-30 03:38:47
问题 (I'm running on CentOS 5.8). I've been following the direction for a Clustered (Multiserver) Zookeeper Set-up, but getting an error when I try to start up my server. When I run the command as described in the documentation: java -cp zookeeper-3.4.6.jar:lib/log4j-1.2.16.jar:conf \ org.apache.zookeeper.server.quorum.QuorumPeerMain conf/zoo.cfg I get the error: Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain I have my files location as such and am

Kafka on Kubernetes multi-node

柔情痞子 提交于 2019-11-30 01:52:25
So my objective here is to set up a cluster of several kafka-brokers in a distributed fashion. But I can't see the way to make the brokers aware of each other. As far as i understand, every broker needs a separate ID in their config, which I cannot guarantee or configure if I launch the containers from kubernetes? They also need to have the same advertised_host? Are there any parameters I'm missing that would need to be changed for the nodes to discover each other? Would it be viable to do such a configuration at the end of the Dockerfile with a script? And/or a shared volume? I'm currently

Why does zookeeper not use my log4j.properties file log directory

我怕爱的太早我们不能终老 提交于 2019-11-29 23:01:11
In my zookeeper/conf/log4j.properties file I set the zookeeper.log.dir to $HOME/zklogs When I use zkServer.sh it does not use that directory. Instead it uses the ${ZOO_LOG_DIR} which when I echo it, comes out to "." I don't understand how fix this issue, I don't see the ${ZOO_LOG_DIR} set anywhere. I am not sure how it gets set to "." at all. I also don't know how to launch zookeeper without zkServer.sh. I am noobish at linux too and a little lost on this issue... Does anybody know how I can fix this issue so that it uses the directory set in my log4j.properties file in the conf directory? **

Can Mesos 'master' and 'slave' nodes be deployed on the same machines?

旧时模样 提交于 2019-11-29 21:05:09
Can Apache Mesos 'master' nodes be co-located on the same machine as Mesos 'slave' nodes? Similarly (for high-availability (HA) deploys), can the Apache Zookeeper nodes used in Mesos 'master' election be deployed on the same machines as Mesos 'slave' nodes? Mesos recommends 3 'masters' be used for HA deploys, and Zookeeper recommends 5 nodes be used for its quorum election system. It would be nice to have these services running along side Mesos 'slave' processes instead of committing 8 machines to effectively 'non-productive' tasks. If such a setup is feasible, what are the pros/cons of such a

How to check if ZooKeeper is running or up from command prompt?

女生的网名这么多〃 提交于 2019-11-29 19:36:03
I exploring a few options to setup kafka and I knew that the Zookeeper has to be up and running to initiate a kafka. I would like to know how can I find the below. 1) hostname and port for my zookeeper instance---I checked the zoo.cfg and I could only find the ClientPort not the hostname, will hostname be the hostname of my box?? 2) To check if ZooKeeper is up and running---I tried to do a ps -ef | grep "zoo" I could not find anything. May be I am using a wrong key word to search?? Any help would be really appreciated? To check if Zookeeper is accessible. One method is to simply telnet to the

Why do we need ZooKeeper in the Hadoop stack?

北战南征 提交于 2019-11-29 19:27:04
I am new to Hadoop/ZooKeeper. I cannot understand the purpose of using ZooKeeper with Hadoop, is ZooKeeper writing data in Hadoop? If not, then why we do we use ZooKeeper with Hadoop? Arnon Rotem-Gal-Oz Hadoop 1.x does not use Zookeeper. HBase does use zookeeper even in Hadoop 1.x installations. Hadoop adopted Zookeeper as well starting with version 2.0. The purpose of Zookeeper is cluster management. This fits with the general philosophy of *nix of using smaller specialized components - so components of Hadoop that want clustering capabilities rely on Zookeeper for that rather than develop

Connecting to a remote HBase instance

放肆的年华 提交于 2019-11-29 16:25:08
I have an HBase-0.98.3-hadoop2 instance running on a ubuntu VM, I could not connect to it (the main thread stuck when creating HTable instance) with the following code: Configuration config = HBaseConfiguration.create(); config.set("hbase.zookeeper.quorum", "192.168.56.101"); HTableInterface usersTable = new HTable(config, "users"); Here is what I got in the console SLF4J: The requested version 1.5.8 by your slf4j binding is not compatible with [1.6, 1.7] SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details. 14/06/14 12:40:05 INFO zookeeper.ZooKeeper: Client

Kafka - Broker: Group coordinator not available

不打扰是莪最后的温柔 提交于 2019-11-29 14:55:00
问题 I have the following structure: zookeeper: 3.4.12 kafka: kafka_2.11-1.1.0 server1: zookeeper + kafka server2: zookeeper + kafka server3: zookeeper + kafka Created topic with replication factor 3 and partitions 3 by kafka-topics shell script. ./kafka-topics.sh --create --zookeeper localhost:2181 --topic test-flow --partitions 3 --replication-factor 3 And use group localConsumers. it works fine when leader is ok. ./kafka-topics.sh --describe --zookeeper localhost:2181 --topic test-flow Topic