use of org.apache.hadoop.hbase.rest.client.Response in project hbase by apache.
the class TestTableResource method testTableInfoXML.
@Test
public void testTableInfoXML() throws IOException, JAXBException {
Response response = client.get("/" + TABLE + "/regions", Constants.MIMETYPE_XML);
assertEquals(200, response.getCode());
assertEquals(Constants.MIMETYPE_XML, response.getHeader("content-type"));
TableInfoModel model = (TableInfoModel) context.createUnmarshaller().unmarshal(new ByteArrayInputStream(response.getBody()));
checkTableInfo(model);
}
use of org.apache.hadoop.hbase.rest.client.Response in project hbase by apache.
the class TestTableResource method testTableInfoText.
@Test
public void testTableInfoText() throws IOException {
Response response = client.get("/" + TABLE + "/regions", Constants.MIMETYPE_TEXT);
assertEquals(200, response.getCode());
assertEquals(Constants.MIMETYPE_TEXT, response.getHeader("content-type"));
}
use of org.apache.hadoop.hbase.rest.client.Response in project hbase by apache.
the class TestTableResource method testTableListText.
@Test
public void testTableListText() throws IOException {
Response response = client.get("/", Constants.MIMETYPE_TEXT);
assertEquals(200, response.getCode());
assertEquals(Constants.MIMETYPE_TEXT, response.getHeader("content-type"));
}
use of org.apache.hadoop.hbase.rest.client.Response in project hbase by apache.
the class TestTableResource method testTableInfoJSON.
@Test
public void testTableInfoJSON() throws IOException {
Response response = client.get("/" + TABLE + "/regions", Constants.MIMETYPE_JSON);
assertEquals(200, response.getCode());
assertEquals(Constants.MIMETYPE_JSON, response.getHeader("content-type"));
}
use of org.apache.hadoop.hbase.rest.client.Response in project hbase by apache.
the class TestVersionResource method testGetStargateVersionPB.
@Test
public void testGetStargateVersionPB() throws IOException {
Response response = client.get("/version", Constants.MIMETYPE_PROTOBUF);
assertEquals(200, response.getCode());
assertEquals(Constants.MIMETYPE_PROTOBUF, response.getHeader("content-type"));
VersionModel model = new VersionModel();
model.getObjectFromMessage(response.getBody());
validate(model);
response = client.get("/version", Constants.MIMETYPE_PROTOBUF_IETF);
assertEquals(200, response.getCode());
assertEquals(Constants.MIMETYPE_PROTOBUF_IETF, response.getHeader("content-type"));
model = new VersionModel();
model.getObjectFromMessage(response.getBody());
validate(model);
}
Aggregations