Examples of HBaseFacade


Examples of co.nubetech.crux.server.HBaseFacade

        .getAttribute(CruxConstants.HBASE_POOL);

    try {
      pool.save(connection);
      // servletContext.setAttribute(CruxConstants.HBASE_POOL, pool);
      HBaseFacade hbaseFacade = getHBaseFacade();
      boolean isValidConnection = hbaseFacade
          .isValidConnection(connection);
      logger.debug("isValidConnection : " + isValidConnection);
      if (isValidConnection) {
        logger.debug("connection is saving.");
        connectionDAO.save(connection);
View Full Code Here

Examples of co.nubetech.crux.server.HBaseFacade

    property.setProperty(CruxConstants.HBASE_ZOOKEEPER_PROPERTY);
    property.setValue(hbaseRestServerPropertyValue);
    connectionToTest.addProperty(property);

    try {
      HBaseFacade hbaseFacade = getHBaseFacade();
      boolean isValidConnection = hbaseFacade
          .isValidConnection(connectionToTest);
      logger.debug("isValidConnection : " + isValidConnection);
      if (isValidConnection) {
        connection = connectionDAO.findById(connection.getId());
        Connection connectionToUpdate = connection;
        connection.setName(connectionName);
        hbaseRestServerProperty = connection.getProperties().get(
            CruxConstants.HBASE_ZOOKEEPER_PROPERTY);
        hbaseRestServerProperty.setValue(hbaseRestServerPropertyValue);

        pool.update(connectionToUpdate, connection);

        // Now checking whether this connection holds all the associated
        // childrens.
        String[] tables = hbaseFacade.getTableList(connection);
        ArrayList<String> tableList = new ArrayList<String>();
        for (int i = 0; i < tables.length; i++) {
          tableList.add(tables[i]);
        }
        long count = 0l;
        for (Mapping mapping : mappingDAO.findAll()) {
          long id = connection.getId();
          if (id == mapping.getConnection().getId()) {
            String tableName = mapping.getTableName();
            if (!tableList.contains(tableName)) {
              count++;
            } else {
              ArrayList<String> columnFamilyList = new ArrayList<String>();
              ArrayList<HColumnDescriptor> columnList = new ArrayList<HColumnDescriptor>(
                  hbaseFacade.getColumnFamilies(connection,
                      tableName));
              for (HColumnDescriptor hcolumnDescriptor : columnList) {
                columnFamilyList.add(hcolumnDescriptor
                    .getNameAsString());
              }
View Full Code Here

Examples of co.nubetech.crux.server.HBaseFacade

  public List<ArrayList<Cell>> getData(Report report, Mapping mapping) {
    List<ArrayList<Cell>> dataList = new ArrayList<ArrayList<Cell>>();
    CruxScanner cruxScanner = null;
    try {
      Connection conn = mapping.getConnection();
      HBaseFacade hbaseFacade = this.getHBaseFacade();

      logger.debug("About to get data for Report:" + report);
      cruxScanner = hbaseFacade.execute(conn, report, mapping);
      logger.debug("Data fetched from HBaseFacade");

      List<ReportDesign> reportDesignList = report.getDesigns();
     
      for (ReportDesign reportDesign : reportDesignList) {
View Full Code Here

Examples of co.nubetech.crux.server.HBaseFacade

  public HBaseFacade getHBaseFacade() {
    ServletContext servletContext = ServletActionContext
        .getServletContext();
    HBaseConnectionPool pool = (HBaseConnectionPool) servletContext
        .getAttribute(CruxConstants.HBASE_POOL);
    HBaseFacade hbaseFacade = new HBaseFacade(pool);
    return hbaseFacade;
  }
View Full Code Here

Examples of co.nubetech.crux.server.HBaseFacade

  public String populateHBaseTable() throws IOException {
    logger.debug("populating hbaseTableList");
    long connectionId = connection.getId();
    try {
      connection = connectionDAO.findById(connectionId);
      HBaseFacade hbaseFacade = getHBaseFacade();
      tableList = hbaseFacade.getTableList(connection);
      logger.debug("tableList.length is: " + tableList.length
          + " for connection" + connection);
      logger.debug("Tables are " );
      if (tableList != null) {
        for (String table: tableList) {
View Full Code Here

Examples of co.nubetech.crux.server.HBaseFacade

    long connectionId = connection.getId();
    logger.debug("ConnectionId is: " + connectionId);
    try {
      connection = connectionDAO.findById(connectionId);
      String tableName = mapping.getTableName();
      HBaseFacade hbaseFacade = getHBaseFacade();
      ArrayList<HColumnDescriptor> columnList = new ArrayList<HColumnDescriptor>(
          hbaseFacade.getColumnFamilies(connection, tableName));
      for (HColumnDescriptor hcolumnDescriptor : columnList) {
        columnFamilyList.add(hcolumnDescriptor.getNameAsString());
      }
    } catch (CruxException e) {
      error.setMessage(e.getMessage());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.