How to configue session timeout in Hive
This article explains how to configure the following settings in Hive:
hive.server2.session.check.interval
hive.server2.idle.operation.timeout
hive.server2.idle.session.timeout
1). hive.server2.idle.session.timeout
Session will be closed when not accessed for this duration of time, in milliseconds; disable by setting to zero or a negative value.
For example, the value of “86400000” indicate that the session will be timed out after 1 day of inactivity.
2). hive.server2.session.check.interval
The check interval for session/operation timeout, in milliseconds, which can be disabled by setting to zero or a negative value.
For example, the value of “3600000” indicate that the session will be checked every 1 hour.
3) hive.server2.idle.operation.timeout
Operation will be closed when not accessed for this duration of time, in milliseconds; disable by setting to zero. For a positive value, checked for operations in terminal state only (FINISHED, CANCELED, CLOSED, ERROR). For a negative value, checked for all of the operations regardless of state.
For example, the value of “7200000” indicate that the query/operation will be timed out after 2 hours if it is still running.
So if you combine the three settings from above examples, we can summarize the following use cases:
1) If you started a HS2 session, beeline for example, and without doing anything afterwards, HS2 will trigger 24 session checking before it determines that 24 hours has passed since last activity, then session will be closed
2) If you worked on beeline for 2 hours and then leave the beeline open without doing anything afterwards, HS2 will trigger total of 26 session checking (2 while you worked and another 24 while in idle), and the session will be closed 26 hours after initially opened.
3) If you worked on beeline for 2 hours, and you started running a query that will run for 1 hour and then returns result, the idle timer actually starts from the time when data returns, so if you don’t do anything afterwards, HS2 will kill the session after another 24 hours, so in total, the session lasted 27 hours (2+1+24)
4) If, for instance, your query takes longer than the 2 hours defined by hive.server2.idle.operation.timeout, then the query will be cancelled, hence you will lose the result all together
5) If hive.server2.session.check.interval = 0 and hive.server2.idle.session.timeout > 0, then it will have the same effect that hive.server2.idle.session.timeout = 0, because no idle timer will be triggered as check interval is disabled
6) If hive.server2.session.check.interval > hive.server2.idle.session.timeout > 0, then the actual time out will be the same as hive.server2.session.check.interval.
For example if hive.server2.session.check.interval = 20 minutes, but hive.server2.idle.session.timeout = 10 minutes, then timeout will happen when checking happens, which is 20 minutes.
The basic rule of thumb is as follows:
hive.server2.session.check.interval < hive.server2.idle.operation.timeout < hive.server2.idle.session.timeout
And the recommended values are:
hive.server2.session.check.interval = 1 hour
hive.server2.idle.operation.timeout = 1 day
hive.server2.idle.session.timeout = 3 days
This will work for most of clusters, but you can change the value depending on how your cluster behaves and how long each query run for.
How to configue session timeout in Hive的更多相关文章
- Zookeeper中Session Timeout的那些事
前言: RDS系统致力于MySQL数据的高可用,高可靠,高性能以及在线扩展功能,实现这些特性的主要逻辑功能都运行在管理服务器上,一旦管理服务器宕机,数据库的在线扩展功能/备份功能/故障恢复功能等都无从 ...
- Kafka session.timeout.ms heartbeat.interval.ms参数的区别以及对数据存储的一些思考
Kafka session.timeout.ms heartbeat.interval.ms参数的区别以及对数据存储的一些思考 在计算机世界中经常需要与数据打交道,这也是我们戏称CURD工程师的原因之 ...
- Tomcat connection & session timeout settings
# connection timeout for globle web application cat /home/soft/apache-tomcat-7.0.92/conf/server.xml ...
- 关于无线的Idle Timeout和Session Timeout
1.Session Timeout Session Timer的默认值为1800s,也就是30min.Session Timeout:当该计时器超时时,使得客户端强制发生重认证,这个时间是从客户端认证 ...
- 项目server中设置session timeout遇到的问题
RT:在项目server中的web.xml设置session timeout=10,当10分钟后,继续右键执行jsp文件,运行失败,如下图所示: 但是单独启动tomcat server后,在浏览器中输 ...
- ASP.NET Misconfiguration: Excessive Session Timeout
Abstract: An overly long authentication timeout gives attackers more time to potentially compromise ...
- Session Timeout 与 $.ajaxSetup
对于session过期跳转的问题,很简单,就是一个过滤器,然后判断session为空?跳转:继续.但是对于ajax的请求,需要做特殊处理,见下面代码中的 // 此处考虑ajax操作session过期的 ...
- 转:linux 修改sftp服务默认提供者sshd的session timeout
ssh连接超时问题解决方案: 1.修改server端的etc/ssh/sshd_config ClientAliveInterval 60 #server每隔60秒发送一次请求给client,然后cl ...
- ajax session timeout
授权过期后AJAX操作跳转到登录页的一种全局处理方式 菜鸟程序员之Asp.net MVC Session过期异常的处理 基于WebImage的图片上传工具类
随机推荐
- eos智能合约开发最佳实践
安全问题 1.可能的错误 智能合约终止 限制转账限额 限制速率 有效途径来进行bug修复和提升 2.谨慎发布智能合约 对智能合约进行彻底的测试 并在任何新的攻击手法被发现后及时制止 赏金计划和审计合约 ...
- Python3 Tkinter-Grid
1.创建 from tkinter import * root=Tk() lb1=Label(root,text='Hello') lb2=Label(root,text='Grid') lb1.gr ...
- 理解glance
摘要: 本节介绍 OpenStack Image 服务 Glance 的基本概念. OpenStack 由 Glance 提供 Image 服务. 理解 Image 要理解 Image Service ...
- opencv打开视频文件出错
使用C#调用mingw的so文件,在C++端使用opencv打开视频.这样的项目完成过了一个,第二次做的时候,发现opencv打开视频文件出错. 首先怀疑是opencv的opencv_ffmpeg24 ...
- C Program进阶-二维数组动态内存开辟
对于二维数组,我们知道可以用Type ArrayName[Row][Colume]的方式来定义,这是一种静态内存开辟的方式,程序在编译的时候就为该数组分配了空间,而且行和列大小也是指定的.这篇文章里我 ...
- “Hello World!”团队——Alpha发布用户使用报告
博客内容: 1.用户体验报告表 2.用户评论截图 3.总结 一.用户体验报告表 用户使用报告 用户序号 用户姓名(化名) 性别 用户职业 使用频次 用户评论 1 小董 女 文学在读硕士 5 1.游戏界 ...
- About Dynamic Programming
Main Point: Dynamic Programming = Divide + Remember + Guess 1. Divide the key is to find the subprob ...
- windows批处理学习(字符换操作)---04
转自:https://www.cnblogs.com/DswCnblog/p/5432326.html 1.截取字符串 截取字符串可以说是字符串处理功能中最常用的一个子功能了,能够实现截取字符串中的特 ...
- Jenkins系列-Jenkins插件下载镜像加速
可供选择的jenkins2 插件镜像列表: Jenkins 所有镜像列表: http://mirrors.jenkins-ci.org/status.html比如日本的镜像: http://mirro ...
- cacti添加多个tomcat监控(多端口)
1.修改tomcat的模版 Data Input Methods->Tomcat Status 把原本固定的端口,用户名和密码手动修改成变量(绿线标出的),之后save保存之后,再在Input ...