This is an automated email from the ASF dual-hosted git repository.
manikumar pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/2.1 by this push:
new bd269ed MINOR: Add missing Alter Operation to Topic supported
operations list in AclCommand
bd269ed is described below
commit bd269ed5cbead1525eecf268a60054491060f078
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 ad375d2..9c28aae 100644
--- a/core/src/main/scala/kafka/admin/AclCommand.scala
+++ b/core/src/main/scala/kafka/admin/AclCommand.scala
@@ -41,7 +41,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"))
)