You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by GitBox <gi...@apache.org> on 2020/07/16 18:05:28 UTC
[GitHub] [carbondata] akashrn5 commented on a change in pull request #3850: [CARBONDATA-3907]Reuse firePreLoadEvents and firePostLoadEvents methods from CommonLoadUtils to trigger LoadTablePreExecutionEvent and LoadTablePostExecutionEvent respectively in alter table add segment flow
akashrn5 commented on a change in pull request #3850:
URL: https://github.com/apache/carbondata/pull/3850#discussion_r455974523
##########
File path: integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonAddLoadCommand.scala
##########
@@ -228,24 +228,17 @@ case class CarbonAddLoadCommand(
model.setTableName(carbonTable.getTableName)
val operationContext = new OperationContext
operationContext.setProperty("isLoadOrCompaction", false)
- val loadTablePreExecutionEvent: LoadTablePreExecutionEvent =
- new LoadTablePreExecutionEvent(
- carbonTable.getCarbonTableIdentifier,
- model)
- operationContext.setProperty("isOverwrite", false)
- OperationListenerBus.getInstance.fireEvent(loadTablePreExecutionEvent, operationContext)
- // Add pre event listener for index indexSchema
- val tableIndexes = IndexStoreManager.getInstance().getAllCGAndFGIndexes(carbonTable)
- val indexOperationContext = new OperationContext()
- if (tableIndexes.size() > 0) {
- val indexNames: mutable.Buffer[String] =
- tableIndexes.asScala.map(index => index.getIndexSchema.getIndexName)
- val buildIndexPreExecutionEvent: BuildIndexPreExecutionEvent =
- BuildIndexPreExecutionEvent(
- sparkSession, carbonTable.getAbsoluteTableIdentifier, indexNames)
- OperationListenerBus.getInstance().fireEvent(buildIndexPreExecutionEvent,
- indexOperationContext)
- }
+ val (tableIndexes, indexOperationContext) = CommonLoadUtils.firePreLoadEvents(
Review comment:
@VenuReddy2103 can you confirm if at all please the same function is being used, if not change there also.
----------------------------------------------------------------
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:
users@infra.apache.org