public class RetrieveCountsHandler extends AbstractHttpServiceHandler
| Constructor and Description |
|---|
RetrieveCountsHandler(WordCount.WordCountConfig config) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configure() |
void |
getAssoc(HttpServiceRequest request,
HttpServiceResponder responder,
String word1,
String word2)
Returns the count of associations for a specific word pair.
|
void |
getCount(HttpServiceRequest request,
HttpServiceResponder responder,
String word,
Integer limit)
Returns the count for a specific word and its word associations, up to the specified limit or
a pre-set limit of ten if not specified.
|
void |
getCounts(HttpServiceRequest request,
HttpServiceResponder responder)
Returns the counts for all words in the input.
|
void |
getMultiCounts(HttpServiceRequest request,
HttpServiceResponder responder)
Returns the counts for all words in the input.
|
void |
getStats(HttpServiceRequest request,
HttpServiceResponder responder)
Returns total number of words, the number of unique words, and the average word length.
|
void |
initialize(HttpServiceContext context) |
configure, destroy, getConfigurer, getContext, setProperties, useDatasets, useDatasetsusePlugin, usePlugin, usePluginClass, usePluginClassaddDatasetModule, addDatasetType, addStream, addStream, createDataset, createDataset, createDataset, createDatasetpublic RetrieveCountsHandler(WordCount.WordCountConfig config)
protected void configure()
configure in class AbstractHttpServiceHandlerpublic void initialize(HttpServiceContext context) throws Exception
initialize in interface HttpServiceHandlerinitialize in class AbstractHttpServiceHandlerExceptionpublic void getStats(HttpServiceRequest request, HttpServiceResponder responder)
public void getCount(HttpServiceRequest request, HttpServiceResponder responder, String word, Integer limit)
public void getCounts(HttpServiceRequest request, HttpServiceResponder responder)
public void getMultiCounts(HttpServiceRequest request, HttpServiceResponder responder)
This endpoint method differs from getCounts(HttpServiceRequest,HttpServiceResponder)
in using KeyValueTable.readAll(byte[][]) to perform a batched read.
public void getAssoc(HttpServiceRequest request, HttpServiceResponder responder, String word1, String word2)
Copyright © 2015 Cask Data, Inc. Licensed under the Apache License, Version 2.0.