carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kunalkap...@apache.org
Subject carbondata git commit: [HOTFIX] CreateDataMapPost Event was skipped in case of preaggregate datamap
Date Sun, 29 Jul 2018 14:25:20 GMT
Repository: carbondata
Updated Branches:
  refs/heads/master f5d3c17b7 -> 0e45f3ad9


[HOTFIX] CreateDataMapPost Event was skipped in case of preaggregate datamap

CreateDataMapPost Event was skipped in case of preaggregate datamap

This closes #2562


Project: http://git-wip-us.apache.org/repos/asf/carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/carbondata/commit/0e45f3ad
Tree: http://git-wip-us.apache.org/repos/asf/carbondata/tree/0e45f3ad
Diff: http://git-wip-us.apache.org/repos/asf/carbondata/diff/0e45f3ad

Branch: refs/heads/master
Commit: 0e45f3ad929a6509e8b905b947614225c18b52f0
Parents: f5d3c17
Author: Jatin <jatin.demla@knoldus.in>
Authored: Thu Jul 26 00:42:50 2018 +0530
Committer: kunal642 <kunalkapoor642@gmail.com>
Committed: Sun Jul 29 19:53:23 2018 +0530

----------------------------------------------------------------------
 .../org/apache/carbondata/events/DataMapEvents.scala  |  2 +-
 .../command/datamap/CarbonCreateDataMapCommand.scala  | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/0e45f3ad/integration/spark-common/src/main/scala/org/apache/carbondata/events/DataMapEvents.scala
----------------------------------------------------------------------
diff --git a/integration/spark-common/src/main/scala/org/apache/carbondata/events/DataMapEvents.scala
b/integration/spark-common/src/main/scala/org/apache/carbondata/events/DataMapEvents.scala
index 72c980c..e601633 100644
--- a/integration/spark-common/src/main/scala/org/apache/carbondata/events/DataMapEvents.scala
+++ b/integration/spark-common/src/main/scala/org/apache/carbondata/events/DataMapEvents.scala
@@ -27,7 +27,7 @@ import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier
  * example: bloom datamap, Lucene datamap
  */
 case class CreateDataMapPostExecutionEvent(sparkSession: SparkSession,
-    storePath: String, tableIdentifier: TableIdentifier)
+    storePath: String, tableIdentifier: Option[TableIdentifier], dmProviderName: String)
   extends Event with CreateDataMapEventsInfo
 
 /**

http://git-wip-us.apache.org/repos/asf/carbondata/blob/0e45f3ad/integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/datamap/CarbonCreateDataMapCommand.scala
----------------------------------------------------------------------
diff --git a/integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/datamap/CarbonCreateDataMapCommand.scala
b/integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/datamap/CarbonCreateDataMapCommand.scala
index 336793e..c40dcb0 100644
--- a/integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/datamap/CarbonCreateDataMapCommand.scala
+++ b/integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/datamap/CarbonCreateDataMapCommand.scala
@@ -97,6 +97,8 @@ case class CarbonCreateDataMapCommand(
         "For this datamap, main table is required. Use `CREATE DATAMAP ... ON TABLE ...`
")
     }
     dataMapProvider = DataMapManager.get.getDataMapProvider(mainTable, dataMapSchema, sparkSession)
+    val systemFolderLocation: String = CarbonProperties.getInstance().getSystemFolderLocation
+    val operationContext: OperationContext = new OperationContext()
 
     // If it is index datamap, check whether the column has datamap created already
     dataMapProvider match {
@@ -128,8 +130,6 @@ case class CarbonCreateDataMapCommand(
           }
         }
 
-        val operationContext: OperationContext = new OperationContext()
-        val systemFolderLocation: String = CarbonProperties.getInstance().getSystemFolderLocation
         val createDataMapPreExecutionEvent: CreateDataMapPreExecutionEvent =
           new CreateDataMapPreExecutionEvent(sparkSession,
             systemFolderLocation, tableIdentifier.get)
@@ -137,11 +137,6 @@ case class CarbonCreateDataMapCommand(
           operationContext)
         dataMapProvider.initMeta(queryString.orNull)
         DataMapStatusManager.disableDataMap(dataMapName)
-        val createDataMapPostExecutionEvent: CreateDataMapPostExecutionEvent =
-          new CreateDataMapPostExecutionEvent(sparkSession,
-            systemFolderLocation, tableIdentifier.get)
-        OperationListenerBus.getInstance().fireEvent(createDataMapPostExecutionEvent,
-          operationContext)
       case _ =>
         if (deferredRebuild) {
           throw new MalformedDataMapCommandException(
@@ -149,6 +144,11 @@ case class CarbonCreateDataMapCommand(
         }
         dataMapProvider.initMeta(queryString.orNull)
     }
+    val createDataMapPostExecutionEvent: CreateDataMapPostExecutionEvent =
+      new CreateDataMapPostExecutionEvent(sparkSession,
+        systemFolderLocation, tableIdentifier, dmProviderName)
+    OperationListenerBus.getInstance().fireEvent(createDataMapPostExecutionEvent,
+      operationContext)
     val LOGGER = LogServiceFactory.getLogService(this.getClass.getCanonicalName)
     LOGGER.audit(s"DataMap $dataMapName successfully added")
     Seq.empty


Mime
View raw message