Java 类org.apache.hadoop.hbase.rest.model.TableListModel 实例源码

项目:ditb    文件:TestNamespacesInstanceResource.java   
@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 JacksonProvider()
  .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");
}
项目:hbase    文件:TestNamespacesInstanceResource.java   
@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");
}
项目:ditb    文件:RemoteAdmin.java   
/**
 * @return string representing the cluster's version
 * @throws IOException
 *           if the endpoint does not exist, there is a timeout, or some other
 *           general failure mode
 */
public TableListModel getTableList() throws IOException {

  StringBuilder path = new StringBuilder();
  path.append('/');
  if (accessToken != null) {
    path.append(accessToken);
    path.append('/');
  }

  int code = 0;
  for (int i = 0; i < maxRetries; i++) {
    // Response response = client.get(path.toString(),
    // Constants.MIMETYPE_XML);
    Response response = client.get(path.toString(),
        Constants.MIMETYPE_PROTOBUF);
    code = response.getCode();
    switch (code) {
    case 200:
      TableListModel t = new TableListModel();
      return (TableListModel) t.getObjectFromMessage(response.getBody());
    case 404:
      throw new IOException("Table list not found");
    case 509:
      try {
        Thread.sleep(sleepTime);
      } catch (InterruptedException e) {
        throw (InterruptedIOException)new InterruptedIOException().initCause(e);
      }
      break;
    default:
      throw new IOException("get request to " + path.toString()
          + " request returned " + code);
    }
  }
  throw new IOException("get request to " + path.toString()
      + " request timed out");
}
项目:ditb    文件:RootResource.java   
private final TableListModel getTableList() throws IOException {
  TableListModel tableList = new TableListModel();
  TableName[] tableNames = servlet.getAdmin().listTableNames();
  for (TableName name: tableNames) {
    tableList.add(new TableModel(name.getNameAsString()));
  }
  return tableList;
}
项目:ditb    文件:TestTableResource.java   
private static void checkTableList(TableListModel model) {
  boolean found = false;
  Iterator<TableModel> tables = model.getTables().iterator();
  assertTrue(tables.hasNext());
  while (tables.hasNext()) {
    TableModel table = tables.next();
    if (table.getName().equals(TABLE.getNameAsString())) {
      found = true;
      break;
    }
  }
  assertTrue(found);
}
项目:ditb    文件:TestTableResource.java   
@Test
public void testTableListXML() throws IOException, JAXBException {
  Response response = client.get("/", Constants.MIMETYPE_XML);
  assertEquals(response.getCode(), 200);
  assertEquals(Constants.MIMETYPE_XML, response.getHeader("content-type"));
  TableListModel model = (TableListModel)
    context.createUnmarshaller()
      .unmarshal(new ByteArrayInputStream(response.getBody()));
  checkTableList(model);
}
项目:LCIndex-HBase-0.94.16    文件:RemoteAdmin.java   
/**
 * @return string representing the cluster's version
 * @throws IOEXception
 *           if the endpoint does not exist, there is a timeout, or some other
 *           general failure mode
 */
public TableListModel getTableList() throws IOException {

  StringBuilder path = new StringBuilder();
  path.append('/');
  if (accessToken != null) {
    path.append(accessToken);
    path.append('/');
  }

  int code = 0;
  for (int i = 0; i < maxRetries; i++) {
    // Response response = client.get(path.toString(),
    // Constants.MIMETYPE_XML);
    Response response = client.get(path.toString(),
        Constants.MIMETYPE_PROTOBUF);
    code = response.getCode();
    switch (code) {
    case 200:
      TableListModel t = new TableListModel();
      return (TableListModel) t.getObjectFromMessage(response.getBody());
    case 404:
      throw new IOException("Table list not found");
    case 509:
      try {
        Thread.sleep(sleepTime);
      } catch (InterruptedException e) {
      }
      break;
    default:
      throw new IOException("get request to " + path.toString()
          + " request returned " + code);
    }
  }
  throw new IOException("get request to " + path.toString()
      + " request timed out");
}
项目:LCIndex-HBase-0.94.16    文件:RootResource.java   
private final TableListModel getTableList() throws IOException {
  TableListModel tableList = new TableListModel();
  String[] tableNames = servlet.getAdmin().getTableNames();
  for (String name: tableNames) {
    tableList.add(new TableModel(name));
  }
  return tableList;
}
项目:LCIndex-HBase-0.94.16    文件:TestTableResource.java   
private static void checkTableList(TableListModel model) {
  boolean found = false;
  Iterator<TableModel> tables = model.getTables().iterator();
  assertTrue(tables.hasNext());
  while (tables.hasNext()) {
    TableModel table = tables.next();
    if (table.getName().equals(TABLE)) {
      found = true;
      break;
    }
  }
  assertTrue(found);
}
项目:LCIndex-HBase-0.94.16    文件:TestTableResource.java   
@Test
public void testTableListXML() throws IOException, JAXBException {
  Response response = client.get("/", Constants.MIMETYPE_XML);
  assertEquals(response.getCode(), 200);
  assertEquals(Constants.MIMETYPE_XML, response.getHeader("content-type"));
  TableListModel model = (TableListModel)
    context.createUnmarshaller()
      .unmarshal(new ByteArrayInputStream(response.getBody()));
  checkTableList(model);
}
项目:HIndex    文件:RemoteAdmin.java   
/**
 * @return string representing the cluster's version
 * @throws IOEXception
 *           if the endpoint does not exist, there is a timeout, or some other
 *           general failure mode
 */
public TableListModel getTableList() throws IOException {

  StringBuilder path = new StringBuilder();
  path.append('/');
  if (accessToken != null) {
    path.append(accessToken);
    path.append('/');
  }

  int code = 0;
  for (int i = 0; i < maxRetries; i++) {
    // Response response = client.get(path.toString(),
    // Constants.MIMETYPE_XML);
    Response response = client.get(path.toString(),
        Constants.MIMETYPE_PROTOBUF);
    code = response.getCode();
    switch (code) {
    case 200:
      TableListModel t = new TableListModel();
      return (TableListModel) t.getObjectFromMessage(response.getBody());
    case 404:
      throw new IOException("Table list not found");
    case 509:
      try {
        Thread.sleep(sleepTime);
      } catch (InterruptedException e) {
      }
      break;
    default:
      throw new IOException("get request to " + path.toString()
          + " request returned " + code);
    }
  }
  throw new IOException("get request to " + path.toString()
      + " request timed out");
}
项目:HIndex    文件:RootResource.java   
private final TableListModel getTableList() throws IOException {
  TableListModel tableList = new TableListModel();
  TableName[] tableNames = servlet.getAdmin().listTableNames();
  for (TableName name: tableNames) {
    tableList.add(new TableModel(name.getNameAsString()));
  }
  return tableList;
}
项目:HIndex    文件:TestTableResource.java   
private static void checkTableList(TableListModel model) {
  boolean found = false;
  Iterator<TableModel> tables = model.getTables().iterator();
  assertTrue(tables.hasNext());
  while (tables.hasNext()) {
    TableModel table = tables.next();
    if (table.getName().equals(TABLE)) {
      found = true;
      break;
    }
  }
  assertTrue(found);
}
项目:HIndex    文件:TestTableResource.java   
@Test
public void testTableListXML() throws IOException, JAXBException {
  Response response = client.get("/", Constants.MIMETYPE_XML);
  assertEquals(response.getCode(), 200);
  assertEquals(Constants.MIMETYPE_XML, response.getHeader("content-type"));
  TableListModel model = (TableListModel)
    context.createUnmarshaller()
      .unmarshal(new ByteArrayInputStream(response.getBody()));
  checkTableList(model);
}
项目:IRIndex    文件:RemoteAdmin.java   
/**
 * @return string representing the cluster's version
 * @throws IOEXception
 *           if the endpoint does not exist, there is a timeout, or some other
 *           general failure mode
 */
public TableListModel getTableList() throws IOException {

  StringBuilder path = new StringBuilder();
  path.append('/');
  if (accessToken != null) {
    path.append(accessToken);
    path.append('/');
  }

  int code = 0;
  for (int i = 0; i < maxRetries; i++) {
    // Response response = client.get(path.toString(),
    // Constants.MIMETYPE_XML);
    Response response = client.get(path.toString(),
        Constants.MIMETYPE_PROTOBUF);
    code = response.getCode();
    switch (code) {
    case 200:
      TableListModel t = new TableListModel();
      return (TableListModel) t.getObjectFromMessage(response.getBody());
    case 404:
      throw new IOException("Table list not found");
    case 509:
      try {
        Thread.sleep(sleepTime);
      } catch (InterruptedException e) {
      }
      break;
    default:
      throw new IOException("get request to " + path.toString()
          + " request returned " + code);
    }
  }
  throw new IOException("get request to " + path.toString()
      + " request timed out");
}
项目:IRIndex    文件:RootResource.java   
private final TableListModel getTableList() throws IOException {
  TableListModel tableList = new TableListModel();
  String[] tableNames = servlet.getAdmin().getTableNames();
  for (String name: tableNames) {
    tableList.add(new TableModel(name));
  }
  return tableList;
}
项目:IRIndex    文件:TestTableResource.java   
private static void checkTableList(TableListModel model) {
  boolean found = false;
  Iterator<TableModel> tables = model.getTables().iterator();
  assertTrue(tables.hasNext());
  while (tables.hasNext()) {
    TableModel table = tables.next();
    if (table.getName().equals(TABLE)) {
      found = true;
      break;
    }
  }
  assertTrue(found);
}
项目:IRIndex    文件:TestTableResource.java   
@Test
public void testTableListXML() throws IOException, JAXBException {
  Response response = client.get("/", Constants.MIMETYPE_XML);
  assertEquals(response.getCode(), 200);
  assertEquals(Constants.MIMETYPE_XML, response.getHeader("content-type"));
  TableListModel model = (TableListModel)
    context.createUnmarshaller()
      .unmarshal(new ByteArrayInputStream(response.getBody()));
  checkTableList(model);
}
项目:hbase    文件:RemoteAdmin.java   
/**
 * @return string representing the cluster's version
 * @throws IOException
 *           if the endpoint does not exist, there is a timeout, or some other
 *           general failure mode
 */
public TableListModel getTableList() throws IOException {

  StringBuilder path = new StringBuilder();
  path.append('/');
  if (accessToken != null) {
    path.append(accessToken);
    path.append('/');
  }

  int code = 0;
  for (int i = 0; i < maxRetries; i++) {
    // Response response = client.get(path.toString(),
    // Constants.MIMETYPE_XML);
    Response response = client.get(path.toString(),
        Constants.MIMETYPE_PROTOBUF);
    code = response.getCode();
    switch (code) {
    case 200:
      TableListModel t = new TableListModel();
      return (TableListModel) t.getObjectFromMessage(response.getBody());
    case 404:
      throw new IOException("Table list not found");
    case 509:
      try {
        Thread.sleep(sleepTime);
      } catch (InterruptedException e) {
        throw (InterruptedIOException)new InterruptedIOException().initCause(e);
      }
      break;
    default:
      throw new IOException("get request to " + path.toString()
          + " request returned " + code);
    }
  }
  throw new IOException("get request to " + path.toString()
      + " request timed out");
}
项目:hbase    文件:RootResource.java   
private final TableListModel getTableList() throws IOException {
  TableListModel tableList = new TableListModel();
  TableName[] tableNames = servlet.getAdmin().listTableNames();
  for (TableName name: tableNames) {
    tableList.add(new TableModel(name.getNameAsString()));
  }
  return tableList;
}
项目:hbase    文件:TestTableResource.java   
private static void checkTableList(TableListModel model) {
  boolean found = false;
  Iterator<TableModel> tables = model.getTables().iterator();
  assertTrue(tables.hasNext());
  while (tables.hasNext()) {
    TableModel table = tables.next();
    if (table.getName().equals(TABLE.getNameAsString())) {
      found = true;
      break;
    }
  }
  assertTrue(found);
}
项目:hbase    文件:TestTableResource.java   
@Test
public void testTableListXML() throws IOException, JAXBException {
  Response response = client.get("/", Constants.MIMETYPE_XML);
  assertEquals(200, response.getCode());
  assertEquals(Constants.MIMETYPE_XML, response.getHeader("content-type"));
  TableListModel model = (TableListModel)
    context.createUnmarshaller()
      .unmarshal(new ByteArrayInputStream(response.getBody()));
  checkTableList(model);
}
项目:RStore    文件:RootResource.java   
private final TableListModel getTableList() throws IOException {
  TableListModel tableList = new TableListModel();
  HBaseAdmin admin = new HBaseAdmin(servlet.getConfiguration());
  HTableDescriptor[] list = admin.listTables();
  for (HTableDescriptor htd: list) {
    tableList.add(new TableModel(htd.getNameAsString()));
  }
  return tableList;
}
项目:PyroDB    文件:RemoteAdmin.java   
/**
 * @return string representing the cluster's version
 * @throws IOEXception
 *           if the endpoint does not exist, there is a timeout, or some other
 *           general failure mode
 */
public TableListModel getTableList() throws IOException {

  StringBuilder path = new StringBuilder();
  path.append('/');
  if (accessToken != null) {
    path.append(accessToken);
    path.append('/');
  }

  int code = 0;
  for (int i = 0; i < maxRetries; i++) {
    // Response response = client.get(path.toString(),
    // Constants.MIMETYPE_XML);
    Response response = client.get(path.toString(),
        Constants.MIMETYPE_PROTOBUF);
    code = response.getCode();
    switch (code) {
    case 200:
      TableListModel t = new TableListModel();
      return (TableListModel) t.getObjectFromMessage(response.getBody());
    case 404:
      throw new IOException("Table list not found");
    case 509:
      try {
        Thread.sleep(sleepTime);
      } catch (InterruptedException e) {
        throw (InterruptedIOException)new InterruptedIOException().initCause(e);
      }
      break;
    default:
      throw new IOException("get request to " + path.toString()
          + " request returned " + code);
    }
  }
  throw new IOException("get request to " + path.toString()
      + " request timed out");
}
项目:PyroDB    文件:RootResource.java   
private final TableListModel getTableList() throws IOException {
  TableListModel tableList = new TableListModel();
  TableName[] tableNames = servlet.getAdmin().listTableNames();
  for (TableName name: tableNames) {
    tableList.add(new TableModel(name.getNameAsString()));
  }
  return tableList;
}
项目:PyroDB    文件:TestTableResource.java   
private static void checkTableList(TableListModel model) {
  boolean found = false;
  Iterator<TableModel> tables = model.getTables().iterator();
  assertTrue(tables.hasNext());
  while (tables.hasNext()) {
    TableModel table = tables.next();
    if (table.getName().equals(TABLE)) {
      found = true;
      break;
    }
  }
  assertTrue(found);
}
项目:PyroDB    文件:TestTableResource.java   
@Test
public void testTableListXML() throws IOException, JAXBException {
  Response response = client.get("/", Constants.MIMETYPE_XML);
  assertEquals(response.getCode(), 200);
  assertEquals(Constants.MIMETYPE_XML, response.getHeader("content-type"));
  TableListModel model = (TableListModel)
    context.createUnmarshaller()
      .unmarshal(new ByteArrayInputStream(response.getBody()));
  checkTableList(model);
}
项目:c5    文件:RemoteAdmin.java   
/**
 * @return string representing the cluster's version
 * @throws IOEXception
 *           if the endpoint does not exist, there is a timeout, or some other
 *           general failure mode
 */
public TableListModel getTableList() throws IOException {

  StringBuilder path = new StringBuilder();
  path.append('/');
  if (accessToken != null) {
    path.append(accessToken);
    path.append('/');
  }

  int code = 0;
  for (int i = 0; i < maxRetries; i++) {
    // Response response = client.get(path.toString(),
    // Constants.MIMETYPE_XML);
    Response response = client.get(path.toString(),
        Constants.MIMETYPE_PROTOBUF);
    code = response.getCode();
    switch (code) {
    case 200:
      TableListModel t = new TableListModel();
      return (TableListModel) t.getObjectFromMessage(response.getBody());
    case 404:
      throw new IOException("Table list not found");
    case 509:
      try {
        Thread.sleep(sleepTime);
      } catch (InterruptedException e) {
      }
      break;
    default:
      throw new IOException("get request to " + path.toString()
          + " request returned " + code);
    }
  }
  throw new IOException("get request to " + path.toString()
      + " request timed out");
}
项目:c5    文件:RootResource.java   
private final TableListModel getTableList() throws IOException {
  TableListModel tableList = new TableListModel();
  TableName[] tableNames = servlet.getAdmin().listTableNames();
  for (TableName name: tableNames) {
    tableList.add(new TableModel(name.getNameAsString()));
  }
  return tableList;
}
项目:c5    文件:TestTableResource.java   
private static void checkTableList(TableListModel model) {
  boolean found = false;
  Iterator<TableModel> tables = model.getTables().iterator();
  assertTrue(tables.hasNext());
  while (tables.hasNext()) {
    TableModel table = tables.next();
    if (table.getName().equals(TABLE)) {
      found = true;
      break;
    }
  }
  assertTrue(found);
}
项目:c5    文件:TestTableResource.java   
@Test
public void testTableListXML() throws IOException, JAXBException {
  Response response = client.get("/", Constants.MIMETYPE_XML);
  assertEquals(response.getCode(), 200);
  assertEquals(Constants.MIMETYPE_XML, response.getHeader("content-type"));
  TableListModel model = (TableListModel)
    context.createUnmarshaller()
      .unmarshal(new ByteArrayInputStream(response.getBody()));
  checkTableList(model);
}
项目:HBase-Research    文件:RemoteAdmin.java   
/**
 * @return string representing the cluster's version
 * @throws IOEXception
 *           if the endpoint does not exist, there is a timeout, or some other
 *           general failure mode
 */
public TableListModel getTableList() throws IOException {

  StringBuilder path = new StringBuilder();
  path.append('/');
  if (accessToken != null) {
    path.append(accessToken);
    path.append('/');
  }

  int code = 0;
  for (int i = 0; i < maxRetries; i++) {
    // Response response = client.get(path.toString(),
    // Constants.MIMETYPE_XML);
    Response response = client.get(path.toString(),
        Constants.MIMETYPE_PROTOBUF);
    code = response.getCode();
    switch (code) {
    case 200:
      TableListModel t = new TableListModel();
      return (TableListModel) t.getObjectFromMessage(response.getBody());
    case 404:
      throw new IOException("Table list not found");
    case 509:
      try {
        Thread.sleep(sleepTime);
      } catch (InterruptedException e) {
      }
      break;
    default:
      throw new IOException("get request to " + path.toString()
          + " request returned " + code);
    }
  }
  throw new IOException("get request to " + path.toString()
      + " request timed out");
}
项目:HBase-Research    文件:RootResource.java   
private final TableListModel getTableList() throws IOException {
  TableListModel tableList = new TableListModel();
  HTableDescriptor[] list = servlet.getAdmin().listTables();
  for (HTableDescriptor htd: list) {
    tableList.add(new TableModel(htd.getNameAsString()));
  }
  return tableList;
}
项目:HBase-Research    文件:TestTableResource.java   
private static void checkTableList(TableListModel model) {
  boolean found = false;
  Iterator<TableModel> tables = model.getTables().iterator();
  assertTrue(tables.hasNext());
  while (tables.hasNext()) {
    TableModel table = tables.next();
    if (table.getName().equals(TABLE)) {
      found = true;
      break;
    }
  }
  assertTrue(found);
}
项目:HBase-Research    文件:TestTableResource.java   
@Test
public void testTableListXML() throws IOException, JAXBException {
  Response response = client.get("/", Constants.MIMETYPE_XML);
  assertEquals(response.getCode(), 200);
  assertEquals(Constants.MIMETYPE_XML, response.getHeader("content-type"));
  TableListModel model = (TableListModel)
    context.createUnmarshaller()
      .unmarshal(new ByteArrayInputStream(response.getBody()));
  checkTableList(model);
}
项目:hbase-0.94.8-qod    文件:RemoteAdmin.java   
/**
 * @return string representing the cluster's version
 * @throws IOEXception
 *           if the endpoint does not exist, there is a timeout, or some other
 *           general failure mode
 */
