mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Fixed NPE while testing ZeppelinSparkClusterTest
This commit is contained in:
parent
d1c4344f43
commit
1fb50abac6
1 changed files with 3 additions and 2 deletions
|
|
@ -96,7 +96,7 @@ public class ZeppelinSparkClusterTest extends AbstractTestRestApi {
|
|||
@Test
|
||||
public void sparkSQLTest() throws IOException {
|
||||
// create new note
|
||||
Note note = ZeppelinServer.notebook.createNote(null);
|
||||
Note note = ZeppelinServer.notebook.createNote(anonymous);
|
||||
int sparkVersion = getSparkVersionNumber(note);
|
||||
// DataFrame API is available from spark 1.3
|
||||
if (sparkVersion >= 13) {
|
||||
|
|
@ -140,7 +140,7 @@ public class ZeppelinSparkClusterTest extends AbstractTestRestApi {
|
|||
assertEquals(InterpreterResult.Type.TABLE, p.getResult().type());
|
||||
assertEquals("_1\t_2\nhello\t20\n", p.getResult().message());
|
||||
}
|
||||
ZeppelinServer.notebook.removeNote(note.getId(), null);
|
||||
ZeppelinServer.notebook.removeNote(note.getId(), anonymous);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -226,6 +226,7 @@ public class ZeppelinSparkClusterTest extends AbstractTestRestApi {
|
|||
p.setText("%pyspark from pyspark.sql import Row\n" +
|
||||
"df=sqlContext.createDataFrame([Row(id=1, age=20)])\n" +
|
||||
"z.show(df)");
|
||||
p.setAuthenticationInfo(anonymous);
|
||||
note.run(p.getId());
|
||||
waitForFinish(p);
|
||||
assertEquals(Status.FINISHED, p.getStatus());
|
||||
|
|
|
|||
Loading…
Reference in a new issue