
# 调测Hive Python3样例程序
#### Python3样例工程的命令行形式运行
1. 赋予"python3-examples"文件夹中脚本的可执行权限。在命令行终端执行以下命令： 
   **chmod +x python3-examples -** **R**。
   
   
2. 在"python3-examples/pyCLI_nosec.py"中的"hosts"数组中填写安装HiveServer的节点的业务平面IP，"hiveserverPort"的值修改为Hive提供Thrift服务的端口（hive.server2.thrift.port），默认值为"10000"。 
   修改"python3-examples/pyCLI_sec.py"时，"hosts"数组支持配置多个HiveServer节点，MRS 3.6.0-LTS及之后版本还支持配置"maxRetryTimes"和"retryInterval"参数。
   - "maxRetryTimes"为重试次数，默认值为"3"。
   
   - "retryInterval"为重试间隔，默认重试间隔为1秒。
    
   
   
3. 执行以下命令运行Python3客户端： 
   **cd python3-examples**
   **python pyCLI_nosec.py**
   
   
4. 在命令行终端查看样例代码中的HQL所查询出的结果。例如： 
   ```
   [['default', '']] 
    [{'comment': 'from deserializer', 'columnName': 'tab_name', 'type': 'STRING_TYPE'}] 
    ['xx']
   ```
   
   
 
