我正在制作Zookeeper集群,并使用以下命令分别在Confluent中启动Zookeeper:
./bin/zookeeper-server-start etc/kafka/zookeeper.properties
我想获得Zookeeper的状态。
我在线搜索,所有的人都在使用:
./zkServer.sh status
但是在Confluent中找不到zkServer.sh
。
我知道我可以使用./bin/confluent status
来获取身份。但我想了解有关Zookeeper的更多信息,例如:
./zkServer.sh status
JMX enabled by default
Using config: /opt/../conf/zoo.cfg
Mode: follower
我该怎么做?
答案 0 :(得分:0)
您可以使用Four Letter Words来获取相同或更好的信息。 public void FormsAuthentication_OnAuthenticate(object sender, FormsAuthenticationEventArgs args)
{
if (FormsAuthentication.CookiesSupported)
{
HttpCookie authCookie = Request.Cookies[FormsAuthentication.FormsCookieName];
if (authCookie != null)
{
try
{
//get the forms authentication ticket
FormsAuthenticationTicket authTicket = FormsAuthentication.Decrypt(authCookie.Value);
string userData = authTicket.UserData;
//here we suppose userData contains roles joined with ","
string[] roles = userData.Split(',');
//we have to create identity since it's not created yet
var identity = new FormsIdentity(authTicket);
var principal = new GenericPrincipal(identity, roles);
args.User = principal;
}
catch (Exception e)
{
// Decrypt method failed.
}
}
}
else
{
throw new HttpException("Cookieless Forms Authentication is not " +
"supported for this application.");
}
}
的输出:
stat
$ echo "stat" | nc <ZOOKEEPER-IP-ADDRESS> 2181
Zookeeper version: 3.4.10
Clients:
/192.168.1.2:49618[1](queued=0,recved=1304,sent=1304)
/192.168.1.3:53484[0](queued=0,recved=1,sent=0)
Latency min/avg/max: 0/0/15
Received: 1330
Sent: 1329
Connections: 2
Outstanding: 0
Zxid: 0x1000001ee
Mode: leader
Node count: 435
的输出:
conf