[GitHub] carbondata pull request #1743: [CARBONDATA-1954] HiveMetastore updated while...

classic Classic list List threaded Threaded
46 messages Options
123
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1743: [CARBONDATA-1954] HiveMetastore updated while...

qiuchenjian-2
GitHub user rahulforallp opened a pull request:

    https://github.com/apache/carbondata/pull/1743

    [CARBONDATA-1954] HiveMetastore updated while dropping the table & code refactored

    …ode refactored
   
    Be sure to do all of the following checklist to help us incorporate
    your contribution quickly and easily:
   
     - [ ] Any interfaces changed?
     
     - [ ] Any backward compatibility impacted?
     
     - [ ] Document update required?
   
     - [ ] Testing done
            Please provide details on
            - Whether new unit test cases have been added or why no new tests are required?
            - How it is tested? Please attach test report.
            - Is it a performance related change? Please attach the performance test report.
            - Any additional information to help reviewers in testing this change.
           
     - [ ] 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/rahulforallp/incubator-carbondata pre_agg_issue

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/carbondata/pull/1743.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 #1743
   
----
commit 24ec914a02053573f67eede8da97f76c93187046
Author: rahulforallp <rahul.kumar@...>
Date:   2017-12-29T14:31:45Z

    [CARBONDATA-1954] hive metastore updated while dropping the table & code refactored

----


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1743: [CARBONDATA-1954] HiveMetastore updated while droppi...

