@Service @ConditionalOnProperty(value="punchline.enabled", havingValue="true") public class PunchlineExecuteService extends Object
Modifier and Type | Method and Description |
---|---|
String |
analyticsScan()
Launch analytics scan and return shell response
|
org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody |
execute(String tenant,
org.springframework.web.multipart.MultipartFile file,
String runtime)
Execute a one-shot Punchline
|
org.thales.punch.settings.api.ISettingsList |
getAllExecutions(String tenant,
String pmlId)
Get executions of all Punchline for a tenant
|
String |
getExecutionOutputById(String executionId)
Get execution output of a Punchline
|
org.thales.punch.settings.api.ISettingsList |
getExecutionsEventById(String executionId)
Get execution events of a Punchline
|
String[] |
getPunchlineClientArgs(String tenant,
String runtime,
File file) |
String |
scanPyspark()
Launch pyspark scan and return shell response
|
void |
startPunchlineClientAsync(String tenant,
File file,
String runtimeId,
String runtime,
String punchlineDescription) |
org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody |
startPunchlineForeground(String tenant,
String runtime,
File file) |
String |
stormScan()
Launch storm scan and return shell response
|
org.thales.punch.settings.api.ISettingsMap |
trigger(String args,
String tenant) |
public String analyticsScan() throws InterruptedException
InterruptedException
- if subprocess is interruptedpublic String stormScan() throws InterruptedException
InterruptedException
- if subprocess is interruptedpublic String scanPyspark() throws InterruptedException
InterruptedException
- Subprocess interruptedpublic org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody execute(String tenant, org.springframework.web.multipart.MultipartFile file, String runtime) throws IOException, InterruptedException
tenant
- Tenant namefile
- Punchline fileruntime
- Execution environment (storm | spark | pyspark)IOException
- Error when storing given file in the filesystemInterruptedException
public String[] getPunchlineClientArgs(String tenant, String runtime, File file)
public org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody startPunchlineForeground(String tenant, String runtime, File file)
public void startPunchlineClientAsync(String tenant, File file, String runtimeId, String runtime, String punchlineDescription)
public org.thales.punch.settings.api.ISettingsList getExecutionsEventById(String executionId) throws IOException
executionId
- ID of the executionIOException
- Error when getting executions from ESpublic String getExecutionOutputById(String executionId) throws IOException
executionId
- ID of the executionIOException
- Error when getting executions from ESpublic org.thales.punch.settings.api.ISettingsList getAllExecutions(String tenant, String pmlId) throws IOException
tenant
- Tenant nameIOException
- Error when getting data from ESCopyright © 2023. All rights reserved.