apache-zookeeper

Apache Kafka error on windows - Couldnot find or load main class QuorumPeerMain

只愿长相守 提交于 2019-11-27 01:26:44
问题 I just downloaded Kafka 2.8.0 from Apache website, and I am trying to setup using the instructions given on the website. But when I try to start zookeper server, I am getting below error: Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain My environment is Windows 7 64 bit. I tried to follow below e-mail chain: Apache Email Chain . But still it's having same issue. Can anyone guide me in this? As I am very new to this and couldn't find many information

exception after submitting topology

放肆的年华 提交于 2019-11-26 23:40:27
问题 I'm new in storm and trying to submit a topology and found this in supervisor I found this in log file of workers [ERROR] Async loop died! java.lang.RuntimeException: org.apache.thrift7.transport.TTransportException: java.net.ConnectException: Connection refused at backtype.storm.drpc.DRPCInvocationsClient.<init>(DRPCInvocationsClient.java:23) at backtype.storm.drpc.DRPCSpout.open(DRPCSpout.java:69) at storm.trident.spout.RichSpoutBatchTriggerer.open(RichSpoutBatchTriggerer.java:41) at

Kafka: Get broker host from ZooKeeper

社会主义新天地 提交于 2019-11-26 18:01:24
问题 For particular reasons I need to use both - ConsumerGroup (a.k.a. high-level consumer) and SimpleConsumer (a.k.a. low-level consumer) to read from Kafka. For ConsumerGroup I use ZooKeeper-based config and am completely satisfied with it, but SimpleConsumer requires seed brokers to be instantiated. I don't want to keep list of both - ZooKeeper and broker hosts. Thus, I'm looking for a way to automatically discover brokers for a particular topic from ZooKeeper . Because of some indirect

Is it possible to start a zookeeper server instance in process, say for unit tests?

[亡魂溺海] 提交于 2019-11-26 15:19:28
问题 Calling org.apache.zookeeper.server.quorum.QuorumPeerMain.main() isn't working. 回答1: To start ZooKeeper you have to execute ZooKeeperServerMain class. You can use following code to start ZooKeeper in embedded mode. Properties startupProperties = ... QuorumPeerConfig quorumConfiguration = new QuorumPeerConfig(); try { quorumConfiguration.parseProperties(startupProperties); } catch(Exception e) { throw new RuntimeException(e); } zooKeeperServer = new ZooKeeperServerMain(); final ServerConfig

Explaining Apache ZooKeeper

烈酒焚心 提交于 2019-11-26 14:57:21
问题 I am trying to understand ZooKeeper, how it works and what it does. Is there any application which is comparable to ZooKeeper? If you know, then how would you describe ZooKeeper to a layman? I have tried apache wiki, zookeeper sourceforge...but I am still not able to relate to it. I just read thru http://zookeeper.sourceforge.net/index.sf.shtml, so aren't there more services like this? Is it as simple as just replicating a server service? 回答1: In a nutshell, ZooKeeper helps you build

removing a kafka consumer group in zookeeper

随声附和 提交于 2019-11-26 14:14:32
问题 I'm using kafka_2.9.2-0.8.1.1 with zookeeper 3.4.6. Is there a utility that can automatically remove a consumer group from zookeeper? Or can I just remove everything under /consumers/[group_id] in zookeeper? If the latter, is there anything else I'm missing & can this be done with a live system? Update: As of kafka version 2.3.0, there is a new utility: > bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --delete --group my-group Related doc: http://kafka.apache.org/documentation

How to install Kafka on Windows?

穿精又带淫゛_ 提交于 2019-11-26 12:05:26
问题 I\'m trying to install Kafka message queue on Windows for testing purposes (not for production). I found this article on how to install Apache Kafka 0.8 on Windows: http://janschulte.wordpress.com/2013/10/13/apache-kafka-0-8-on-windows/ It\'s a good article, but it\'s outdated, unfortunately. Does someone know a way to achieve that? 回答1: Ok, it's finally not complicated :) The only steps are: Download Kafka and uncompress it somewhere nice (let's say C:/Kafka ) Install Cygwin Edit \bin\kafka

Distributed sequence number generation?

霸气de小男生 提交于 2019-11-26 10:05:23
问题 I\'ve generally implemented sequence number generation using database sequences in the past. e.g. Using Postgres SERIAL type http://www.neilconway.org/docs/sequences/ I\'m curious though as how to generate sequence numbers for large distributed systems where there is no database. Does anybody have any experience or suggestions of a best practice for achieving sequence number generation in a thread safe manner for multiple clients? 回答1: OK, this is a very old question, which I'm first seeing

How to create a Topic in Kafka through Java

眉间皱痕 提交于 2019-11-26 08:18:11
问题 I want to create a topic in Kafka (kafka_2.8.0-0.8.1.1) through java. It is working fine if I create a topic in command prompt, and If I push message through java api. But I want to create a topic through java api. After a long search I found below code, ZkClient zkClient = new ZkClient(\"localhost:2181\", 10000, 10000); AdminUtils.createTopic(zkClient, myTopic, 10, 1, new Properties()); I tried above code and it is showing that topic is created but I am not able to push message in the topic.