The GetOffsetShell utility still uses the SimpleConsumer, so I don't think
there's a way to use it with Kerberos. The new consumer doesn't expose all
the APIs that SimpleConsumer does, so I don't think the tool can be
converted to the new consumer yet.

-Ewen

On Wed, Jul 6, 2016 at 11:02 AM, Prabhu V <vpra...@gmail.com> wrote:

> Hi,
>
> Does the kafka.tools.GetOffsetShell utility work with a kerberized kafka
> cluster ?
>
> I doubt that it uses the old consumer which does not work with kerberos and
> hence cannot be used with kerberos.
>
> Is there a utlity that has this functionality in a kerberized cluster ?
>
> I currently do this by the following code on the new consumer. Let me know
> if there is a better way.
>
> partsTopic is a array of TopicPartition
>
> consumer.assign(Arrays.asList(partsTopic));
> consumer.seekToEnd(partsTopic);
>
> for (TopicPartition partTopic : partsTopic) {
>             log.info(String.format("%s, offset - %s",
> partTopic.toString(),
>                     consumer.position(partTopic)));
> }
>
>
> Thanks,
> Prabhu
>



-- 
Thanks,
Ewen

Reply via email to