qiuchenjian-2
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1743
 
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2633/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1743: [CARBONDATA-1954] HiveMetastore updated while droppi...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1743
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2447/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1743: [CARBONDATA-1954] HiveMetastore updated while droppi...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1743
 
    Build Success with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1227/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1743: [CARBONDATA-1954] HiveMetastore updated while droppi...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user rahulforallp commented on the issue:

    https://github.com/apache/carbondata/pull/1743
 
    retest sdv please


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1743: [CARBONDATA-1954] HiveMetastore updated while droppi...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1743
 
    SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2645/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1743: [CARBONDATA-1954] HiveMetastore updated while...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1743#discussion_r159396216
 
    --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datamap/TestDataMapCommand.scala ---
    @@ -76,6 +78,24 @@ class TestDataMapCommand extends QueryTest with BeforeAndAfterAll {
         assert(dataMapSchemaList.get(2).getChildSchema.getTableName.equals("datamaptest_datamap3"))
       }
     
    +  test("check hivemetastore after drop datamap") {
    +    CarbonProperties.getInstance().addProperty(CarbonCommonConstants.ENABLE_HIVE_SCHEMA_META_STORE,
    --- End diff --
   
    reset this property


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1743: [CARBONDATA-1954] HiveMetastore updated while...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1743#discussion_r159396427
 
    --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datamap/TestDataMapCommand.scala ---
    @@ -76,6 +78,24 @@ class TestDataMapCommand extends QueryTest with BeforeAndAfterAll {
         assert(dataMapSchemaList.get(2).getChildSchema.getTableName.equals("datamaptest_datamap3"))
       }
     
    +  test("check hivemetastore after drop datamap") {
    +    CarbonProperties.getInstance().addProperty(CarbonCommonConstants.ENABLE_HIVE_SCHEMA_META_STORE,
    +      "true")
    +    sql("drop datamap if exists datamap_hiveMetaStoreTable on table hiveMetaStoreTable")
    +    sql("drop table if exists hiveMetaStoreTable")
    +    sql("create table hiveMetaStoreTable (a string, b string, c string) stored by 'carbondata'")
    +    sql(
    +      "create datamap datamap_hiveMetaStoreTable on table hiveMetaStoreTable using 'preaggregate' dmproperties('key'='value') as select count(a) from hiveMetaStoreTable")
    +
    +    val table = CarbonMetadata.getInstance().getCarbonTable("default", "hiveMetaStoreTable")
    +    var dataMapSchemaList = table.getTableInfo.getDataMapSchemaList
    +    assert(dataMapSchemaList.size() == 1)
    +
    +    sql("drop datamap if exists datamap_hiveMetaStoreTable on table hiveMetaStoreTable")
    --- End diff --
   
    drop main table also


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1743: [CARBONDATA-1954] HiveMetastore updated while...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1743#discussion_r159402613
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonHiveMetaStore.scala ---
    @@ -194,6 +194,11 @@ class CarbonHiveMetaStore extends CarbonFileMetastore {
           newTablePath)
         val dbName = oldTableIdentifier.getDatabaseName
         val tableName = oldTableIdentifier.getTableName
    +    val schemaParts = CarbonUtil.convertToMultiGsonStrings(wrapperTableInfo, "=", "'", "")
    --- End diff --
   
    Not required this function use above function , updateHiveMetaStoreForAlter


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1743: [CARBONDATA-1954] HiveMetastore updated while droppi...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user gvramana commented on the issue:

    https://github.com/apache/carbondata/pull/1743
 
    change PR title and issue title to describe the problem


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1743: [CARBONDATA-1954] [Pre-Aggregate] CarbonHiveMetastor...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1743
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2513/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1743: [CARBONDATA-1954] [Pre-Aggregate] CarbonHiveMetastor...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1743
 
    Build Success with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1296/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1743: [CARBONDATA-1954] [Pre-Aggregate] CarbonHiveMetastor...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1743
 
    SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2681/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1743: [CARBONDATA-1954] [Pre-Aggregate] CarbonHiveM...

qiuchenjian-2
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/1743#discussion_r159606189
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/datamap/DataMapListeners.scala ---
    @@ -65,7 +65,7 @@ object DropDataMapPostListener extends OperationEventListener {
               Some(dataMapSchema.get.getRelationIdentifier.getDatabaseName),
               dataMapSchema.get.getRelationIdentifier.getTableName,
               dropChildTable = true
    -        ).run(sparkSession)
    +        ).processMetadata(sparkSession)
    --- End diff --
   
    I think it is better to move this call to CarbonDropDataMapCommand.processMetadata


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1743: [CARBONDATA-1954] [Pre-Aggregate] CarbonHiveM...

qiuchenjian-2
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/1743#discussion_r159606539
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/datamap/CarbonDropDataMapCommand.scala ---
    @@ -136,6 +137,12 @@ case class CarbonDropDataMapCommand(
         // delete the table folder
         val tableIdentifier = CarbonEnv.getIdentifier(databaseNameOp, tableName)(sparkSession)
         DataMapStoreManager.getInstance().clearDataMap(tableIdentifier, dataMapName)
    +    CarbonDropTableCommand(
    --- End diff --
   
    Beside CarbonDropDataMapCommand.scala, CarbonDropTableCommand.scala also has problem that processMetadata is incorrect if there are datamaps associated with the fact table. Please modify that in this PR also.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1743: [CARBONDATA-1954] [Pre-Aggregate] CarbonHiveM...

qiuchenjian-2
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/1743#discussion_r159606692
 
    --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/datamap/TestDataMapCommand.scala ---
    @@ -76,6 +78,31 @@ class TestDataMapCommand extends QueryTest with BeforeAndAfterAll {
         assert(dataMapSchemaList.get(2).getChildSchema.getTableName.equals("datamaptest_datamap3"))
       }
     
    +  test("check hivemetastore after drop datamap") {
    +    try {
    +      CarbonProperties.getInstance()
    +        .addProperty(CarbonCommonConstants.ENABLE_HIVE_SCHEMA_META_STORE,
    +          "true")
    +      sql("drop datamap if exists datamap_hiveMetaStoreTable on table hiveMetaStoreTable")
    +      sql("drop table if exists hiveMetaStoreTable")
    +      sql("create table hiveMetaStoreTable (a string, b string, c string) stored by 'carbondata'")
    +
    +      sql(
    +        "create datamap datamap_hiveMetaStoreTable on table hiveMetaStoreTable using 'preaggregate' dmproperties('key'='value') as select count(a) from hiveMetaStoreTable")
    +      checkExistence(sql("show datamap on table hiveMetaStoreTable"), true, "datamap_hiveMetaStoreTable")
    +
    +      sql("drop datamap datamap_hiveMetaStoreTable on table hiveMetaStoreTable")
    +      checkExistence(sql("show datamap on table hiveMetaStoreTable"), false, "datamap_hiveMetaStoreTable")
    +
    +    }
    +    finally {
    +      sql("drop table hiveMetaStoreTable")
    +      CarbonProperties.getInstance()
    +        .addProperty(CarbonCommonConstants.ENABLE_HIVE_SCHEMA_META_STORE,
    +          CarbonCommonConstants.ENABLE_HIVE_SCHEMA_META_STORE_DEFAULT)
    +    }
    +  }
    +
    --- End diff --
   
    Beside CarbonDropDataMapCommand.scala, CarbonDropTableCommand.scala also has problem that processMetadata is incorrect if there are datamaps associated with the fact table. Please modify that in this PR also and add testcase


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1743: [CARBONDATA-1954] [Pre-Aggregate] CarbonHiveM...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user rahulforallp commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1743#discussion_r159619266
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/datamap/DataMapListeners.scala ---
    @@ -65,7 +65,7 @@ object DropDataMapPostListener extends OperationEventListener {
               Some(dataMapSchema.get.getRelationIdentifier.getDatabaseName),
               dataMapSchema.get.getRelationIdentifier.getTableName,
               dropChildTable = true
    -        ).run(sparkSession)
    +        ).processMetadata(sparkSession)
    --- End diff --
   
    @jackylk  code is moved to CarbonDropDataMapCommand


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1743: [CARBONDATA-1954] [Pre-Aggregate] CarbonHiveMetastor...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1743
 
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2548/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1743: [CARBONDATA-1954] [Pre-Aggregate] CarbonHiveMetastor...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1743
 
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1323/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1743: [CARBONDATA-1954] [Pre-Aggregate] CarbonHiveMetastor...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1743
 
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2718/



---
123