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

MINOR: Add explicit result type in public defs/vals #7993

Merged
merged 1 commit into from Jan 30, 2020

Conversation

highluck
Copy link
Contributor

specifying the type will reduce mistakes.

Committer Checklist (excluded from commit message)

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

Copy link
Contributor

@ijuma ijuma left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, one comment.

@volatile var apiLocalCompleteTimeNanos: Long = -1L
@volatile var responseCompleteTimeNanos: Long = -1L
@volatile var responseDequeueTimeNanos: Long = -1L
@volatile var apiRemoteCompleteTimeNanos: Long = -1L
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think the type adds much for cases where a literal is used.

@ijuma
Copy link
Contributor

ijuma commented Jan 28, 2020

ok to test

@ijuma
Copy link
Contributor

ijuma commented Jan 28, 2020

ok to test

@highluck highluck requested a review from ijuma January 28, 2020 23:16
@ijuma
Copy link
Contributor

ijuma commented Jan 28, 2020

ok to test

Copy link
Contributor

@ijuma ijuma left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -29,12 +29,12 @@ class KafkaMetricsConfig(props: VerifiableProperties) {
* Comma-separated list of reporter types. These classes should be on the
* classpath and will be instantiated at run-time.
*/
val reporters = CoreUtils.parseCsvList(props.getString(KafkaConfig.KafkaMetricsReporterClassesProp,
val reporters: Seq[String] = CoreUtils.parseCsvList(props.getString(KafkaConfig.KafkaMetricsReporterClassesProp,
Copy link
Contributor

Choose a reason for hiding this comment

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

The Scala 2.13 build failed due to this change. To make it work, you need to add import scala.collection.Seq.

@highluck
Copy link
Contributor Author

@ijuma
Thank you
i'm code update!

@highluck highluck requested a review from ijuma January 29, 2020 10:17
@ijuma
Copy link
Contributor

ijuma commented Jan 29, 2020

ok to test

@highluck
Copy link
Contributor Author

@ijuma
retest this please

@ijuma
Copy link
Contributor

ijuma commented Jan 29, 2020

ok to test

@highluck
Copy link
Contributor Author

@ijuma
Thank you!
But Build is not triggered ㅜㅜ

@ijuma
Copy link
Contributor

ijuma commented Jan 30, 2020

retest this please

@ijuma
Copy link
Contributor

ijuma commented Jan 30, 2020

ok to test

@ijuma ijuma changed the title MINOR: scala explicit type MINOR: Add explicit result type in public defs/vals Jan 30, 2020
@ijuma
Copy link
Contributor

ijuma commented Jan 30, 2020

A few flaky test failures that are clearly unrelated since this PR did not change any behavior (just added type annotations).

Copy link
Contributor

@ijuma ijuma left a comment

Choose a reason for hiding this comment

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

LGTM

@ijuma ijuma merged commit fa7047a into apache:trunk Jan 30, 2020
@highluck
Copy link
Contributor Author

@ijuma Thank you

@highluck highluck deleted the typesafe branch January 31, 2020 07:10
ijuma added a commit to confluentinc/kafka that referenced this pull request Feb 2, 2020
Conflicts and/or compiler errors due to the fact that we
temporarily reverted the commit that removes
Scala 2.11 support:

* SslAdminIntegrationTest: keep using JAdminClient,
take upstream changes otherwise.
* ReassignPartitionsClusterTest: keep using
JAdminClient, take upstream changes otherwise.
* KafkaApis: use `asScala.foreach` instead of
`forEach`.

# By Ismael Juma (3) and others
# Via GitHub
* apache-github/trunk: (22 commits)
  KAFKA-9437; Make the Kafka Protocol Friendlier with L7 Proxies [KIP-559] (apache#7994)
  KAFKA-9375: Add names to all Connect threads (apache#7901)
  MINOR: Introduce 2.5-IV0 IBP (apache#8010)
  KAFKA-8503; Add default api timeout to AdminClient (KIP-533) (apache#8011)
  Add retries to release.py script (apache#8021)
  KAFKA-8162: IBM JDK Class not found error when handling SASL (apache#6524)
  MINOR: Add explicit result type in public defs/vals (apache#7993)
  KAFKA-9408: Use StandardCharsets.UTF-8 instead of "UTF-8" (apache#7940)
  KAFKA-9474: Adds 'float64' to the RPC protocol types (apache#8012)
  KAFKA-9360: Allow disabling MM2 heartbeat and checkpoint emissions (apache#7887)
  KAFKA-7658: Add KStream#toTable to the Streams DSL (apache#7985)
  KAFKA-9445: Allow adding changes to allow serving from a specific partition (apache#7984)
  KAFKA-9422: Track the set of topics a connector is using (KIP-558) (apache#8017)
  KAFKA-9040; Add --all option to config command (apache#7607)
  KAFKA-4203: Align broker default for max.message.bytes with Java producer default (apache#4154)
  KAFKA-9426: Use switch instead of chained if/else in OffsetsForLeaderEpochClient (apache#7959)
  KAFKA-9405: Use Map.computeIfAbsent where applicable (apache#7937)
  KAFKA-9026: Use automatic RPC generation in DescribeAcls (apache#7560)
  MINOR: Remove unused fields in StreamsMetricsImpl (apache#7992)
  KAFKA-9460: Enable only TLSv1.2 by default and disable other TLS protocol versions (KIP-553) (apache#7998)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants