You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by liu brent <li...@gmail.com> on 2012/04/17 11:16:37 UTC
How to import ImmutableMap in quick start?
Hi,
In http://incubator.apache.org/kafka/quickstart.html, there is a line:
Map<String, List<KafkaMessageStream<Message>>> topicMessageStreams =
connector.createMessageStreams(ImmutableMap.of("test", 4));
But I do not know how to import ImmutableMap. Do we need to a package?
Thanks,
Brent
Re: How to import ImmutableMap in quick start?
Posted by Jun Rao <ju...@gmail.com>.
That api is for scala users. If you are a java user,
use kafka.javaapi.consumer.ConsumerConnector instead.
Thanks,
Jun
On Tue, Apr 17, 2012 at 2:16 AM, liu brent <li...@gmail.com> wrote:
> Hi,
> In http://incubator.apache.org/kafka/quickstart.html, there is a line:
> Map<String, List<KafkaMessageStream<Message>>> topicMessageStreams =
> connector.createMessageStreams(ImmutableMap.of("test", 4));
> But I do not know how to import ImmutableMap. Do we need to a package?
>
> Thanks,
> Brent
>
Re: How to import ImmutableMap in quick start?
Posted by Jay Kreps <ja...@gmail.com>.
ImmutableMap is a google collections or Guava class. Any map will work.
-Jay
On Tue, Apr 17, 2012 at 2:16 AM, liu brent <li...@gmail.com> wrote:
> Hi,
> In http://incubator.apache.org/kafka/quickstart.html, there is a line:
> Map<String, List<KafkaMessageStream<Message>>> topicMessageStreams =
> connector.createMessageStreams(ImmutableMap.of("test", 4));
> But I do not know how to import ImmutableMap. Do we need to a package?
>
> Thanks,
> Brent
>