Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KAFKA-7005: Remove duplicate resource class. #5184

Merged
merged 1 commit into from
Jun 11, 2018

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)

@@ -33,7 +34,7 @@ import org.apache.kafka.common.protocol.types.Struct
import org.apache.kafka.common.resource.ResourceNameType
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.errors._
import org.apache.kafka.common.internals.Topic.GROUP_METADATA_TOPIC_NAME
import org.apache.kafka.common.network.ListenerName
import org.apache.kafka.common.protocol.{ApiKeys, Errors}
import org.apache.kafka.common.record.{CompressionType, MemoryRecords, Records, SimpleRecord}
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 <[email protected]>, Jun Rao <[email protected]>
@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 <[email protected]>, Jun Rao <[email protected]>
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