更新时间:2019-04-04 14:49
使用交互式查询前必须先有一个会话。会话接收交互式查询提交过来的代码、SQL,运行并返回结果。
入口:https://hbase.console.aliyun.com/hbase/cn-shanghai/workspace/session
创建会话时,需要先选择一个可运行的集群。
会话内容跟作业内容很像,因为会话本质上也是一个spark-submit提交的作业。跟作业不同的是,我们无需也不能指定class、file参数。
Options (参数) | 说明 |
---|---|
—jars JARS | Comma-separated list of jars to include on the driver and executor classpaths. |
—py-files PY_FILES | Comma-separated list of .zip, .egg, or .py files to place on the PYTHONPATH for Python apps. |
—files FILES | Comma-separated list of files to be placed in the working directory of each executor. File paths of these files in executors can be accessed via SparkFiles.get(fileName). |
—driver-memory MEM | Memory for driver (e.g. 1000M, 2G) (Default: 1024M). |
—driver-cores NUM | Number of cores used by the driver, only in cluster mode (Default: 1). |
—executor-cores NUM | Number of cores per executor. (Default: 1). |
—executor-memory MEM | Memory per executor (e.g. 1000M, 2G) (Default: 1G). |
—num-executors NUM | Number of executors to launch (Default: 2). |
—name NAME | A name of your application. |
—conf PROP=VALUE | Arbitrary Spark configuration property. |
例子:最简单的会话可以什么参数都不指定,或者就是指定个名字,方便在yarn管理页面查找。
--name simple_session
例子:复杂些的,比如需要使用到jar包、python whl包:(下面的jar包whl包只是示例,具体场景需要使用真实的jar包或whl包)
--name session_demo
--driver-memory 1G
--driver-cores 1
--executor-memory 1G
--executor-cores 1
--num-executors 1
--files /pi.py
--jars /tmp-1.0.0-SNAPSHOT.jar
--py-files /python_wheel/Unidecode-1.0.23-py2.py3-none-any.whl
点击“运行”按钮后将启动会话。可以通过以下方式来刷新、查看会话的状态详情,会话启动正常的话会进入到Idle
的稳定状态。
注意:停止会话时,如果该会话下有运行的查询任务将会被强制停止。
在文档使用中是否遇到以下问题
更多建议
匿名提交