[ 
https://issues.apache.org/jira/browse/TAJO-1940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15111902#comment-15111902
 ] 

ASF GitHub Bot commented on TAJO-1940:
--------------------------------------

Github user hyunsik commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/910#discussion_r50501505
  
    --- Diff: 
tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBaseTablespace.java
 ---
    @@ -101,8 +104,19 @@ public Configuration getHbaseConf() {
       }
     
       @Override
    -  public long getTableVolume(URI uri, Optional<EvalNode> filter) throws 
UnsupportedException {
    -    throw new UnsupportedException();
    +  public long getTableVolume(TableDesc table, Optional<EvalNode> filter) {
    +    long totalVolume;
    +    try {
    +      totalVolume = getRawSplits("", table, filter.orElse(null)).stream()
    +          .map(f -> f.getLength())
    +          .filter(size -> size > 0) // eliminate unknown sizes (-1)
    +          .reduce(0L, (sum, size) -> sum + size);
    --- End diff --
    
    Thanks. I'll fix it.


> Implement HBaseTablespace::getTableVolume() method
> --------------------------------------------------
>
>                 Key: TAJO-1940
>                 URL: https://issues.apache.org/jira/browse/TAJO-1940
>             Project: Tajo
>          Issue Type: Task
>          Components: HBase Storage
>            Reporter: Jihoon Son
>            Assignee: Hyunsik Choi
>             Fix For: 0.12.0, 0.11.1
>
>
> Table volume has an important role in query planning. Tajo's query optimizer 
> makes many decisions based on table volume, because it is currently the only 
> available statistics. 
> However, HBaseTablespace doesn't support getTableVolume() method, so our plan 
> is not good when the query involves any HBase tables. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to