carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipes...@apache.org
Subject [13/25] carbondata git commit: [HOTFIX] Check concurrent loading in compaction command
Date Sat, 03 Mar 2018 12:44:00 GMT
[HOTFIX] Check concurrent loading in compaction command

In compaction command, concurrent loading should be checked in processData method

This closes #2002


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

Branch: refs/heads/branch-1.3
Commit: abb0a0b267430b94e988e26464108fce8c56dbf4
Parents: 36e770c
Author: Jacky Li <jacky.likun@qq.com>
Authored: Tue Feb 27 14:24:41 2018 +0800
Committer: ravipesala <ravi.pesala@gmail.com>
Committed: Sat Mar 3 18:00:46 2018 +0530

----------------------------------------------------------------------
 .../command/management/CarbonAlterTableCompactionCommand.scala | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/abb0a0b2/integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonAlterTableCompactionCommand.scala
----------------------------------------------------------------------
diff --git a/integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonAlterTableCompactionCommand.scala
b/integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonAlterTableCompactionCommand.scala
index 7e3b699..f6019e4 100644
--- a/integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonAlterTableCompactionCommand.scala
+++ b/integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonAlterTableCompactionCommand.scala
@@ -83,13 +83,13 @@ case class CarbonAlterTableCompactionCommand(
       val loadMetadataEvent = new LoadMetadataEvent(table, true)
       OperationListenerBus.getInstance().fireEvent(loadMetadataEvent, operationContext)
     }
-    if (SegmentStatusManager.isLoadInProgressInTable(table)) {
-      throw new ConcurrentOperationException(table, "loading", "compaction")
-    }
     Seq.empty
   }
 
   override def processData(sparkSession: SparkSession): Seq[Row] = {
+    if (SegmentStatusManager.isLoadInProgressInTable(table)) {
+      throw new ConcurrentOperationException(table, "loading", "compaction")
+    }
     operationContext.setProperty("compactionException", "true")
     var compactionType: CompactionType = null
     var compactionException = "true"


Mime
View raw message