-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide a way to modify spark parameters
Signed-off-by: Tomoyuki Morita <[email protected]>
- Loading branch information
Showing
34 changed files
with
421 additions
and
178 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
14 changes: 14 additions & 0 deletions
14
spark/src/main/java/org/opensearch/sql/spark/asyncquery/model/NullRequestContext.java
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,14 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.sql.spark.asyncquery.model; | ||
|
||
/** An implementation of RequestContext for where context is not required */ | ||
public class NullRequestContext implements RequestContext { | ||
@Override | ||
public Object getAttribute(String name) { | ||
return null; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
spark/src/main/java/org/opensearch/sql/spark/asyncquery/model/RequestContext.java
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,11 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.sql.spark.asyncquery.model; | ||
|
||
/** Context interface to provide additional request related information */ | ||
public interface RequestContext { | ||
Object getAttribute(String name); | ||
} |
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
15 changes: 15 additions & 0 deletions
15
...src/main/java/org/opensearch/sql/spark/config/OpenSearchSparkSubmitParameterModifier.java
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,15 @@ | ||
package org.opensearch.sql.spark.config; | ||
|
||
import lombok.AllArgsConstructor; | ||
import org.opensearch.sql.spark.asyncquery.model.SparkSubmitParameters; | ||
|
||
@AllArgsConstructor | ||
public class OpenSearchSparkSubmitParameterModifier implements SparkSubmitParameterModifier { | ||
|
||
private String extraParameters; | ||
|
||
@Override | ||
public void modifyParameters(SparkSubmitParameters parameters) { | ||
parameters.setExtraParameters(this.extraParameters); | ||
} | ||
} |
6 changes: 3 additions & 3 deletions
6
spark/src/main/java/org/opensearch/sql/spark/config/SparkExecutionEngineConfig.java
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 |
---|---|---|
@@ -1,21 +1,21 @@ | ||
package org.opensearch.sql.spark.config; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
/** | ||
* POJO for spark Execution Engine Config. Interface between {@link | ||
* org.opensearch.sql.spark.asyncquery.AsyncQueryExecutorService} and {@link | ||
* SparkExecutionEngineConfigSupplier} | ||
*/ | ||
@Data | ||
@NoArgsConstructor | ||
@Builder | ||
@AllArgsConstructor | ||
public class SparkExecutionEngineConfig { | ||
private String applicationId; | ||
private String region; | ||
private String executionRoleARN; | ||
private String sparkSubmitParameters; | ||
private SparkSubmitParameterModifier sparkSubmitParameterModifier; | ||
private String clusterName; | ||
} |
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
7 changes: 7 additions & 0 deletions
7
spark/src/main/java/org/opensearch/sql/spark/config/SparkSubmitParameterModifier.java
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,7 @@ | ||
package org.opensearch.sql.spark.config; | ||
|
||
import org.opensearch.sql.spark.asyncquery.model.SparkSubmitParameters; | ||
|
||
public interface SparkSubmitParameterModifier { | ||
void modifyParameters(SparkSubmitParameters parameters); | ||
} |
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
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.