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