Kafka ACL issue using Java code
<p>I want to grant access to kafka topic through java application as we does through kafka-acls.sh. I just wanted to run below command through java api.</p>

<pre><code>String[] cmdPArm = {"--authorizer-properties","zookeeper.connect=vmw201:2181/
kafka","--add","--allow-principal","User:Alice","--operation","Write","--topic
","test"};AclCommand.main(cmdPArm);
</code></pre>

<p>But after the operation, there will be an error, no authorization to empower。My cluster has deployed the keberos as an authentication system.How do I introduce the identity of a super user into the code?</p>

<p>Error while executing ACL command: </p>

<blockquote>
  <p>org.apache.zookeeper.KeeperException$NoAuthException: KeeperErrorCode
  = NoAuth for /kafka-acl/Topic/test org.I0Itec.zkclient.exception.ZkException:
  org.apache.zookeeper.KeeperException$NoAuthException: KeeperErrorCode
  = NoAuth for /kafka-acl/Topic/test    at org.I0Itec.zkclient.exception.ZkException.create(ZkException.java:68)
    at
  org.I0Itec.zkclient.ZkClient.retryUntilConnected(ZkClient.java:995)
    at
  org.I0Itec.zkclient.ZkClient.writeDataReturnStat(ZkClient.java:1138)
    at org.I0Itec.zkclient.ZkClient.writeData(ZkClient.java:1133)   at
  org.I0Itec.zkclient.ZkClient.writeData(ZkClient.java:1101)    at
  kafka.utils.ZkUtils.updatePersistentPath(ZkUtils.scala:411)   at
  kafka.security.auth.SimpleAclAuthorizer.addAcls(SimpleAclAuthorizer.scala:173)
    at
  kafka.admin.AclCommand$$anonfun$addAcl$1$$anonfun$apply$3.apply(AclCommand.scala:89)
    at
  kafka.admin.AclCommand$$anonfun$addAcl$1$$anonfun$apply$3.apply(AclCommand.scala:86)
    at
  scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:772)
    at scala.collection.immutable.Map$Map1.foreach(Map.scala:109)   at
  scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:771)
    at
  kafka.admin.AclCommand$$anonfun$addAcl$1.apply(AclCommand.scala:86)
    at
  kafka.admin.AclCommand$$anonfun$addAcl$1.apply(AclCommand.scala:80)
    at kafka.admin.AclCommand$.withAuthorizer(AclCommand.scala:74)  at
  kafka.admin.AclCommand$.addAcl(AclCommand.scala:80)   at
  kafka.admin.AclCommand$.main(AclCommand.scala:48)     at
  kafka.admin.AclCommand.main(AclCommand.scala)     at
  kafka.acl.KafkaAcl.main(KafkaAcl.java:15) Caused by:
  org.apache.zookeeper.KeeperException$NoAuthException: KeeperErrorCode
  = NoAuth for /kafka-acl/Topic/test    at org.apache.zookeeper.KeeperException.create(KeeperException.java:113)
    at
  org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
    at org.apache.zookeeper.ZooKeeper.setData(ZooKeeper.java:1270)  at
  org.I0Itec.zkclient.ZkConnection.writeDataReturnStat(ZkConnection.java:133)
    at org.I0Itec.zkclient.ZkClient$13.call(ZkClient.java:1142)     at
  org.I0Itec.zkclient.ZkClient.retryUntilConnected(ZkClient.java:985)
    ... 17 more</p>
</blockquote>