This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.hello.world; | |
| import joptsimple.internal.Strings; | |
| import kafka.admin.AdminUtils; | |
| import kafka.admin.RackAwareMode; | |
| import kafka.utils.ZKStringSerializer$; | |
| import kafka.utils.ZkUtils; | |
| import org.I0Itec.zkclient.ZkClient; | |
| import org.I0Itec.zkclient.ZkConnection; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class RedisClient { | |
| private JedisPool pool; | |
| @Inject | |
| public RedisClient(Settings settings) { | |
| try { | |
| pool = new JedisPool(new JedisPoolConfig(), settings.get("redis.host"), settings.getAsInt("redis.port", 6379)); | |
| } catch (SettingsException e) { | |
| // ignore |