Skip to content

MINOR: Fix FileStreamSourceTask to create the reader around System.in when using stdin as the input source.#251

Closed
ewencp wants to merge 1 commit into
apache:trunkfrom
ewencp:minor-fix-filestream-stdin-source
Closed

MINOR: Fix FileStreamSourceTask to create the reader around System.in when using stdin as the input source.#251
ewencp wants to merge 1 commit into
apache:trunkfrom
ewencp:minor-fix-filestream-stdin-source

Conversation

@ewencp

@ewencp ewencp commented Sep 28, 2015

Copy link
Copy Markdown
Contributor

No description provided.

@ewencp

ewencp commented Sep 28, 2015

Copy link
Copy Markdown
Contributor Author

@gwenshap This is a trivial fix -- in the special case of System.in, I was missing creating the BufferedReader that wraps the InputStream. I'd like to have a unit test for this, but there doesn't seem to be a good way to do it aside from using Whitebox to validate the reader is non-null -- ideas for adding a test would be welcome.

@asfbot

asfbot commented Sep 28, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #572 FAILURE
Looks like there's a problem with this pull request

@ijuma

ijuma commented Sep 28, 2015

Copy link
Copy Markdown
Member

Out of curiosity, why do we set-up the stream in start for the special-case of System.in instead of in poll like in the common case? It seems to me like this kind of bug would be less likely of both paths were closer together instead of far apart.

@asfgit asfgit closed this in e90562f Sep 28, 2015
@gwenshap

Copy link
Copy Markdown
Contributor

LGTM.

efeg added a commit to efeg/kafka that referenced this pull request Jan 29, 2020
blcksrx pushed a commit to blcksrx/kafka that referenced this pull request Feb 15, 2020
In addition to reapplying the original commit:

* Reapplied all related changes that were reverted in
subsequent merges from Apache Kafka due to
Scala 2.11 support.. I identified the changes via
plain old `diff` between Apache Kafka and this
repository.
* Removed Scala 2.11 build from Jenkinsfile.

Original commit description:
 
* Adjust build and documentation.
* Use lambda syntax for SAM types in `core`, `streams-scala` and
`connect-runtime` modules.
* Remove `runnable` and `newThread` from `CoreUtils` as lambda
syntax for SAM types make them unnecessary.
* Remove stale comment in `FunctionsCompatConversions`,
`KGroupedStream`, `KGroupedTable' and `KStream` about Scala 2.11,
the conversions are needed for Scala 2.12 too.
* Deprecate `org.apache.kafka.streams.scala.kstream.Suppressed`
and use `org.apache.kafka.streams.kstream.Suppressed` instead.
* Use `Admin.create` instead of `AdminClient.create`. Static methods
in Java interfaces can be invoked since Scala 2.12. I noticed that
MirrorMaker 2 uses `AdminClient.create`, but I did not change them
as Connectors have restrictions on newer client APIs.
* Improve efficiency in a few `Gauge` implementations by avoiding
unnecessary intermediate collections.
* Remove pointless `Option.apply` in `ZookeeperClient`
`SessionState` metric.
* Fix unused import/variable and other compiler warnings.
* Reduce visibility of some vals/defs.

Reviewers: Manikumar Reddy <manikumar@confluent.io>, Guozhang Wang <wangguoz@gmail.com>, Gwen Shapira <gwen@confluent.io>, Lucas Bradstreet <lucas@confluent.io>
wyuka added a commit to wyuka/kafka that referenced this pull request Jan 21, 2022
… response size distribution (apache#251)

Original PR: apache#218

TICKET = LIKAFKA-39573
LI_DESCRIPTION =
Currently, Kafka emits a metric to show the rate of MetadataRequests.

However, not all metadata requests are equal. If the topics field of the MetadataRequest is null, it indicates that the MetadataRequest is requesting the metadata for all topics. In this PR, we add a new metric to indicate the rate of the topics=null MetadataRequests.

Besides, we are adding another metric to show the size distribution of Metadata Responses sent back
to clients. This will help us identify brokers that are overloaded with large Metadata responses.

EXIT_CRITERIA = When this change is merged in upstream kafka and pulled into this repo.

Co-authored-by: Lucas Wang <luwang@linkedin.com>
wyuka added a commit to wyuka/kafka that referenced this pull request Mar 4, 2022
… response size distribution (apache#251)

Original PR: apache#218

TICKET = LIKAFKA-39573
LI_DESCRIPTION =
Currently, Kafka emits a metric to show the rate of MetadataRequests.

However, not all metadata requests are equal. If the topics field of the MetadataRequest is null, it indicates that the MetadataRequest is requesting the metadata for all topics. In this PR, we add a new metric to indicate the rate of the topics=null MetadataRequests.

Besides, we are adding another metric to show the size distribution of Metadata Responses sent back
to clients. This will help us identify brokers that are overloaded with large Metadata responses.

EXIT_CRITERIA = When this change is merged in upstream kafka and pulled into this repo.

Co-authored-by: Lucas Wang <luwang@linkedin.com>
wyuka added a commit to wyuka/kafka that referenced this pull request Mar 28, 2022
… response size distribution (apache#251)

Original PR: apache#218

TICKET = LIKAFKA-39573
LI_DESCRIPTION =
Currently, Kafka emits a metric to show the rate of MetadataRequests.

However, not all metadata requests are equal. If the topics field of the MetadataRequest is null, it indicates that the MetadataRequest is requesting the metadata for all topics. In this PR, we add a new metric to indicate the rate of the topics=null MetadataRequests.

Besides, we are adding another metric to show the size distribution of Metadata Responses sent back
to clients. This will help us identify brokers that are overloaded with large Metadata responses.

EXIT_CRITERIA = When this change is merged in upstream kafka and pulled into this repo.

Co-authored-by: Lucas Wang <luwang@linkedin.com>
wyuka added a commit to wyuka/kafka that referenced this pull request Jun 16, 2022
… response size distribution (apache#251)

Original PR: apache#218

TICKET = LIKAFKA-39573
LI_DESCRIPTION =
Currently, Kafka emits a metric to show the rate of MetadataRequests.

However, not all metadata requests are equal. If the topics field of the MetadataRequest is null, it indicates that the MetadataRequest is requesting the metadata for all topics. In this PR, we add a new metric to indicate the rate of the topics=null MetadataRequests.

Besides, we are adding another metric to show the size distribution of Metadata Responses sent back
to clients. This will help us identify brokers that are overloaded with large Metadata responses.

EXIT_CRITERIA = When this change is merged in upstream kafka and pulled into this repo.

Co-authored-by: Lucas Wang <luwang@linkedin.com>
udaynpusa pushed a commit to mapr/kafka that referenced this pull request Jan 30, 2024
davide-armand pushed a commit to aiven/kafka that referenced this pull request Dec 1, 2025
Signed-off-by: Greg Harris <greg.harris@aiven.io>
jeqo pushed a commit to aiven/kafka that referenced this pull request Jan 16, 2026
Signed-off-by: Greg Harris <greg.harris@aiven.io>
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.

4 participants