pan3793 commented on code in PR #4725:
URL: https://github.com/apache/zeppelin/pull/4725#discussion_r1512118527
##########
zeppelin-interpreter-integration/src/test/java/org/apache/zeppelin/integration/SparkIntegrationTest.java:
##########
@@ -389,4 +393,20 @@ private String getPythonExec() throws IOException,
InterruptedException {
}
return IOUtils.toString(process.getInputStream(),
StandardCharsets.UTF_8).trim();
}
+
+ private String getRScriptExec() throws IOException, InterruptedException {
+ Process process = Runtime.getRuntime().exec(new String[]{"which",
"Rscript"});
+ if (process.waitFor() != 0) {
+ throw new RuntimeException("Fail to run command: which Rscript.");
+ }
+ return IOUtils.toString(process.getInputStream(),
StandardCharsets.UTF_8).trim();
+ }
+
+ private String getRExec() throws IOException, InterruptedException {
+ Process process = Runtime.getRuntime().exec(new String[]{"which", "R"});
+ if (process.waitFor() != 0) {
+ throw new RuntimeException("Fail to run command: which Rscript.");
Review Comment:
```suggestion
throw new RuntimeException("Fail to run command: which R.");
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]