[GitHub] [carbondata] Indhumathi27 commented on a change in pull request #3811: [CARBONDATA-3874] segment mismatch between maintable and SI table when load with concurrency

2020-07-01 Thread GitBox


Indhumathi27 commented on a change in pull request #3811:
URL: https://github.com/apache/carbondata/pull/3811#discussion_r448252248



##
File path: 
integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/events/SILoadEventListenerForFailedSegments.scala
##
@@ -78,20 +78,29 @@ class SILoadEventListenerForFailedSegments extends 
OperationEventListener with L
   .getTableMetadata(TableIdentifier(indexTableName,
 Some(carbonLoadModel.getDatabaseName))).storage.properties
   .getOrElse("isSITableEnabled", "true").toBoolean
+val indexTable = metaStore
+  .lookupRelation(Some(carbonLoadModel.getDatabaseName), 
indexTableName)(
+sparkSession)
+  .asInstanceOf[CarbonRelation]
+  .carbonTable
 
-if (!isLoadSIForFailedSegments) {
+val metaPathMainTbl: String = carbonTable.getMetadataPath
+val listOfLoadFolderDetailsArrayMainTbl: 
Array[LoadMetadataDetails] =

Review comment:
   Better, can move getting load meta details of main table and SI to a 
method in a scala class like CarbonIndexUtil and reuse





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [carbondata] Indhumathi27 commented on a change in pull request #3811: [CARBONDATA-3874] segment mismatch between maintable and SI table when load with concurrency

2020-07-01 Thread GitBox


Indhumathi27 commented on a change in pull request #3811:
URL: https://github.com/apache/carbondata/pull/3811#discussion_r448251601



##
File path: 
integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/command/SICreationCommand.scala
##
@@ -390,8 +391,15 @@ private[sql] case class CarbonCreateSecondaryIndexCommand(
   }
   val indexTablePath = CarbonTablePath
 
.getMetadataPath(tableInfo.getOrCreateAbsoluteTableIdentifier.getTablePath)
+  val metaPathMainTbl: String = carbonTable.getMetadataPath

Review comment:
   If metaPathMainTbl and  metaPathSI variable used in one place only, can 
replace with  
`SegmentStatusManager.readLoadMetadata(carbonTable.getMetadataPath)`

##
File path: 
integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/events/SILoadEventListenerForFailedSegments.scala
##
@@ -78,20 +78,29 @@ class SILoadEventListenerForFailedSegments extends 
OperationEventListener with L
   .getTableMetadata(TableIdentifier(indexTableName,
 Some(carbonLoadModel.getDatabaseName))).storage.properties
   .getOrElse("isSITableEnabled", "true").toBoolean
+val indexTable = metaStore
+  .lookupRelation(Some(carbonLoadModel.getDatabaseName), 
indexTableName)(
+sparkSession)
+  .asInstanceOf[CarbonRelation]
+  .carbonTable
 
-if (!isLoadSIForFailedSegments) {
+val metaPathMainTbl: String = carbonTable.getMetadataPath
+val listOfLoadFolderDetailsArrayMainTbl: 
Array[LoadMetadataDetails] =

Review comment:
   Handle Same as above comment





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org