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

Python db_engine_specs.HiveEngineSpec类代码示例

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

本文整理汇总了Python中superset.db_engine_specs.HiveEngineSpec的典型用法代码示例。如果您正苦于以下问题:Python HiveEngineSpec类的具体用法?Python HiveEngineSpec怎么用?Python HiveEngineSpec使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: test_0_progress

 def test_0_progress(self):
     log = """
         17/02/07 18:26:27 INFO log.PerfLogger: <PERFLOG method=compile from=org.apache.hadoop.hive.ql.Driver>
         17/02/07 18:26:27 INFO log.PerfLogger: <PERFLOG method=parse from=org.apache.hadoop.hive.ql.Driver>
     """.split('\n')  # noqa ignore: E501
     self.assertEquals(
         0, HiveEngineSpec.progress(log))
开发者ID:tothandor,项目名称:incubator-superset,代码行数:7,代码来源:db_engine_specs_test.py


示例2: test_job_1_launched_stage_1_0_progress

 def test_job_1_launched_stage_1_0_progress(self):
     log = """
         17/02/07 19:15:55 INFO ql.Driver: Total jobs = 2
         17/02/07 19:15:55 INFO ql.Driver: Launching Job 1 out of 2
         17/02/07 19:16:09 INFO exec.Task: 2017-02-07 19:16:09,173 Stage-1 map = 0%,  reduce = 0%
     """.split('\n')  # noqa ignore: E501
     self.assertEquals(0, HiveEngineSpec.progress(log))
开发者ID:tothandor,项目名称:incubator-superset,代码行数:7,代码来源:db_engine_specs_test.py


示例3: test_job_2_launched_stage_2_stages_progress

 def test_job_2_launched_stage_2_stages_progress(self):
     log = """
         17/02/07 19:15:55 INFO ql.Driver: Total jobs = 2
         17/02/07 19:15:55 INFO ql.Driver: Launching Job 1 out of 2
         17/02/07 19:16:09 INFO exec.Task: 2017-02-07 19:16:09,173 Stage-1 map = 100%,  reduce = 0%
         17/02/07 19:15:55 INFO ql.Driver: Launching Job 2 out of 2
         17/02/07 19:16:09 INFO exec.Task: 2017-02-07 19:16:09,173 Stage-1 map = 0%,  reduce = 0%
         17/02/07 19:16:09 INFO exec.Task: 2017-02-07 19:16:09,173 Stage-1 map = 40%,  reduce = 0%
     """.split('\n')
     self.assertEquals(60, HiveEngineSpec.progress(log))
开发者ID:invenis-paris,项目名称:incubator-superset,代码行数:10,代码来源:db_engine_specs_test.py


示例4: test_hive_error_msg

    def test_hive_error_msg(self):
        msg = (
            '{...} errorMessage="Error while compiling statement: FAILED: '
            'SemanticException [Error 10001]: Line 4'
            ':5 Table not found \'fact_ridesfdslakj\'", statusCode=3, '
            'sqlState=\'42S02\', errorCode=10001)){...}')
        self.assertEquals((
            'Error while compiling statement: FAILED: '
            'SemanticException [Error 10001]: Line 4:5 '
            "Table not found 'fact_ridesfdslakj'"),
            HiveEngineSpec.extract_error_message(Exception(msg)))

        e = Exception("Some string that doesn't match the regex")
        self.assertEquals(
            str(e), HiveEngineSpec.extract_error_message(e))

        msg = (
            'errorCode=10001, '
            'errorMessage="Error while compiling statement"), operationHandle'
            '=None)"'
        )
        self.assertEquals((
            'Error while compiling statement'),
            HiveEngineSpec.extract_error_message(Exception(msg)))
开发者ID:bkyryliuk,项目名称:caravel,代码行数:24,代码来源:db_engine_specs_test.py


示例5: test_job_1_launched_progress

 def test_job_1_launched_progress(self):
     log = """
         17/02/07 19:15:55 INFO ql.Driver: Total jobs = 2
         17/02/07 19:15:55 INFO ql.Driver: Launching Job 1 out of 2
     """.split('\n')
     self.assertEquals(0, HiveEngineSpec.progress(log))
开发者ID:tothandor,项目名称:incubator-superset,代码行数:6,代码来源:db_engine_specs_test.py


示例6: test_number_of_jobs_progress

 def test_number_of_jobs_progress(self):
     log = """
         17/02/07 19:15:55 INFO ql.Driver: Total jobs = 2
     """.split('\n')
     self.assertEquals(0, HiveEngineSpec.progress(log))
开发者ID:tothandor,项目名称:incubator-superset,代码行数:5,代码来源:db_engine_specs_test.py


示例7: test_hive_get_view_names_return_empty_list

 def test_hive_get_view_names_return_empty_list(self):
     self.assertEquals([], HiveEngineSpec.get_view_names(mock.ANY, mock.ANY))
开发者ID:bkyryliuk,项目名称:caravel,代码行数:2,代码来源:db_engine_specs_test.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python security.merge_perm函数代码示例发布时间:2022-05-27
下一篇:
Python models.SqlaTable类代码示例发布时间: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