Package org.apache.tajo.catalog.statistics

Examples of org.apache.tajo.catalog.statistics.TableStats


        Collections.sort(inMemoryTable, getComparator());
      }
    }

    // get total loaded (or stored) bytes and total row numbers
    TableStats childTableStats = child.getInputStats();
    if (childTableStats != null) {
      sortAndStoredBytes = childTableStats.getNumBytes();
    }
    return chunkPaths;
  }
View Full Code Here


      totalRecords = inMemoryTable.size();
      scannerProgress = 0.0f;
      numRecords = 0;

      // it will be returned as the final stats
      scannerTableStats = new TableStats();
      scannerTableStats.setNumBytes(sortAndStoredBytes);
      scannerTableStats.setReadBytes(sortAndStoredBytes);
      scannerTableStats.setNumRows(totalRecords);
    }
View Full Code Here

      rightScan.init();

      leftTuple = leftScan.next();
      rightTuple = rightScan.next();

      mergerInputStats = new TableStats();
      mergerProgress = 0.0f;
    }
View Full Code Here

    @Override
    public TableStats getInputStats() {
      if (leftScan == null) {
        return mergerInputStats;
      }
      TableStats leftInputStats = leftScan.getInputStats();
      mergerInputStats.setNumBytes(0);
      mergerInputStats.setReadBytes(0);
      mergerInputStats.setNumRows(0);

      if (leftInputStats != null) {
        mergerInputStats.setNumBytes(leftInputStats.getNumBytes());
        mergerInputStats.setReadBytes(leftInputStats.getReadBytes());
        mergerInputStats.setNumRows(leftInputStats.getNumRows());
      }

      TableStats rightInputStats = rightScan.getInputStats();
      if (rightInputStats != null) {
        mergerInputStats.setNumBytes(mergerInputStats.getNumBytes() + rightInputStats.getNumBytes());
        mergerInputStats.setReadBytes(mergerInputStats.getReadBytes() + rightInputStats.getReadBytes());
        mergerInputStats.setNumRows(mergerInputStats.getNumRows() + rightInputStats.getNumRows());
      }

      return mergerInputStats;
    }
View Full Code Here

      readLock.unlock();
    }
  }

  public static TableStats[] computeStatFromUnionBlock(SubQuery subQuery) {
    TableStats[] stat = new TableStats[]{new TableStats(), new TableStats()};
    long[] avgRows = new long[]{0, 0};
    long[] numBytes = new long[]{0, 0};
    long[] readBytes = new long[]{0, 0};
    long[] numRows = new long[]{0, 0};
    int[] numBlocks = new int[]{0, 0};
View Full Code Here

      resultStatsList.add(unit.getStats());
      if (unit.getLastAttempt().getInputStats() != null) {
        inputStatsList.add(unit.getLastAttempt().getInputStats());
      }
    }
    TableStats inputStats = StatisticsUtil.aggregateTableStat(inputStatsList);
    TableStats resultStats = StatisticsUtil.aggregateTableStat(resultStatsList);
    return new TableStats[]{inputStats, resultStats};
  }
View Full Code Here

      Map<String, TableDesc> tableMap = context.getTableDescMap();
      if (masterPlan.isLeaf(execBlock)) {
        ScanNode[] outerScans = execBlock.getScanNodes();
        long maxVolume = 0;
        for (ScanNode eachScanNode: outerScans) {
          TableStats stat = tableMap.get(eachScanNode.getCanonicalName()).getStats();
          if (stat.getNumBytes() > maxVolume) {
            maxVolume = stat.getNumBytes();
          }
        }
        return maxVolume;
      } else {
        long aggregatedVolume = 0;
View Full Code Here

  public TableStats getInputStats() {
    if (inputStats == null) {
      return null;
    }

    return new TableStats(inputStats);
  }
View Full Code Here

  public TableStats getResultStats() {
    if (resultStats == null) {
      return null;
    }
    return new TableStats(resultStats);
  }
View Full Code Here

    if (report.hasInputStats()) {
      this.inputStats = report.getInputStats();
    }
    if (report.hasResultStats()) {
      this.resultStats = report.getResultStats();
      this.getQueryUnit().setStats(new TableStats(resultStats));
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.tajo.catalog.statistics.TableStats

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.