-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add recover index job statement (#119)
* Add recover command syntax and API Signed-off-by: Chen Dai <[email protected]> * Refactor IT with assertion helper Signed-off-by: Chen Dai <[email protected]> * Add IT for MV Signed-off-by: Chen Dai <[email protected]> * Update user manual and add test for backticks Signed-off-by: Chen Dai <[email protected]> * Add more logging and IT on FlintSpark API layer Signed-off-by: Chen Dai <[email protected]> * Reformat sql text in IT Signed-off-by: Chen Dai <[email protected]> * Add recovering transient state Signed-off-by: Chen Dai <[email protected]> * Detect streaming job state in update task Signed-off-by: Chen Dai <[email protected]> * Address PR comment Signed-off-by: Chen Dai <[email protected]> --------- Signed-off-by: Chen Dai <[email protected]>
- Loading branch information
Showing
10 changed files
with
394 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...tion/src/main/scala/org/opensearch/flint/spark/sql/job/FlintSparkIndexJobAstBuilder.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.flint.spark.sql.job | ||
|
||
import org.opensearch.flint.spark.sql.{FlintSparkSqlCommand, FlintSparkSqlExtensionsVisitor, SparkSqlAstBuilder} | ||
import org.opensearch.flint.spark.sql.FlintSparkSqlExtensionsParser.RecoverIndexJobStatementContext | ||
|
||
import org.apache.spark.sql.catalyst.plans.logical.Command | ||
|
||
/** | ||
* Flint Spark AST builder that builds Spark command for Flint index job management statement. | ||
*/ | ||
trait FlintSparkIndexJobAstBuilder extends FlintSparkSqlExtensionsVisitor[AnyRef] { | ||
self: SparkSqlAstBuilder => | ||
|
||
override def visitRecoverIndexJobStatement(ctx: RecoverIndexJobStatementContext): Command = { | ||
FlintSparkSqlCommand() { flint => | ||
val jobId = ctx.identifier().getText | ||
flint.recoverIndex(jobId) | ||
Seq.empty | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.