コード例 #1
0
  /**
   * Script is missing.
   *
   * @throws Exception if failed
   */
  @Test(expected = IOException.class)
  public void script_missing() throws Exception {
    HadoopScript script = new HadoopScript("testing", set(), "com.example.Client", map(), map());

    HadoopScriptHandler handler = handler("env.ASAKUSA_HOME", getAsakusaHome().getAbsolutePath());
    ExecutionContext context =
        new ExecutionContext("tbatch", "tflow", "texec", ExecutionPhase.MAIN, map());
    handler.execute(ExecutionMonitor.NULL, context, script);
  }
コード例 #2
0
  /**
   * Asakusa home is missing.
   *
   * @throws Exception if failed
   */
  @Test(expected = IOException.class)
  public void home_missing() throws Exception {
    String target =
        new File(getAsakusaHome(), ProcessHadoopScriptHandler.PATH_EXECUTE).getAbsolutePath();
    putScript("arguments.sh", new File(target));

    HadoopScript script = new HadoopScript("testing", set(), "com.example.Client", map(), map());

    HadoopScriptHandler handler = handler();
    ExecutionContext context =
        new ExecutionContext("tbatch", "tflow", "texec", ExecutionPhase.MAIN, map());
    handler.execute(ExecutionMonitor.NULL, context, script);
  }