-
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.
Merge branch 'main' into support-if-not-exists
Signed-off-by: Chen Dai <[email protected]>
- Loading branch information
Showing
15 changed files
with
291 additions
and
62 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
47 changes: 47 additions & 0 deletions
47
...-spark-integration/src/main/scala/org/opensearch/flint/spark/FlintSparkIndexOptions.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,47 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.flint.spark | ||
|
||
/** | ||
* Flint Spark index configurable options. | ||
* | ||
* @param options | ||
* index option mappings | ||
*/ | ||
case class FlintSparkIndexOptions(options: Map[String, String]) { | ||
|
||
/** | ||
* Is Flint index auto refreshed or manual refreshed. | ||
* | ||
* @return | ||
* auto refresh option value | ||
*/ | ||
def autoRefresh(): Boolean = options.getOrElse("auto_refresh", "false").toBoolean | ||
|
||
/** | ||
* The refresh interval (only valid if auto refresh enabled). | ||
* | ||
* @return | ||
* refresh interval expression | ||
*/ | ||
def refreshInterval(): Option[String] = options.get("refresh_interval") | ||
|
||
/** | ||
* The checkpoint location which maybe required by Flint index's refresh. | ||
* | ||
* @return | ||
* checkpoint location path | ||
*/ | ||
def checkpointLocation(): Option[String] = options.get("checkpoint_location") | ||
} | ||
|
||
object FlintSparkIndexOptions { | ||
|
||
/** | ||
* Empty options | ||
*/ | ||
val empty: FlintSparkIndexOptions = FlintSparkIndexOptions(Map.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
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.