@Singleton @Path(value="/assign") public final class Assign extends AbstractOryxResource
Responds to a GET request to /assign/[datum]
, or a POST to /assign
containing several data points, one on each line. The inputs are data points to cluster,
delimited, like "1,foo,3.0".
The response body contains the result of clustering -- the IDs of the assigned clusters -- one for each input data point, one per line.
INPUT_PRODUCER_KEY, MODEL_MANAGER_KEY
Constructor and Description |
---|
Assign() |
Modifier and Type | Method and Description |
---|---|
String |
get(String datum) |
List<String> |
post(javax.servlet.http.HttpServletRequest request) |
List<String> |
post(Reader reader) |
check, check, checkExists, checkNotReadOnly, getServingModel, isReadOnly, maybeBuffer, maybeBuffer, maybeDecompress, parseMultipart, sendInput
getInputProducer, getServingModelManager, init
@GET @Path(value="{datum}") @Produces(value={"text/plain","text/csv","application/json"}) public String get(@PathParam(value="datum") String datum) throws OryxServingException
OryxServingException
@POST @Consumes(value={"text/plain","text/csv","application/json"}) @Produces(value={"text/plain","text/csv","application/json"}) public List<String> post(Reader reader) throws IOException, OryxServingException
IOException
OryxServingException
@POST @Consumes(value="multipart/form-data") @Produces(value={"text/plain","text/csv","application/json"}) public List<String> post(@Context javax.servlet.http.HttpServletRequest request) throws IOException, OryxServingException
IOException
OryxServingException
Copyright © 2014–2018. All rights reserved.