-
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.
Implement blue/green deployment support in REPL mode
Features: - Add mutual exclusivity in session-based emr-s jobs to ensure only one job runs at a time, enhancing system stability during blue/green deployments. This allows active job exclusion and seamless task pickup by new jobs. Details in #94. Fixes: - Resolve a bug where long-running queries failed to cancel post-index mapping verification, by introducing timely query cancellation checks within the REPL loop. - Address issue #138 with the proposed short-term fix, improving reliability. Tests: - Conducted manual testing to validate blue/green deployment support and query cancellation. - Extended unit tests to cover new features and bug fixes. Signed-off-by: Kaituo Li <[email protected]>
- Loading branch information
Showing
7 changed files
with
753 additions
and
161 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
23 changes: 23 additions & 0 deletions
23
spark-sql-application/src/main/scala/org/apache/spark/sql/CommandContext.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,23 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.apache.spark.sql | ||
|
||
import scala.concurrent.{ExecutionContextExecutor, Future} | ||
|
||
import org.opensearch.flint.core.storage.{FlintReader, OpenSearchUpdater} | ||
|
||
case class CommandContext( | ||
flintReader: FlintReader, | ||
spark: SparkSession, | ||
dataSource: String, | ||
resultIndex: String, | ||
sessionId: String, | ||
futureMappingCheck: Future[Either[String, Unit]], | ||
executionContext: ExecutionContextExecutor, | ||
flintSessionIndexUpdater: OpenSearchUpdater, | ||
osClient: OSClient, | ||
sessionIndex: String, | ||
jobId: String) |
10 changes: 10 additions & 0 deletions
10
spark-sql-application/src/main/scala/org/apache/spark/sql/CommandState.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,10 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.apache.spark.sql | ||
|
||
case class CommandState( | ||
recordedLastActivityTime: Long, | ||
recordedVerificationResult: VerificationResult) |
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.