• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python audit_usage.main函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python _JOB_KEY_RE.match函数代码示例发布时间:2022-05-27
下一篇:
Python setup.WorkingDirManager类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap