[
https://issues.apache.org/jira/browse/TAJO-1940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15111775#comment-15111775
]
ASF GitHub Bot commented on TAJO-1940:
--------------------------------------
Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/910#discussion_r50493788
--- Diff:
tajo-core-tests/src/test/java/org/apache/tajo/engine/query/TestHBaseTable.java
---
@@ -210,7 +210,62 @@ public void testCreateExternalHBaseTable() throws
Exception {
} finally {
TablespaceManager.addTableSpaceForTest(existing.get());
}
+ }
+ private void putData(HTableInterface htable, int rownum) throws
IOException {
+ for (int i = 0; i < rownum; i++) {
+ Put put = new Put(String.valueOf(i).getBytes());
+ put.add("col1".getBytes(), "a".getBytes(), ("a-" + i).getBytes());
+ put.add("col1".getBytes(), "b".getBytes(), ("b-" + i).getBytes());
+ put.add("col2".getBytes(), "k1".getBytes(), ("k1-" + i).getBytes());
+ put.add("col2".getBytes(), "k2".getBytes(), ("k2-" + i).getBytes());
+ put.add("col3".getBytes(), "b".getBytes(), ("b-" + i).getBytes());
+ htable.put(put);
+ }
+ }
+
+ @Test
+ public void testGetTableVolume() throws Exception {
--- End diff --
This test looks good, but I'm concerned with its location.
IMO, more proper class which should contain this test is
```TestHBaseTablespace```, but, as you already know, that class doesn't involve
running a test hbase cluster.
So, if we move this test to ```TestHBaseTablespace```, we also need to
launch another hbase cluster which can increase our test time.
What do you think?
> 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)