GitHub user xuchuanyin opened a pull request:
https://github.com/apache/carbondata/pull/2609 [CARBONDATA-2823] Support streaming property with datamap Since during query, carbondata get splits from streaming segment and columnar segments repectively, we can support streaming with index datamap. For preaggregate datamap, it already supported streaming table, so here we will remove the outdated comments. Be sure to do all of the following checklist to help us incorporate your contribution quickly and easily: - [x] Any interfaces changed? `NO` - [x] Any backward compatibility impacted? `NO` - [x] Document update required? `NO` - [x] Testing done Please provide details on - Whether new unit test cases have been added or why no new tests are required? `NO` - How it is tested? Please attach test report. `Tested in local` - Is it a performance related change? Please attach the performance test report. `NO` - Any additional information to help reviewers in testing this change. `NA` - [x] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA. You can merge this pull request into a Git repository by running: $ git pull https://github.com/xuchuanyin/carbondata issue2823_streaming_support_preagg_index_dm Alternatively you can review and apply these changes as the patch at: https://github.com/apache/carbondata/pull/2609.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2609 ---- commit a7772d8fd2ece3c362f16925299c63b848657c9a Author: xuchuanyin <xuchuanyin@...> Date: 2018-08-06T07:34:51Z Support streaming property with datamap Since during query, carbondata get splits from streaming segment and columnar segments repectively, we can support streaming with index datamap. For preaggregate datamap, it already supported streaming table, so here we will remove the outdated comments. ---- --- |
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2609 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/6172/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2609 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7792/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/2609 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6517/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/2609 LGTM --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2609#discussion_r208110915 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/DDLStrategy.scala --- @@ -257,20 +256,13 @@ class DDLStrategy(sparkSession: SparkSession) extends SparkStrategy { if CarbonEnv.getInstance(sparkSession).carbonMetastore .tableExists(tableName)(sparkSession) => { - // TODO remove this limiation after streaming table support 'preaggregate' DataMap - // if the table has 'preaggregate' DataMap, it doesn't support streaming now val carbonTable = CarbonEnv.getInstance(sparkSession).carbonMetastore .lookupRelation(tableName)(sparkSession).asInstanceOf[CarbonRelation].carbonTable if (carbonTable != null && !carbonTable.getTableInfo.isTransactionalTable) { throw new MalformedCarbonCommandException( "Unsupported operation on non transactional table") } - if (carbonTable != null && !carbonTable.canAllow(carbonTable, TableOperation.STREAMING)) { --- End diff -- What is a Table has MV datamap then user wants to set Streaming = true? I think thi scenario still not supported in master --- |
In reply to this post by qiuchenjian-2
Github user xuchuanyin commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2609#discussion_r208112885 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/DDLStrategy.scala --- @@ -257,20 +256,13 @@ class DDLStrategy(sparkSession: SparkSession) extends SparkStrategy { if CarbonEnv.getInstance(sparkSession).carbonMetastore .tableExists(tableName)(sparkSession) => { - // TODO remove this limiation after streaming table support 'preaggregate' DataMap - // if the table has 'preaggregate' DataMap, it doesn't support streaming now val carbonTable = CarbonEnv.getInstance(sparkSession).carbonMetastore .lookupRelation(tableName)(sparkSession).asInstanceOf[CarbonRelation].carbonTable if (carbonTable != null && !carbonTable.getTableInfo.isTransactionalTable) { throw new MalformedCarbonCommandException( "Unsupported operation on non transactional table") } - if (carbonTable != null && !carbonTable.canAllow(carbonTable, TableOperation.STREAMING)) { --- End diff -- In the previous implementation, the `CarbonTable.canAllow` will only works on the datamaps returned by `DataMapStorageManager.getInstance().getAllDataMap` which are all index datamap. Here the removed code means that there is no restriction for index map now, so I think the modification do not affect the previous procedure. As you mentioned about MV, maybe it is already a bug there. --- |
In reply to this post by qiuchenjian-2
Github user xuchuanyin commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2609#discussion_r208113457 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/DDLStrategy.scala --- @@ -257,20 +256,13 @@ class DDLStrategy(sparkSession: SparkSession) extends SparkStrategy { if CarbonEnv.getInstance(sparkSession).carbonMetastore .tableExists(tableName)(sparkSession) => { - // TODO remove this limiation after streaming table support 'preaggregate' DataMap - // if the table has 'preaggregate' DataMap, it doesn't support streaming now val carbonTable = CarbonEnv.getInstance(sparkSession).carbonMetastore .lookupRelation(tableName)(sparkSession).asInstanceOf[CarbonRelation].carbonTable if (carbonTable != null && !carbonTable.getTableInfo.isTransactionalTable) { throw new MalformedCarbonCommandException( "Unsupported operation on non transactional table") } - if (carbonTable != null && !carbonTable.canAllow(carbonTable, TableOperation.STREAMING)) { --- End diff -- @ravipesala I do think streaming table can work with MV. Since MV datamap is full rebuild each time, before rebuilding a query will be fired to get the input. As long as the query is OK, the MV will be OK too. --- |
In reply to this post by qiuchenjian-2
Github user xuchuanyin commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2609#discussion_r208126659 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/DDLStrategy.scala --- @@ -257,20 +256,13 @@ class DDLStrategy(sparkSession: SparkSession) extends SparkStrategy { if CarbonEnv.getInstance(sparkSession).carbonMetastore .tableExists(tableName)(sparkSession) => { - // TODO remove this limiation after streaming table support 'preaggregate' DataMap - // if the table has 'preaggregate' DataMap, it doesn't support streaming now val carbonTable = CarbonEnv.getInstance(sparkSession).carbonMetastore .lookupRelation(tableName)(sparkSession).asInstanceOf[CarbonRelation].carbonTable if (carbonTable != null && !carbonTable.getTableInfo.isTransactionalTable) { throw new MalformedCarbonCommandException( "Unsupported operation on non transactional table") } - if (carbonTable != null && !carbonTable.canAllow(carbonTable, TableOperation.STREAMING)) { --- End diff -- After discussed with @jacklk, we are planning to block MV datamap on streaming table and CARBONDATA-2835 was reported to solve this. --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2609#discussion_r208175586 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/DDLStrategy.scala --- @@ -257,20 +256,13 @@ class DDLStrategy(sparkSession: SparkSession) extends SparkStrategy { if CarbonEnv.getInstance(sparkSession).carbonMetastore .tableExists(tableName)(sparkSession) => { - // TODO remove this limiation after streaming table support 'preaggregate' DataMap - // if the table has 'preaggregate' DataMap, it doesn't support streaming now val carbonTable = CarbonEnv.getInstance(sparkSession).carbonMetastore .lookupRelation(tableName)(sparkSession).asInstanceOf[CarbonRelation].carbonTable if (carbonTable != null && !carbonTable.getTableInfo.isTransactionalTable) { throw new MalformedCarbonCommandException( "Unsupported operation on non transactional table") } - if (carbonTable != null && !carbonTable.canAllow(carbonTable, TableOperation.STREAMING)) { --- End diff -- ok --- |
In reply to this post by qiuchenjian-2
|
In reply to this post by qiuchenjian-2
|
Free forum by Nabble | Edit this page |