Class ReaderResouce
- java.lang.Object
-
- org.apache.nutch.service.resources.ReaderResouce
-
@Path("/reader") public class ReaderResouce extends ObjectThe Reader endpoint enables a user to read sequence files, nodes and links from the Nutch webgraph.- Author:
- Sujen Shah
-
-
Constructor Summary
Constructors Constructor Description ReaderResouce()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.ResponselinkRead()Get Link Reader response schemajavax.ws.rs.core.ResponselinkRead(ReaderConfig readerConf, int nrows, int start, int end, boolean count)Read link objectjavax.ws.rs.core.ResponsenodeRead()Get schema of the Node objectjavax.ws.rs.core.ResponsenodeRead(ReaderConfig readerConf, int nrows, int start, int end, boolean count)Read Node object as stored in the Nutch Webgraphjavax.ws.rs.core.ResponseseqRead(ReaderConfig readerConf, int nrows, int start, int end, boolean count)Read a sequence file
-
-
-
Method Detail
-
seqRead
@Path("/sequence/read") @POST @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response seqRead(ReaderConfig readerConf, @DefaultValue("-1") @QueryParam("nrows") int nrows, @DefaultValue("-1") @QueryParam("start") int start, @QueryParam("end") int end, @QueryParam("count") boolean count)Read a sequence file- Parameters:
readerConf- A initializedReaderConfignrows- Number of rows to read. If not specified all rows will be readstart- Specify a starting line number to read the file fromend- The line number to read the file tillcount- Boolean value. If true, this endpoint will return the number of lines in the line- Returns:
- Appropriate HTTP response based on the query
-
linkRead
@Path("/link") @GET @Produces("application/json") public javax.ws.rs.core.Response linkRead()Get Link Reader response schema- Returns:
- JSON object specifying the schema of the responses returned by the Link Reader
-
linkRead
@Path("/link/read") @POST @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response linkRead(ReaderConfig readerConf, @DefaultValue("-1") @QueryParam("nrows") int nrows, @DefaultValue("-1") @QueryParam("start") int start, @QueryParam("end") int end, @QueryParam("count") boolean count)Read link object- Parameters:
readerConf- A initializedReaderConfignrows- Number of rows to read. If not specified all rows will be readstart- Specify a starting line number to read the file fromend- The line number to read the file tillcount- Boolean value. If true, this endpoint will return the number of lines in the line- Returns:
- Appropriate HTTP response based on the query
-
nodeRead
@Path("/node") @GET @Produces("application/json") public javax.ws.rs.core.Response nodeRead()Get schema of the Node object- Returns:
- JSON object specifying the schema of the responses returned by the Node Reader
-
nodeRead
@Path("/node/read") @POST @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response nodeRead(ReaderConfig readerConf, @DefaultValue("-1") @QueryParam("nrows") int nrows, @DefaultValue("-1") @QueryParam("start") int start, @QueryParam("end") int end, @QueryParam("count") boolean count)Read Node object as stored in the Nutch Webgraph- Parameters:
readerConf- A initializedReaderConfignrows- Number of rows to read. If not specified all rows will be readstart- Specify a starting line number to read the file fromend- The line number to read the file tillcount- Boolean value. If true, this endpoint will return the number of lines in the line- Returns:
- Appropriate HTTP response based on the query
-
-