Examples of HdfsApi


Examples of org.apache.ambari.view.pig.utils.HdfsApi

    Assert.assertEquals(204, response.getStatus());
  }

  @Test
  public void testJobStatusFlow() throws Exception {
    HdfsApi hdfsApi = createNiceMock(HdfsApi.class);
    expect(hdfsApi.copy(eq("/tmp/script.pig"), startsWith("/tmp/.pigjobs/"))).andReturn(true);

    ByteArrayOutputStream do_stream = new ByteArrayOutputStream();

    FSDataOutputStream stream = new FSDataOutputStream(do_stream);
    expect(hdfsApi.create(anyString(), eq(true))).andReturn(stream);
    replay(hdfsApi);
    JobService.setHdfsApi(hdfsApi);

    TempletonApi api = createNiceMock(TempletonApi.class);
    jobService.getResourceManager().setTempletonApi(api);
View Full Code Here

Examples of org.apache.ambari.view.pig.utils.HdfsApi

        LOG.error(message);
        throw new WebServiceException(message);
      }

      try {
        hdfsApi = new HdfsApi(defaultFS, getHdfsUsername(context));
        LOG.info("HdfsApi connected OK");
      } catch (IOException e) {
        String message = "HdfsApi IO error: " + e.getMessage();
        LOG.error(message);
        throw new WebServiceException(message, e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.