Package org.apache.hadoop.hbase.stargate.model

Examples of org.apache.hadoop.hbase.stargate.model.StorageClusterVersionModel


    }
    servlet.getMetrics().incrementRequests(1);
    HBaseConfiguration conf = servlet.getConfiguration();
    try {
      HBaseAdmin admin = new HBaseAdmin(conf);
      StorageClusterVersionModel model = new StorageClusterVersionModel();
      model.setVersion(admin.getClusterStatus().getHBaseVersion());
      ResponseBuilder response = Response.ok(model);
      response.cacheControl(cacheControl);
      return response.build();
    } catch (IOException e) {
      throw new WebApplicationException(e,
View Full Code Here


    }
    try {
      RESTServlet server = RESTServlet.getInstance();
      HBaseConfiguration hconf = server.getConfiguration();
      HBaseAdmin admin = new HBaseAdmin(hconf);
      StorageClusterVersionModel model = new StorageClusterVersionModel();
      model.setVersion(admin.getClusterStatus().getHBaseVersion());
      ResponseBuilder response = Response.ok(model);
      response.cacheControl(cacheControl);
      return response.build();
    } catch (IOException e) {
      throw new WebApplicationException(e,
View Full Code Here

  public void testGetStorageClusterVersionXML() throws IOException,
      JAXBException {
    Response response =
      client.get(Constants.PATH_VERSION_CLUSTER, MIMETYPE_XML);
    assertTrue(response.getCode() == 200);
    StorageClusterVersionModel clusterVersionModel =
      (StorageClusterVersionModel)
        context.createUnmarshaller().unmarshal(
          new ByteArrayInputStream(response.getBody()));
    assertNotNull(clusterVersionModel);
    assertNotNull(clusterVersionModel.getVersion());
    LOG.info("success retrieving storage cluster version as XML");
  }
View Full Code Here

  public void testGetStorageClusterVersionXML() throws IOException,
      JAXBException {
    Response response = client.get("/version/cluster", MIMETYPE_XML);
    assertTrue(response.getCode() == 200);
    StorageClusterVersionModel clusterVersionModel =
      (StorageClusterVersionModel)
        context.createUnmarshaller().unmarshal(
          new ByteArrayInputStream(response.getBody()));
    assertNotNull(clusterVersionModel);
    assertNotNull(clusterVersionModel.getVersion());
    LOG.info("success retrieving storage cluster version as XML");
  }
View Full Code Here

      LOG.debug("GET " + uriInfo.getAbsolutePath());
    }
    servlet.getMetrics().incrementRequests(1);
    try {
      HBaseAdmin admin = new HBaseAdmin(servlet.getConfiguration());
      StorageClusterVersionModel model = new StorageClusterVersionModel();
      model.setVersion(admin.getClusterStatus().getHBaseVersion());
      ResponseBuilder response = Response.ok(model);
      response.cacheControl(cacheControl);
      return response.build();
    } catch (IOException e) {
      throw new WebApplicationException(e,
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.stargate.model.StorageClusterVersionModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.