Skip to content

Commit

Permalink
Effectively once not yet supported in Python (apache#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
srkukarni authored and sijie committed Mar 4, 2018
1 parent 433eb8b commit 5245529
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ void processArguments() throws Exception {
functionConfigBuilder.setRuntime(FunctionConfig.Runtime.JAVA);
userCodeFile = jarFile;
} else if (null != pyFile) {
// Can we do any checks here?
doPythonSubmitChecks(functionConfigBuilder);
functionConfigBuilder.setRuntime(FunctionConfig.Runtime.PYTHON);
userCodeFile = pyFile;
} else {
Expand Down Expand Up @@ -365,6 +365,12 @@ private void doJavaSubmitChecks(FunctionConfig.Builder functionConfigBuilder) {
}
}

private void doPythonSubmitChecks(FunctionConfig.Builder functionConfigBuilder) {
if (functionConfigBuilder.getProcessingGuarantees() == FunctionConfig.ProcessingGuarantees.EFFECTIVELY_ONCE) {
throw new RuntimeException("Effectively once not yet supported in python");
}
}

private void inferMissingArguments(FunctionConfig.Builder builder) {
if (builder.getName() == null || builder.getName().isEmpty()) {
inferMissingFunctionName(builder);
Expand Down

0 comments on commit 5245529

Please sign in to comment.