Search in sources :

Example 1 with TestNamespacesInstanceModel

use of org.apache.hadoop.hbase.rest.model.TestNamespacesInstanceModel in project hbase by apache.

the class TestNamespacesInstanceResource method setUpBeforeClass.

@BeforeClass
public static void setUpBeforeClass() throws Exception {
    conf = TEST_UTIL.getConfiguration();
    TEST_UTIL.startMiniCluster();
    REST_TEST_UTIL.startServletContainer(conf);
    client = new Client(new Cluster().add("localhost", REST_TEST_UTIL.getServletPort()));
    testNamespacesInstanceModel = new TestNamespacesInstanceModel();
    context = JAXBContext.newInstance(NamespacesInstanceModel.class, TableListModel.class);
    jsonMapper = new JacksonJaxbJsonProvider().locateMapper(NamespacesInstanceModel.class, MediaType.APPLICATION_JSON_TYPE);
    NAMESPACE1_PROPS.put("key1", "value1");
    NAMESPACE2_PROPS.put("key2a", "value2a");
    NAMESPACE2_PROPS.put("key2b", "value2b");
    NAMESPACE3_PROPS.put("key3", "value3");
    NAMESPACE4_PROPS.put("key4a", "value4a");
    NAMESPACE4_PROPS.put("key4b", "value4b");
}
Also used : TestNamespacesInstanceModel(org.apache.hadoop.hbase.rest.model.TestNamespacesInstanceModel) NamespacesInstanceModel(org.apache.hadoop.hbase.rest.model.NamespacesInstanceModel) TableListModel(org.apache.hadoop.hbase.rest.model.TableListModel) TestNamespacesInstanceModel(org.apache.hadoop.hbase.rest.model.TestNamespacesInstanceModel) Cluster(org.apache.hadoop.hbase.rest.client.Cluster) JacksonJaxbJsonProvider(org.apache.hbase.thirdparty.com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider) Client(org.apache.hadoop.hbase.rest.client.Client) BeforeClass(org.junit.BeforeClass)

Aggregations

Client (org.apache.hadoop.hbase.rest.client.Client)1 Cluster (org.apache.hadoop.hbase.rest.client.Cluster)1 NamespacesInstanceModel (org.apache.hadoop.hbase.rest.model.NamespacesInstanceModel)1 TableListModel (org.apache.hadoop.hbase.rest.model.TableListModel)1 TestNamespacesInstanceModel (org.apache.hadoop.hbase.rest.model.TestNamespacesInstanceModel)1 JacksonJaxbJsonProvider (org.apache.hbase.thirdparty.com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider)1 BeforeClass (org.junit.BeforeClass)1