use of com.thinkbiganalytics.kylo.spark.model.StatementOutputResponse in project kylo by Teradata.
the class LivyRestModelTransformer method toUri.
public static URI toUri(Statement statement) {
StatementOutputResponse sor = statement.getOutput();
checkCodeWasWellFormed(sor);
return serializeStatementOutputResponse(sor, URI.class);
}
use of com.thinkbiganalytics.kylo.spark.model.StatementOutputResponse in project kylo by Teradata.
the class LivyRestModelTransformer method toSaveResponse.
public static SaveResponse toSaveResponse(Statement statement) {
StatementOutputResponse sor = statement.getOutput();
checkCodeWasWellFormed(sor);
if (statement.getState() != StatementState.available) {
SaveResponse response = new SaveResponse();
response.setStatus(StatementStateTranslator.translateToSaveResponse(statement.getState()));
return response;
}
SaveResponse saveResponse = serializeStatementOutputResponse(sor, SaveResponse.class);
if (saveResponse.getStatus() == SaveResponse.Status.ERROR) {
throw new SparkLivySaveException(saveResponse.getMessage(), saveResponse.getId());
}
return saveResponse;
}
use of com.thinkbiganalytics.kylo.spark.model.StatementOutputResponse in project kylo by Teradata.
the class LivyRestModelTransformer method toDataSources.
public static DataSources toDataSources(Statement statement) {
StatementOutputResponse sor = statement.getOutput();
checkCodeWasWellFormed(sor);
return serializeStatementOutputResponse(sor, DataSources.class);
}
Aggregations