Package org.gorpipe.spark
Class SparkOperatorRunner
java.lang.Object
org.gorpipe.spark.SparkOperatorRunner
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateSparkApplication(com.fasterxml.jackson.databind.ObjectMapper mapper, String contents) voidvoidvoiddeleteSparkApplication(String name) static StringgetSparkOperatorYaml(String projectDir) run(String uristr, String requestId, String projectDir, org.gorpipe.gor.monitor.GorMonitor gm, String[] commands, String[] resourceSplit, String cachefile) voidrunJob(org.apache.spark.sql.SparkSession sparkSession, String yaml, String projectDir, SparkOperatorSpecs sparkOperatorSpecs, org.gorpipe.gor.monitor.GorMonitor gm, String sparkApplicationName, String[] args) voidrunQueryHandler(String appName, String uristr, String requestId, Path projectDir, org.gorpipe.gor.monitor.GorMonitor gm, String[] commands, String[] fingerprints, String[] jobIds, String[] cacheFiles, String[] resources) voidrunSparkOperator(org.gorpipe.gor.monitor.GorMonitor gm, String sparkApplicationName, Path projectDir, String[] args, String[] resources) voidrunYaml(String yaml, String projectroot, SparkOperatorSpecs specs) booleanwaitForSparkApplicationToComplete(org.gorpipe.gor.monitor.GorMonitor mon, String name)
-
Field Details
-
SPARKAPPLICATION_COMPLETED_STATE
- See Also:
-
SPARKAPPLICATION_FAILED_STATE
- See Also:
-
SPARKAPPLICATION_RUNNING_STATE
- See Also:
-
-
Constructor Details
-
SparkOperatorRunner
- Throws:
IOException
-
-
Method Details
-
getSparkApplicationState
public String getSparkApplicationState(String name) throws io.kubernetes.client.openapi.ApiException - Throws:
io.kubernetes.client.openapi.ApiException
-
deleteSparkApplication
- Throws:
io.kubernetes.client.openapi.ApiException
-
waitForSparkApplicationToComplete
public boolean waitForSparkApplicationToComplete(org.gorpipe.gor.monitor.GorMonitor mon, String name) throws io.kubernetes.client.openapi.ApiException, InterruptedException - Throws:
io.kubernetes.client.openapi.ApiExceptionInterruptedException
-
createSparkApplicationFromJson
public void createSparkApplicationFromJson(String json) throws io.kubernetes.client.openapi.ApiException, com.fasterxml.jackson.core.JsonProcessingException - Throws:
io.kubernetes.client.openapi.ApiExceptioncom.fasterxml.jackson.core.JsonProcessingException
-
createSparkApplicationFromYaml
public void createSparkApplicationFromYaml(String yaml) throws io.kubernetes.client.openapi.ApiException, com.fasterxml.jackson.core.JsonProcessingException - Throws:
io.kubernetes.client.openapi.ApiExceptioncom.fasterxml.jackson.core.JsonProcessingException
-
createSparkApplication
public void createSparkApplication(com.fasterxml.jackson.databind.ObjectMapper mapper, String contents) throws io.kubernetes.client.openapi.ApiException, com.fasterxml.jackson.core.JsonProcessingException - Throws:
io.kubernetes.client.openapi.ApiExceptioncom.fasterxml.jackson.core.JsonProcessingException
-
getSparkOperatorYaml
- Throws:
IOException
-
runQueryHandler
public void runQueryHandler(String appName, String uristr, String requestId, Path projectDir, org.gorpipe.gor.monitor.GorMonitor gm, String[] commands, String[] fingerprints, String[] jobIds, String[] cacheFiles, String[] resources) throws IOException, io.kubernetes.client.openapi.ApiException, InterruptedException - Throws:
IOExceptionio.kubernetes.client.openapi.ApiExceptionInterruptedException
-
runSparkOperator
public void runSparkOperator(org.gorpipe.gor.monitor.GorMonitor gm, String sparkApplicationName, Path projectDir, String[] args, String[] resources) throws IOException, io.kubernetes.client.openapi.ApiException, InterruptedException - Throws:
IOExceptionio.kubernetes.client.openapi.ApiExceptionInterruptedException
-
runJob
public void runJob(org.apache.spark.sql.SparkSession sparkSession, String yaml, String projectDir, SparkOperatorSpecs sparkOperatorSpecs, org.gorpipe.gor.monitor.GorMonitor gm, String sparkApplicationName, String[] args) throws InterruptedException, io.kubernetes.client.openapi.ApiException, IOException - Throws:
InterruptedExceptionio.kubernetes.client.openapi.ApiExceptionIOException
-
run
public Path run(String uristr, String requestId, String projectDir, org.gorpipe.gor.monitor.GorMonitor gm, String[] commands, String[] resourceSplit, String cachefile) throws IOException, io.kubernetes.client.openapi.ApiException, InterruptedException - Throws:
IOExceptionio.kubernetes.client.openapi.ApiExceptionInterruptedException
-
runYaml
public void runYaml(String yaml, String projectroot, SparkOperatorSpecs specs) throws IOException, io.kubernetes.client.openapi.ApiException - Throws:
IOExceptionio.kubernetes.client.openapi.ApiException
-