Skip to content

KAFKA-4591: Create Topic Policy follow-up#2388

Closed
ijuma wants to merge 7 commits intoapache:trunkfrom
ijuma:create-topic-policy-docs-and-config-name-change
Closed

KAFKA-4591: Create Topic Policy follow-up#2388
ijuma wants to merge 7 commits intoapache:trunkfrom
ijuma:create-topic-policy-docs-and-config-name-change

Conversation

@ijuma
Copy link
Copy Markdown
Member

@ijuma ijuma commented Jan 17, 2017

  1. Added javadoc to public classes
  2. Removed s from config name for consistency with interface name
  3. The policy interface now implements Configurable and AutoCloseable as per the KIP
  4. Use null instead of -1 in RequestMetadata
  5. Perform all broker validation before invoking the policy
  6. Add tests

1. Added javadoc to public classes
2. Removed `s` from config name for consistency with interface name
3. The policy interface now implements Configurable and AutoCloseable as per the KIP
4. Use `null` instead of `-1` in `RequestMetadata`
@ijuma
Copy link
Copy Markdown
Member Author

ijuma commented Jan 17, 2017

Review by @hachikuji.

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 17, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.11/948/
Test PASSed (JDK 8 and Scala 2.11).

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 17, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.10/946/
Test PASSed (JDK 7 and Scala 2.10).

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 17, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/946/
Test PASSed (JDK 8 and Scala 2.12).

} else {
AdminUtils.assignReplicasToBrokers(brokers, arguments.numPartitions, arguments.replicationFactor)
else if (!arguments.replicasAssignments.isEmpty) {
// Note: we don't check that replicaAssignment doesn't contain unknown brokers - unlike in add-partitions case,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: I know it's not from this patch, but the double negatives make this a bit tough to parse. I think it's just saying that we don't bother checking for unknown brokers? By the way, is there a good reason for not doing this (other than for consistency with TopicCommand)?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removed the double negative. I am guessing it's this way because you may have a broker that is down temporarily, but I am not really sure.

"if a majority of replicas do not receive a write."

val CreateTopicsPolicyClassNameDoc = "The create topics policy class that should be used for validation. The class should " +
val CreateTopicPolicyClassNameDoc = "The create topics policy class that should be used for validation. The class should " +
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you want to change the "topics" to "topic" in the comment as well?

Copy link
Copy Markdown
Contributor

@hachikuji hachikuji left a comment

Choose a reason for hiding this comment

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

LGTM

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 18, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.11/957/
Test PASSed (JDK 8 and Scala 2.11).

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 18, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.10/955/
Test PASSed (JDK 7 and Scala 2.10).

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 18, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/955/
Test PASSed (JDK 8 and Scala 2.12).

@hachikuji
Copy link
Copy Markdown
Contributor

Logging changes LGTM.

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 18, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/965/
Test PASSed (JDK 8 and Scala 2.12).

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 18, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.10/965/
Test PASSed (JDK 7 and Scala 2.10).

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 18, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.11/967/
Test PASSed (JDK 8 and Scala 2.11).

asfgit pushed a commit that referenced this pull request Jan 18, 2017
1. Added javadoc to public classes
2. Removed `s` from config name for consistency with interface name
3. The policy interface now implements Configurable and AutoCloseable as per the KIP
4. Use `null` instead of `-1` in `RequestMetadata`
5. Perform all broker validation before invoking the policy
6. Add tests

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Jason Gustafson <jason@confluent.io>

Closes #2388 from ijuma/create-topic-policy-docs-and-config-name-change

(cherry picked from commit fd6d7bc)
Signed-off-by: Ismael Juma <ismael@juma.me.uk>
@asfgit asfgit closed this in fd6d7bc Jan 18, 2017
soenkeliebau pushed a commit to soenkeliebau/kafka that referenced this pull request Feb 7, 2017
1. Added javadoc to public classes
2. Removed `s` from config name for consistency with interface name
3. The policy interface now implements Configurable and AutoCloseable as per the KIP
4. Use `null` instead of `-1` in `RequestMetadata`
5. Perform all broker validation before invoking the policy
6. Add tests

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Jason Gustafson <jason@confluent.io>

Closes apache#2388 from ijuma/create-topic-policy-docs-and-config-name-change
@ijuma ijuma deleted the create-topic-policy-docs-and-config-name-change branch September 5, 2017 09:42
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