hive库清表,删除数据
  insert overwrite table lorry.bigdata select * from lorry.bigdata where 1=0
hive的simple模式
  hive的select如果是fetch模式(select <columnname> from [where] [limit]),是不是就没有资源管控了,此时不走map-reduce;其实通过在YARN的Resource Manager你就可以观察到,如果是select count(*)...就可以看到任务信息;如果是select * from...这种没有聚合函数的普通select查询,是不会再任务列表中显示信息;这意味着fetch模式(普通查询语句),是不走YARN的资源分配,但是,这是否意味着select是无法进行跟踪和处理的呢?
  关于使用fetch,通过hive.fetch.task.conversion进行配置,有三种选项(cloudera中配置):
  1. none,不启动fetch;查询始终都走map-reduce来处理查询;
  2. minimal,原文:SELECT STAR, FILTER on partition columns, LIMIT only;select开头,where语句在分区列上面;limit;where条件限制以及limit两者满足一者即可;
  3. more,原文:SELECT, FILTER, LIMIT only (+TABLESAMPLE, virtual columns),more,相比于minimal,就不在限制于where条件要是分区列;所以,一般如果采用fetch模式则设置为more即可;
 
  在实践中并没有发现minimal和more的区别,所以如果是正常使用fetch,就设置为more,如果关闭fetch(始终使用map-reduce)就使用none配置
Connection refused
  Could not open connection to jdbc:hive2://localhost:10000/default: java.net.ConnectException: Connection refused (state=08S01,code=0)
  后来发现,原来是IP错误;部署hive2service的机器(41)和Thrift服务(42)是分开部署的,我执行beeline是在hive2service机器执行的,后来beeline链接的时候路径改为Thrift service部署的机器,问题解决。
beeline链接字符串

  !connect jdbc:hive2://10.1.108.65:10000/default;principal=hive/slave1@BD.COM;auth=kerberos;kerberosAuthType=fromSubject;
  beeline -u "jdbc:hive2://10.1.108.65:10000/default;principal=hive/slave1@BD.COM;auth-kerberos"

最新文章

  1. paper 123: SVM如何避免过拟合
  2. SQL Server 未保存.sql文件,还想查看、修改一些建表语句、存储过程等怎么办?
  3. hotfix分析
  4. 用于主题检测的临时日志(d94169f9-f1c0-45a2-82d4-6edc4bd35539 - 3bfe001a-32de-4114-a6b4-4005b770f6d7)
  5. React事件处理函数的bind复用和name复用
  6. springboot +spring security4 自定义手机号码+短信验证码登录
  7. eclipse设置系统字体
  8. Numerical Methods with MATLAB(1)
  9. Fragment 设置主题
  10. 事后诸葛亮分析(Beta版本)
  11. spring 多线程 写入数据库 和 写入 xml文件
  12. 在ASP.NET Core中通过EF Core实现一个简单的全局过滤查询
  13. C#中Skip和Take的用法
  14. JavaScript中函数引用调用和函数直接调用的区别
  15. linux 应用和发展
  16. Angular动态表单生成(一)
  17. android gradle打包常见问题及解决方案
  18. bzoj 1006 MCS算法
  19. bzoj3223 文艺平衡树 codevs3303 翻转区间
  20. k8s的故障切换(failover)

热门文章

  1. python学习(四)字符串学习
  2. tao.opengl+C#绘制三维模型
  3. 【Android】带底部指示的自定义ViewPager控件
  4. phpstudy nginx下curl请求本地其他项目
  5. 【BZOJ1097】[POI2007]旅游景点atr 最短路+状压DP
  6. HTML5(lufylegend.js练习)
  7. mysql系列之1.mysql基础
  8. 我的Android进阶之旅------>温习Sqlite3的常用操作
  9. 破解powerdesigner教程
  10. Java for LeetCode 105 Construct Binary Tree from Preorder and Inorder Traversal