コード例 #1
0
ファイル: ZQLTest.java プロジェクト: rahulkumar-aws/zeppelin
  @Before
  public void setUp() throws Exception {
    super.setUp();
    tmpDir =
        new File(
            System.getProperty("java.io.tmpdir") + "/ZeppelinLTest_" + System.currentTimeMillis());
    tmpDir.mkdir();
    String tmpDirPath = tmpDir.getAbsolutePath();

    UtilsForTests.delete(new File("/tmp/warehouse"));
    System.setProperty(ConfVars.ZEPPELIN_ZAN_LOCAL_REPO.getVarName(), tmpDirPath);

    String q1 =
        "select *\nfrom (<%= z."
            + Q.INPUT_VAR_NAME
            + " %>) a\nlimit <%= z.param('limit') %><%= z.arg%>;\n";
    // erb library with resource
    new File(tmpDirPath + "/test").mkdir();
    UtilsForTests.createFileWithContent(tmpDirPath + "/test/zql.erb", q1);
    UtilsForTests.createFileWithContent(tmpDirPath + "/test/test_data.log", "");
    // web only library
    new File(tmpDirPath + "/test1").mkdir();
    new File(tmpDirPath + "/test1/web").mkdirs();
    UtilsForTests.createFileWithContent(
        tmpDirPath + "/test1/web/index.erb", "WEB <%= z.result.rows.get(0)[0] %>\n");
    // resource only library
    new File(tmpDirPath + "/test2").mkdir();
    UtilsForTests.createFileWithContent(tmpDirPath + "/test2/test2_res", "");

    // Dependencies: collection of ZeppelinDrivers + ZeppelinConfiguration + fs +
    // RubyExecutionEngine
    z = UtilsForTests.createZengine();
  }
コード例 #2
0
ファイル: ZQLTest.java プロジェクト: rahulkumar-aws/zeppelin
 @After
 public void tearDown() throws Exception {
   super.tearDown();
   UtilsForTests.delete(tmpDir);
   UtilsForTests.delete(new File("/tmp/warehouse"));
 }