1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.hadoop.hbase.rest;
22
23 import java.io.IOException;
24
25 import javax.ws.rs.Path;
26 import javax.ws.rs.PathParam;
27 import javax.ws.rs.QueryParam;
28
29 public class TableResource extends ResourceBase {
30
31 String table;
32
33
34
35
36
37
38 public TableResource(String table) throws IOException {
39 super();
40 this.table = table;
41 }
42
43 @Path("exists")
44 public ExistsResource getExistsResource() throws IOException {
45 return new ExistsResource(table);
46 }
47
48 @Path("regions")
49 public RegionsResource getRegionsResource() throws IOException {
50 return new RegionsResource(table);
51 }
52
53 @Path("scanner")
54 public ScannerResource getScannerResource() throws IOException {
55 return new ScannerResource(table);
56 }
57
58 @Path("schema")
59 public SchemaResource getSchemaResource() throws IOException {
60 return new SchemaResource(table);
61 }
62
63 @Path("{rowspec: .+}")
64 public RowResource getRowResource(
65 final @PathParam("rowspec") String rowspec,
66 final @QueryParam("v") String versions) throws IOException {
67 return new RowResource(table, rowspec, versions);
68 }
69 }