Skip to content

KAFKA-7005: Remove duplicate resource class.#5184

Merged
junrao merged 1 commit intoapache:trunkfrom
big-andy-coates:drop_request_resource
Jun 11, 2018
Merged

KAFKA-7005: Remove duplicate resource class.#5184
junrao merged 1 commit intoapache:trunkfrom
big-andy-coates:drop_request_resource

Conversation

@big-andy-coates
Copy link
Contributor

Fix for KAFKA-7005.

This is a follow-on change requested as part of the initial PR for KIP-290 #5117. @cmccabe requested that the resource.Resource class be factored out in favour of ConfigResource to avoid confusion between all the Resource implementations.

cc @cmccabe, @junrao

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

import org.apache.kafka.common.record._
import org.apache.kafka.common.requests.CreateAclsRequest.AclCreation
import org.apache.kafka.common.requests.{Resource => RResource, ResourceType => RResourceType, _}
import org.apache.kafka.common.requests._
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we really be using star imports?

Copy link
Contributor Author

@big-andy-coates big-andy-coates Jun 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my defence, I've only removed imports here, not added them.

This is also a test class that pulls in a LOT of classes from that package - it would be a long long list!

import org.apache.kafka.common.requests.CreateAclsRequest.AclCreation
import org.apache.kafka.common.requests.CreateTopicsRequest.TopicDetails
import org.apache.kafka.common.requests.{Resource => RResource, ResourceType => RResourceType, _}
import org.apache.kafka.common.requests._
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we really be using star imports?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above.

@cmccabe
Copy link
Contributor

cmccabe commented Jun 11, 2018

LGTM, after question about star imports is addressed

Copy link
Contributor

@junrao junrao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@big-andy-coates : Thanks for the patch. LGTM

@junrao junrao merged commit 49db5a6 into apache:trunk Jun 11, 2018
junrao pushed a commit that referenced this pull request Jun 11, 2018
This is a follow-on change requested as part of the initial PR for KIP-290 #5117.  @cmccabe requested that the `resource.Resource` class be factored out in favour of `ConfigResource` to avoid confusion between all the `Resource` implementations.

Colin Patrick McCabe <colin@cmccabe.xyz>, Jun Rao <junrao@gmail.com>
@big-andy-coates big-andy-coates deleted the drop_request_resource branch June 11, 2018 20:32
ying-zheng pushed a commit to ying-zheng/kafka that referenced this pull request Jul 6, 2018
This is a follow-on change requested as part of the initial PR for KIP-290 apache#5117.  @cmccabe requested that the `resource.Resource` class be factored out in favour of `ConfigResource` to avoid confusion between all the `Resource` implementations.

Colin Patrick McCabe <colin@cmccabe.xyz>, Jun Rao <junrao@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants