目录
- 准备工作
- 确认hive server2的ip、端口和访问权限
- Mac本地安装Rstudio
- Rstudio安装jar包
- 创建R连接hive脚本函数
- 测试
- 调用R脚本的函数
1 准备工作
1.1 确认hive server2的ip、端口和访问权限
- 找维护hadoop的同事, 确认hive server2的ip和端口
- 确认hive server的ip在本地能否ping通
打开终端, 输入ping ip地址
, 如出现下图则表示能够ping通,
![86f783e2ccf53fc43ab72004cca20f7c.png](https://img-blog.csdnimg.cn/img_convert/86f783e2ccf53fc43ab72004cca20f7c.png)
3. 再次确认hive server2的端口在本地能否访问
这里需要用到telnet, 因此先在终端配置telnet
- 打开终端, 输入
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- 下载成功后, 输入
bre