public TableListModel getTableList() throws IOException {

  StringBuilder path = new StringBuilder();
  path.append('/');
  if (accessToken != null) {
    path.append(accessToken);
    path.append('/');
  }

  int code = 0;
  for (int i = 0; i < maxRetries; i++) {
    // Response response = client.get(path.toString(),
    // Constants.MIMETYPE_XML);
    Response response = client.get(path.toString(),
        Constants.MIMETYPE_PROTOBUF);
    code = response.getCode();
    switch (code) {
    case 200:
      TableListModel t = new TableListModel();
      return (TableListModel) t.getObjectFromMessage(response.getBody());
    case 404:
      throw new IOException("Table list not found");
    case 509:
      try {
        Thread.sleep(sleepTime);
      } catch (InterruptedException e) {
      }
      break;
    default:
      throw new IOException("get request to " + path.toString()
          + " request returned " + code);
    }
  }
  throw new IOException("get request to " + path.toString()
      + " request timed out");
}
项目:hbase-0.94.8-qod    文件:RootResource.java   
private final TableListModel getTableList() throws IOException {
  TableListModel tableList = new TableListModel();
  HTableDescriptor[] list = servlet.getAdmin().listTables();
  for (HTableDescriptor htd: list) {
    tableList.add(new TableModel(htd.getNameAsString()));
  }
  return tableList;
}
项目:hbase-0.94.8-qod    文件:TestTableResource.java   
private static void checkTableList(TableListModel model) {
  boolean found = false;
  Iterator<TableModel> tables = model.getTables().iterator();
  assertTrue(tables.hasNext());
  while (tables.hasNext()) {
    TableModel table = tables.next();
    if (table.getName().equals(TABLE)) {
      found = true;
      break;
    }
  }
  assertTrue(found);
}
项目:hbase-0.94.8-qod    文件:TestTableResource.java   
@Test
public void testTableListXML() throws IOException, JAXBException {
  Response response = client.get("/", Constants.MIMETYPE_XML);
  assertEquals(response.getCode(), 200);
  assertEquals(Constants.MIMETYPE_XML, response.getHeader("content-type"));
  TableListModel model = (TableListModel)
    context.createUnmarshaller()
      .unmarshal(new ByteArrayInputStream(response.getBody()));
  checkTableList(model);
}
项目:hbase-0.94.8-qod    文件:RemoteAdmin.java   
/**
 * @return string representing the cluster's version
 * @throws IOEXception
 *           if the endpoint does not exist, there is a timeout, or some other
 *           general failure mode
 */
public TableListModel getTableList() throws IOException {

  StringBuilder path = new StringBuilder();
  path.append('/');
  if (accessToken != null) {
    path.append(accessToken);
    path.append('/');
  }

  int code = 0;
  for (int i = 0; i < maxRetries; i++) {
    // Response response = client.get(path.toString(),
    // Constants.MIMETYPE_XML);
    Response response = client.get(path.toString(),
        Constants.MIMETYPE_PROTOBUF);
    code = response.getCode();
    switch (code) {
    case 200:
      TableListModel t = new TableListModel();
      return (TableListModel) t.getObjectFromMessage(response.getBody());
    case 404:
      throw new IOException("Table list not found");
    case 509:
      try {
        Thread.sleep(sleepTime);
      } catch (InterruptedException e) {
      }
      break;
    default:
      throw new IOException("get request to " + path.toString()
          + " request returned " + code);
    }
  }
  throw new IOException("get request to " + path.toString()
      + " request timed out");
}