Index: 081/api.html =================================================================== --- 081/api.html (revision 1622813) +++ 081/api.html (working copy) @@ -4,8 +4,7 @@ * V: type of the message * K: type of the optional key associated with the message */ -class kafka.javaapi.producer.Producer<K,V> -{ +class kafka.javaapi.producer.Producer<K,V> { public Producer(ProducerConfig config); /** @@ -28,7 +27,7 @@ } -You can follow +You can follow this example to learn how to use the producer api.

2.2 High Level Consumer API

@@ -40,7 +39,7 @@ * @param config at the minimum, need to specify the groupid of the consumer and the zookeeper * connection string zookeeper.connect. */ - public static kafka.javaapi.consumer.ConsumerConnector createJavaConsumerConnector(config: ConsumerConfig); + public static kafka.javaapi.consumer.ConsumerConnector createJavaConsumerConnector(ConsumerConfig config); } /** @@ -57,9 +56,9 @@ * The number of items in the list is #streams. Each stream supports * an iterator over message/metadata pairs. */ - public <K,V> Map<String, List<KafkaStream<K,V>>> + public <K,V> Map<String, List<KafkaStream<K,V>>> createMessageStreams(Map<String, Integer> topicCountMap, Decoder<K> keyDecoder, Decoder<V> valueDecoder); - + /** * Create a list of message streams of type T for each topic, using the default decoder. */ @@ -76,14 +75,14 @@ * @return a list of KafkaStream. Each stream supports an * iterator over its MessageAndMetadata elements. */ - public <K,V> List<KafkaStream<K,V>> + public <K,V> List<KafkaStream<K,V>> createMessageStreamsByFilter(TopicFilter topicFilter, int numStreams, Decoder<K> keyDecoder, Decoder<V> valueDecoder); - + /** * Create a list of message streams for topics matching a wildcard, using the default decoder. */ public List<KafkaStream<byte[], byte[]>> createMessageStreamsByFilter(TopicFilter topicFilter, int numStreams); - + /** * Create a list of message streams for topics matching a wildcard, using the default decoder, with one stream. */ @@ -101,7 +100,7 @@ } -You can follow +You can follow this example to learn how to use the high level consumer api.

2.3 Simple Consumer API

@@ -112,15 +111,15 @@
    *  @param request specifies the topic name, topic partition, starting byte offset, maximum bytes to be fetched.
    *  @return a set of fetched messages
    */
-  public FetchResponse fetch(request: kafka.javaapi.FetchRequest);
+  public FetchResponse fetch(kafka.javaapi.FetchRequest request);
 
   /**
    *  Fetch metadata for a sequence of topics.
-   *  
+   *
    *  @param request specifies the versionId, clientId, sequence of topics.
    *  @return metadata for each topic in the request.
    */
-  public kafka.javaapi.TopicMetadataResponse send(request: kafka.javaapi.TopicMetadataRequest);
+  public kafka.javaapi.TopicMetadataResponse send(kafka.javaapi.TopicMetadataRequest request);
 
   /**
    *  Get a list of valid offsets (up to maxSize) before the given time.
@@ -128,7 +127,7 @@
    *  @param request a [[kafka.javaapi.OffsetRequest]] object.
    *  @return a [[kafka.javaapi.OffsetResponse]] object.
    */
-  public kafka.javaapi.OffsetResponse getOffsetsBefore(request: OffsetRequest);
+  public kafka.javaapi.OffsetResponse getOffsetsBefore(OffsetRequest request);
 
   /**
    * Close the SimpleConsumer.
@@ -146,4 +145,4 @@
 
 

Usage information on the hadoop consumer can be found here. -

\ No newline at end of file +