当前位置: 首页>>代码示例>>Java>>正文


Java OozieClient.getJobInfo方法代码示例

本文整理汇总了Java中org.apache.oozie.client.OozieClient.getJobInfo方法的典型用法代码示例。如果您正苦于以下问题:Java OozieClient.getJobInfo方法的具体用法?Java OozieClient.getJobInfo怎么用?Java OozieClient.getJobInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.oozie.client.OozieClient的用法示例。


在下文中一共展示了OozieClient.getJobInfo方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: waitForWorkflow

import org.apache.oozie.client.OozieClient; //导入方法依赖的package包/类
private void waitForWorkflow(String instance, WorkflowJob.Status status) throws Exception {
    ExternalId extId = new ExternalId(processName, Tag.DEFAULT, EntityUtil.parseDateUTC(instance));
    OozieClient ozClient = OozieClientFactory.get(
            (Cluster) ConfigurationStore.get().get(EntityType.CLUSTER, clusterName));
    String jobId = ozClient.getJobId(extId.getId());
    WorkflowJob jobInfo = null;
    for (int i = 0; i < 15; i++) {
        jobInfo = ozClient.getJobInfo(jobId);
        if (jobInfo.getStatus() == status) {
            break;
        }
        System.out.println("Waiting for workflow job " + jobId + " status " + status);
        Thread.sleep((i + 1) * 1000);
    }
    Assert.assertEquals(status, jobInfo.getStatus());
}
 
开发者ID:shaikidris,项目名称:incubator-falcon,代码行数:17,代码来源:ProcessInstanceManagerTest.java

示例2: waitForWorkflow

import org.apache.oozie.client.OozieClient; //导入方法依赖的package包/类
private void waitForWorkflow(String instance, WorkflowJob.Status status) throws Exception {
    ExternalId extId = new ExternalId(processName, Tag.DEFAULT, EntityUtil.parseDateUTC(instance));
    OozieClient ozClient = OozieClientFactory.get((Cluster) ConfigurationStore.get().get(EntityType.CLUSTER, clusterName));
    String jobId = ozClient.getJobId(extId.getId());
    WorkflowJob jobInfo = null;
    for (int i = 0; i < 15; i++) {
        jobInfo = ozClient.getJobInfo(jobId);
        if (jobInfo.getStatus() == status)
            break;
        System.out.println("Waiting for workflow job " + jobId + " status " + status);
        Thread.sleep((i + 1) * 1000);
    }
    Assert.assertEquals(status, jobInfo.getStatus());
}
 
开发者ID:sriksun,项目名称:ivry-security,代码行数:15,代码来源:ProcessInstanceManagerTest.java

示例3: testLogMover

import org.apache.oozie.client.OozieClient; //导入方法依赖的package包/类
@Test
public void testLogMover() throws Exception {
	CurrentUser.authenticate(System.getProperty("user.name"));
	OozieWorkflowEngine engine = new OozieWorkflowEngine();
	engine.schedule(testProcess);

	OozieClient client = new OozieClient(
			ClusterHelper.getOozieUrl(testCluster.getCluster()));
	List<WorkflowJob> jobs;
	while (true) {
		jobs = client.getJobsInfo(OozieClient.FILTER_NAME + "="
				+ "IVORY_PROCESS_DEFAULT_" + processName);
		if (jobs.size() > 0) {
			break;
		} else {
			Thread.sleep(100);
		}
	}

	WorkflowJob job = jobs.get(0);
	while (true) {
		if (!(job.getStatus() == WorkflowJob.Status.RUNNING || job
				.getStatus() == WorkflowJob.Status.PREP)) {
			break;
		} else {
			Thread.sleep(100);
			job = client.getJobInfo(job.getId());
		}
	}

	Path oozieLogPath = new Path(getLogPath(),
			"job-2010-01-01-01-00/000/oozie.log");
	Assert.assertTrue(fs.exists(oozieLogPath));

	testLogMoverWithNextRunId(job.getId());

}
 
开发者ID:sriksun,项目名称:ivry-security,代码行数:38,代码来源:LogMoverTest.java

示例4: testLogMover

import org.apache.oozie.client.OozieClient; //导入方法依赖的package包/类
@Test
public void testLogMover() throws Exception {
    CurrentUser.authenticate(System.getProperty("user.name"));
    OozieWorkflowEngine engine = new OozieWorkflowEngine();
    engine.schedule(testProcess);

    OozieClient client = new OozieClient(
            ClusterHelper.getOozieUrl(testCluster.getCluster()));
    List<WorkflowJob> jobs;
    while (true) {
        jobs = client.getJobsInfo(OozieClient.FILTER_NAME + "="
                + "FALCON_PROCESS_DEFAULT_" + processName);
        if (jobs.size() > 0) {
            break;
        } else {
            Thread.sleep(100);
        }
    }

    WorkflowJob job = jobs.get(0);
    while (true) {
        if (!(job.getStatus() == WorkflowJob.Status.RUNNING || job
                .getStatus() == WorkflowJob.Status.PREP)) {
            break;
        } else {
            Thread.sleep(100);
            job = client.getJobInfo(job.getId());
        }
    }

    Path oozieLogPath = new Path(getLogPath(),
            "job-2010-01-01-01-00/000/oozie.log");
    Assert.assertTrue(fs.exists(oozieLogPath));

    testLogMoverWithNextRunId(job.getId());

}
 
开发者ID:shaikidris,项目名称:incubator-falcon,代码行数:38,代码来源:LogMoverTest.java

示例5: fetchWorkflowActions

import org.apache.oozie.client.OozieClient; //导入方法依赖的package包/类
private List<WorkflowAction> fetchWorkflowActions(String oozieUrl, String workflowId) throws OozieClientException {
    
    OozieClient oozieClient = oozieClientFactory.createOozieClient(oozieUrl);
    
    WorkflowJob job = oozieClient.getJobInfo(workflowId);
    
    return job.getActions();
}
 
开发者ID:openaire,项目名称:iis,代码行数:9,代码来源:OozieTimeReportGenerator.java


注:本文中的org.apache.oozie.client.OozieClient.getJobInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。