kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Akhilesh Naidu <akhilesh_na...@persistent.com>
Subject [DISCUSS]- JIRA ISSUE KAFKA-4566 : Can't Symlink to Kafka bins
Date Tue, 24 Jan 2017 14:01:53 GMT

The bug deals with the problem one encounters in case if the script 'kafka-console-consumer.sh'
is executed
through a symlink which could be placed on a different location on disk

The initial suggestion provided in the bug was to make changes in the below line
exec $(dirname $0)/kafka-run-class.sh kafka.tools.ConsoleConsumer "$@"

to replace it to
"$(dirname "$(readlink -e "$0")")"

But as commented in the bug earlier,
the above would be OS dependent as MacOS version of readlink does not have an -e option.

1) One approach could be to simulate the working of the readlink function, in a portable manner.
I have a working patch for this.
The details are available in the comment link

2) Now seeing that the other scripts in the 'kafka/bin/' location also could have similar
calls from symlink
I tried moving the function snippet into a separate utilities file, in order to reuse,
but if we intend to include the utilities file in all the scripts we need to have the exact
base location to our utilities file,
which is what we wrote our function in the first place for [☹] .
So the only option seems to duplicate the function code in all required scripts.

Any suggestions on how to go about the above.



This e-mail may contain privileged and confidential information which is the property of Persistent
Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed.
If you are not the intended recipient, you are not authorized to read, retain, copy, print,
distribute or use this message. If you have received this communication in error, please notify
the sender and delete all copies of this message. Persistent Systems Ltd. does not accept
any liability for virus infected mails.

  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message