本文整理汇总了Python中mrjob.emr.EMRJobRunner.simulate_progress方法的典型用法代码示例。如果您正苦于以下问题:Python EMRJobRunner.simulate_progress方法的具体用法?Python EMRJobRunner.simulate_progress怎么用?Python EMRJobRunner.simulate_progress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mrjob.emr.EMRJobRunner
的用法示例。
在下文中一共展示了EMRJobRunner.simulate_progress方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_terminate_cluster
# 需要导入模块: from mrjob.emr import EMRJobRunner [as 别名]
# 或者: from mrjob.emr.EMRJobRunner import simulate_progress [as 别名]
def test_terminate_cluster(self):
cluster_id = self.make_cluster(pool_clusters=True)
self.monkey_patch_argv('--quiet', '--no-conf', 'j-MOCKCLUSTER0')
terminate_main()
emr_conn = EMRJobRunner(conf_paths=[]).make_emr_conn()
cluster = _patched_describe_cluster(emr_conn, cluster_id)
emr_conn.simulate_progress(cluster_id)
self.assertEqual(cluster.status.state, 'TERMINATED')
示例2: test_terminate_pool
# 需要导入模块: from mrjob.emr import EMRJobRunner [as 别名]
# 或者: from mrjob.emr.EMRJobRunner import simulate_progress [as 别名]
def test_terminate_pool(self):
jf_id = self.make_job_flow(pool_emr_job_flows=True)
emr_conn = EMRJobRunner(conf_path=False).make_emr_conn()
for i in range(3):
emr_conn.simulate_progress(jf_id)
self.monkey_patch_argv("--quiet", "--no-conf", "-t", jf_id)
self.monkey_patch_stdout()
pool_main()
value = self.stdout.getvalue()
self.assertIn("j-MOCKJOBFLOW0", value)
示例3: test_find_job_flow
# 需要导入模块: from mrjob.emr import EMRJobRunner [as 别名]
# 或者: from mrjob.emr.EMRJobRunner import simulate_progress [as 别名]
def test_find_job_flow(self):
jf_id = self.make_job_flow(pool_emr_job_flows=True)
emr_conn = EMRJobRunner(conf_paths=[]).make_emr_conn()
for i in range(3):
emr_conn.simulate_progress(jf_id)
self.monkey_patch_argv(
'--quiet', '--no-conf',
'-f')
self.monkey_patch_stdout()
pool_main()
value = self.stdout.getvalue()
self.assertIn('j-MOCKJOBFLOW0', value)