This is an automated email from the ASF dual-hosted git repository.
manikumar pushed a commit to branch 2.2
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/2.2 by this push:
new 72c74e0 MINOR: Add missing Alter Operation to Topic supported
operations list in AclCommand
72c74e0 is described below
commit 72c74e06bb578d24df809c6be56a9c8452305c86
Author: Manikumar Reddy <[email protected]>
AuthorDate: Thu Feb 14 09:45:09 2019 +0530
MINOR: Add missing Alter Operation to Topic supported operations list in
AclCommand
- Update the AclCommandTest
Author: Manikumar Reddy <[email protected]>
Reviewers: Jun Rao <[email protected]>
Closes #6263 from omkreddy/aclcommand
---
core/src/main/scala/kafka/admin/AclCommand.scala | 2 +-
core/src/test/scala/unit/kafka/admin/AclCommandTest.scala | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/core/src/main/scala/kafka/admin/AclCommand.scala
b/core/src/main/scala/kafka/admin/AclCommand.scala
index 397238a..51177b2 100644
--- a/core/src/main/scala/kafka/admin/AclCommand.scala
+++ b/core/src/main/scala/kafka/admin/AclCommand.scala
@@ -42,7 +42,7 @@ object AclCommand extends Logging {
private val Newline = scala.util.Properties.lineSeparator
val ResourceTypeToValidOperations: Map[JResourceType, Set[Operation]] =
Map[JResourceType, Set[Operation]](
- JResourceType.TOPIC -> Set(Read, Write, Create, Describe, Delete,
DescribeConfigs, AlterConfigs, All),
+ JResourceType.TOPIC -> Set(Read, Write, Create, Describe, Delete, Alter,
DescribeConfigs, AlterConfigs, All),
JResourceType.GROUP -> Set(Read, Describe, Delete, All),
JResourceType.CLUSTER -> Set(Create, ClusterAction, DescribeConfigs,
AlterConfigs, IdempotentWrite, Alter, Describe, All),
JResourceType.TRANSACTIONAL_ID -> Set(Describe, Write, All),
diff --git a/core/src/test/scala/unit/kafka/admin/AclCommandTest.scala
b/core/src/test/scala/unit/kafka/admin/AclCommandTest.scala
index d5535a5..7d7b8e4 100644
--- a/core/src/test/scala/unit/kafka/admin/AclCommandTest.scala
+++ b/core/src/test/scala/unit/kafka/admin/AclCommandTest.scala
@@ -56,13 +56,13 @@ class AclCommandTest extends ZooKeeperTestHarness with
Logging {
)
private val ResourceToOperations = Map[Set[Resource], (Set[Operation],
Array[String])](
- TopicResources -> (Set(Read, Write, Create, Describe, Delete,
DescribeConfigs, AlterConfigs),
+ TopicResources -> (Set(Read, Write, Create, Describe, Delete,
DescribeConfigs, AlterConfigs, Alter),
Array("--operation", "Read" , "--operation", "Write", "--operation",
"Create", "--operation", "Describe", "--operation", "Delete",
- "--operation", "DescribeConfigs", "--operation", "AlterConfigs")),
- Set(Resource.ClusterResource) -> (Set(Create, ClusterAction,
DescribeConfigs, AlterConfigs, IdempotentWrite),
+ "--operation", "DescribeConfigs", "--operation", "AlterConfigs",
"--operation", "Alter")),
+ Set(Resource.ClusterResource) -> (Set(Create, ClusterAction,
DescribeConfigs, AlterConfigs, IdempotentWrite, Alter, Describe),
Array("--operation", "Create", "--operation", "ClusterAction",
"--operation", "DescribeConfigs",
- "--operation", "AlterConfigs", "--operation", "IdempotentWrite")),
- GroupResources -> (Set(Read, Describe), Array("--operation", "Read",
"--operation", "Describe")),
+ "--operation", "AlterConfigs", "--operation", "IdempotentWrite",
"--operation", "Alter", "--operation", "Describe")),
+ GroupResources -> (Set(Read, Describe, Delete), Array("--operation",
"Read", "--operation", "Describe", "--operation", "Delete")),
TransactionalIdResources -> (Set(Describe, Write), Array("--operation",
"Describe", "--operation", "Write")),
TokenResources -> (Set(Describe), Array("--operation", "Describe"))
)