Search in sources :

Example 1 with TestTableSchemaModel

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

the class TestSchemaResource method setUpBeforeClass.

@BeforeClass
public static void setUpBeforeClass() throws Exception {
    conf = TEST_UTIL.getConfiguration();
    conf.setBoolean(RESTServer.REST_CSRF_ENABLED_KEY, csrfEnabled);
    if (csrfEnabled) {
        conf.set(RESTServer.REST_CSRF_BROWSER_USERAGENTS_REGEX_KEY, ".*");
    }
    extraHdr = new BasicHeader(RESTServer.REST_CSRF_CUSTOM_HEADER_DEFAULT, "");
    TEST_UTIL.startMiniCluster();
    REST_TEST_UTIL.startServletContainer(conf);
    client = new Client(new Cluster().add("localhost", REST_TEST_UTIL.getServletPort()));
    testTableSchemaModel = new TestTableSchemaModel();
    context = JAXBContext.newInstance(ColumnSchemaModel.class, TableSchemaModel.class);
}
Also used : Cluster(org.apache.hadoop.hbase.rest.client.Cluster) TestTableSchemaModel(org.apache.hadoop.hbase.rest.model.TestTableSchemaModel) TableSchemaModel(org.apache.hadoop.hbase.rest.model.TableSchemaModel) TestTableSchemaModel(org.apache.hadoop.hbase.rest.model.TestTableSchemaModel) Client(org.apache.hadoop.hbase.rest.client.Client) ColumnSchemaModel(org.apache.hadoop.hbase.rest.model.ColumnSchemaModel) BasicHeader(org.apache.http.message.BasicHeader) BeforeClass(org.junit.BeforeClass)

Aggregations

Client (org.apache.hadoop.hbase.rest.client.Client)1 Cluster (org.apache.hadoop.hbase.rest.client.Cluster)1 ColumnSchemaModel (org.apache.hadoop.hbase.rest.model.ColumnSchemaModel)1 TableSchemaModel (org.apache.hadoop.hbase.rest.model.TableSchemaModel)1 TestTableSchemaModel (org.apache.hadoop.hbase.rest.model.TestTableSchemaModel)1 BasicHeader (org.apache.http.message.BasicHeader)1 BeforeClass (org.junit.BeforeClass)1