You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/11/23 15:50:39 UTC

[GitHub] [kafka] tombentley opened a new pull request #9644: KAFKA-10565: Only print console producer prompt with a tty

tombentley opened a new pull request #9644:
URL: https://github.com/apache/kafka/pull/9644


   This fixes https://issues.apache.org/jira/browse/KAFKA-2955 by using `System.console` to determine whether we're connected to a TTY before printing the `kafka-console-producer.sh` prompt. That's not a perfect solution (since stdin might be connected to the tty but not stdout, or vice versa), but it's still better that printing many prompts when reading from a pipe.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] tombentley commented on pull request #9644: KAFKA-10565: Only print console producer prompt with a tty

Posted by GitBox <gi...@apache.org>.
tombentley commented on pull request #9644:
URL: https://github.com/apache/kafka/pull/9644#issuecomment-733615294


   @chia7712 what's the use case for when you'd need to override the effects of using `System.console`? It would require a KIP, so adding a config is quite a lot more effort and I can't immediately see the benefit, but maybe you have something in mind.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] chia7712 commented on pull request #9644: KAFKA-10565: Only print console producer prompt with a tty

Posted by GitBox <gi...@apache.org>.
chia7712 commented on pull request #9644:
URL: https://github.com/apache/kafka/pull/9644#issuecomment-733429060


   @tombentley Thanks for your testing. Is it worth having a configuration to disable/enable to print prompt? The check of ```System.console``` is useful and the configuration make it more flexible. WDYT?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] chia7712 commented on pull request #9644: KAFKA-10565: Only print console producer prompt with a tty

Posted by GitBox <gi...@apache.org>.
chia7712 commented on pull request #9644:
URL: https://github.com/apache/kafka/pull/9644#issuecomment-732534529


   > I couldn't find a good way to test it except manually.
   
   @tombentley Could you attach the console screenshot ? I will test this PR manually later. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] tombentley commented on pull request #9644: KAFKA-10565: Only print console producer prompt with a tty

Posted by GitBox <gi...@apache.org>.
tombentley commented on pull request #9644:
URL: https://github.com/apache/kafka/pull/9644#issuecomment-732818451


   @chia7712 current behaviour:
   
   ![Screenshot from 2020-11-24 10-40-59](https://user-images.githubusercontent.com/879487/100084196-5db82300-2e42-11eb-9e81-0bfd864c8255.png)
   
   
   With this patch:
   ![Screenshot from 2020-11-24 10-45-06](https://user-images.githubusercontent.com/879487/100084368-96f09300-2e42-11eb-9df8-a80e28b10e3c.png)
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] tombentley commented on pull request #9644: KAFKA-10565: Only print console producer prompt with a tty

Posted by GitBox <gi...@apache.org>.
tombentley commented on pull request #9644:
URL: https://github.com/apache/kafka/pull/9644#issuecomment-732247526


   @chia7712 might you be able to review this? It's trivial, but I couldn't find a good way to test it except manually.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] chia7712 merged pull request #9644: KAFKA-10565: Only print console producer prompt with a tty

Posted by GitBox <gi...@apache.org>.
chia7712 merged pull request #9644:
URL: https://github.com/apache/kafka/pull/9644


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org