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

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


  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;
  }
View Full Code Here


      for (HTableDescriptor htd: list) {
        String name = htd.getNameAsString();
        if (!name.startsWith(prefix)) {
          continue;
        }
        tableList.add(new TableModel(name.substring(prefix.length())));
      }
    }
    return tableList;
  }
View Full Code Here

      TableListModel tableList = new TableListModel();
      for (HTableDescriptor htd: getTableList()) {
        if (htd.isMetaRegion()) {
          continue;
        }
        tableList.add(new TableModel(htd.getNameAsString()));
      }
      ResponseBuilder response = Response.ok(tableList);
      response.cacheControl(cacheControl);
      return response.build();
    } catch (IOException e) {
View Full Code Here

  private 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);
View Full Code Here

  private 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);
View Full Code Here

  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;
  }
View Full Code Here

TOP

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

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.