mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Debug sparkRTest
This commit is contained in:
parent
31369c6e65
commit
a208cd0b3a
2 changed files with 20 additions and 0 deletions
|
|
@ -26,6 +26,9 @@ import java.util.List;
|
|||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import org.apache.commons.exec.CommandLine;
|
||||
import org.apache.commons.exec.DefaultExecutor;
|
||||
import org.apache.commons.exec.PumpStreamHandler;
|
||||
import org.apache.commons.httpclient.HttpClient;
|
||||
import org.apache.commons.httpclient.HttpMethodBase;
|
||||
import org.apache.commons.httpclient.methods.ByteArrayRequestEntity;
|
||||
|
|
@ -415,6 +418,22 @@ public abstract class AbstractTestRestApi {
|
|||
};
|
||||
}
|
||||
|
||||
|
||||
public static void ps() {
|
||||
DefaultExecutor executor = new DefaultExecutor();
|
||||
executor.setStreamHandler(new PumpStreamHandler(System.out, System.err));
|
||||
|
||||
CommandLine cmd = CommandLine.parse("ps");
|
||||
cmd.addArgument("aux", false);
|
||||
|
||||
try {
|
||||
executor.execute(cmd);
|
||||
} catch (IOException e) {
|
||||
LOG.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** Status code matcher */
|
||||
protected Matcher<? super HttpMethodBase> isForbiden() { return responsesWith(403); }
|
||||
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ public class ZeppelinSparkClusterTest extends AbstractTestRestApi {
|
|||
"df <- createDataFrame(sqlContext, localDF)\n" +
|
||||
"count(df)"
|
||||
);
|
||||
ps();
|
||||
note.run(p.getId());
|
||||
waitForFinish(p);
|
||||
System.err.println("sparkRTest=" + p.getResult().message());
|
||||
|
|
|
|||
Loading…
Reference in a new issue