本文整理汇总了Python中mrjob.tools.emr.audit_usage.main函数的典型用法代码示例。如果您正苦于以下问题:Python main函数的具体用法?Python main怎么用?Python main使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了main函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_with_one_job_flow
def test_with_one_job_flow(self):
emr_conn = boto.emr.connection.EmrConnection()
emr_conn.run_jobflow('no name', log_uri=None)
self.monkey_patch_stdout()
main(['-q', '--no-conf'])
self.assertIn(b'j-MOCKJOBFLOW0', sys.stdout.getvalue())
开发者ID:Roguelazer,项目名称:mrjob,代码行数:7,代码来源:test_audit_usage.py
示例2: test_with_one_cluster
def test_with_one_cluster(self):
emr_conn = boto.emr.connection.EmrConnection()
emr_conn.run_jobflow("no name", job_flow_role="fake-instance-profile", service_role="fake-service-role")
self.monkey_patch_stdout()
main(["-q", "--no-conf"])
self.assertIn(b"j-MOCKCLUSTER0", sys.stdout.getvalue())
开发者ID:mtai,项目名称:mrjob,代码行数:7,代码来源:test_audit_usage.py
示例3: test_with_one_cluster
def test_with_one_cluster(self):
emr_conn = boto.emr.connection.EmrConnection()
emr_conn.run_jobflow('no name', job_flow_role='fake-instance-profile',
service_role='fake-service-role')
self.monkey_patch_stdout()
main(['-q', '--no-conf'])
self.assertIn(b'j-MOCKCLUSTER0', sys.stdout.getvalue())
开发者ID:anirudhreddy92,项目名称:mrjob,代码行数:8,代码来源:test_audit_usage.py
示例4: test_with_one_cluster
def test_with_one_cluster(self):
emr_client = boto3.client('emr')
emr_client.run_job_flow(
Name='no name',
Instances=dict(
MasterInstanceType='m1.medium',
InstanceCount=1),
JobFlowRole='fake-instance-profile',
ServiceRole='fake-service-role',
ReleaseLabel='emr-5.0.0')
self.monkey_patch_stdout()
main(['-q', '--no-conf'])
self.assertIn(b'j-MOCKCLUSTER0', sys.stdout.getvalue())
self.assertTrue(self.repeat_sleep.called)
self.assertEqual(self.describe_cluster_sleep.call_count, 1)
开发者ID:okomestudio,项目名称:mrjob,代码行数:17,代码来源:test_audit_usage.py
示例5: audit_usage
def audit_usage(args):
from mrjob.tools.emr.audit_usage import main
main(args)
开发者ID:gitbenedict,项目名称:mrjob,代码行数:3,代码来源:cmd.py
示例6: terminate_cluster
def terminate_cluster(args):
from mrjob.tools.emr.terminate_cluster import main
main(args)
开发者ID:gitbenedict,项目名称:mrjob,代码行数:3,代码来源:cmd.py
示例7: terminate_jf
def terminate_jf(args):
from mrjob.tools.emr.terminate_job_flow import main
main(args)
开发者ID:gitbenedict,项目名称:mrjob,代码行数:3,代码来源:cmd.py
示例8: s3_tmpwatch
def s3_tmpwatch(args):
from mrjob.tools.emr.s3_tmpwatch import main
main(args)
开发者ID:gitbenedict,项目名称:mrjob,代码行数:3,代码来源:cmd.py
示例9: terminate_idle_jfs
def terminate_idle_jfs(args):
from mrjob.tools.emr.terminate_idle_job_flows import main
main(args)
开发者ID:gitbenedict,项目名称:mrjob,代码行数:3,代码来源:cmd.py
示例10: mrboss
def mrboss(args):
from mrjob.tools.emr.mrboss import main
main(args)
开发者ID:gitbenedict,项目名称:mrjob,代码行数:3,代码来源:cmd.py
示例11: test_with_no_job_flows
def test_with_no_job_flows(self):
self.monkey_patch_stdout()
main(['-q', '--no-conf']) # just make sure it doesn't crash
开发者ID:Roguelazer,项目名称:mrjob,代码行数:3,代码来源:test_audit_usage.py
示例12: test_with_no_clusters
def test_with_no_clusters(self):
self.monkey_patch_stdout()
main(['-q', '--no-conf']) # make sure it doesn't crash
self.assertTrue(self.repeat_sleep.called)
self.assertFalse(self.describe_cluster_sleep.called)
开发者ID:okomestudio,项目名称:mrjob,代码行数:6,代码来源:test_audit_usage.py
示例13: test_with_one_job_flow
def test_with_one_job_flow(self):
emr_conn = boto_2_1_1_83aae37b.EmrConnection()
emr_conn.run_jobflow('no name', log_uri=None)
main(['-q', '--no-conf'])
self.assertIn('j-MOCKJOBFLOW0', self.stdout.getvalue())
开发者ID:dataartisan,项目名称:mrjob,代码行数:6,代码来源:test_audit_usage.py
示例14: collect_emr_stats
def collect_emr_stats(args):
from mrjob.tools.emr.collect_emr_stats import main
main(args)
开发者ID:DanisHack,项目名称:mrjob,代码行数:3,代码来源:cmd.py
示例15: fetch_logs
def fetch_logs(args):
from mrjob.tools.emr.fetch_logs import main
main(args)
开发者ID:DanisHack,项目名称:mrjob,代码行数:3,代码来源:cmd.py
示例16: _spark_submit
def _spark_submit(args):
from mrjob.tools.spark_submit import main
main(args)
开发者ID:Affirm,项目名称:mrjob,代码行数:3,代码来源:cmd.py
示例17: test_with_no_clusters
def test_with_no_clusters(self):
self.monkey_patch_stdout()
main(["-q", "--no-conf"]) # just make sure it doesn't crash
开发者ID:mtai,项目名称:mrjob,代码行数:3,代码来源:test_audit_usage.py
示例18: _terminate_idle_clusters
def _terminate_idle_clusters(args):
from mrjob.tools.emr.terminate_idle_clusters import main
main(args)
开发者ID:okomestudio,项目名称:mrjob,代码行数:3,代码来源:cmd.py
示例19: create_cluster
def create_cluster(args):
from mrjob.tools.emr.create_cluster import main
main(args)
开发者ID:gitbenedict,项目名称:mrjob,代码行数:3,代码来源:cmd.py
示例20: terminate_idle_clusters
@command('terminate-idle-clusters', 'Terminate idle EMR clusters')
def terminate_idle_clusters(args):
from mrjob.tools.emr.terminate_idle_clusters import main
main(args)
# deprecated alias for terminate-idle-clusters, delete in v0.6.0
@command('terminate-idle-job-flows')
def terminate_idle_jfs(args):
from mrjob.tools.emr.terminate_idle_job_flows import main
main(args)
@command('terminate-cluster', 'Terminate a single EMR cluster')
def terminate_cluster(args):
from mrjob.tools.emr.terminate_cluster import main
main(args)
# deprecated alias for terminate-cluster, delete in v0.6.0
@command('terminate-job-flow')
def terminate_jf(args):
from mrjob.tools.emr.terminate_job_flow import main
main(args)
if __name__ == '__main__':
main()
开发者ID:gitbenedict,项目名称:mrjob,代码行数:28,代码来源:cmd.py
注:本文中的mrjob.tools.emr.audit_usage.main函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论