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的图片上传工具类
随机推荐
- Hbase restFul API
获取hbase版本 curl -vi -X GET -H "Accept: text/xml" http://10.8.4.46:20550/version/cluster1.2. ...
- [C++ map & dp]codeforces 960F. Pathwalks
题目传送门:960F 思路: 题目给人的感觉很像最长上升子序列,自然而然想到用dp的思路去处理 题目中给的限制条件是,要接上前面的边,前面的边权一定要小于当前的边权(题目按照输入的顺序,因此只找前面的 ...
- 线性代数之——A 的 LU 分解
1. A = LU 之前在消元的过程中,我们看到可以将矩阵 \(A\) 变成一个上三角矩阵 \(U\),\(U\) 的对角线上就是主元.下面我们将这个过程反过来,通一个下三角矩阵 \(L\) 我们可以 ...
- kaldi HMM-GMM全部训练脚本分解
目录 train_mono.sh train_deltas.sh train_lda_mllt.sh train_sat.sh train_mono.sh 单音素训练脚本: //初始化,[topo f ...
- BZOJ 3166 HEOI2013 ALO 可持久化trie+st表
题目链接:https://www.lydsy.com/JudgeOnline/problem.php?id=3166(洛谷上也有) 题意概述: 给出一个序列,对于一个区间,其权值为区间中的次大值亦或区 ...
- 20145214 《Java程序设计》第1周学习总结
20145214 <Java程序设计>第1周学习总结 教材学习内容总结 第一章 了解了Java的诞生和版本演进的历史,目前的最新版本是Java SE8. java的三大平台分别是Java ...
- android平台蓝牙编程(转)
http://blog.csdn.net/pwei007/article/details/6015907 Android平台支持蓝牙网络协议栈,实现蓝牙设备之间数据的无线传输. 本文档描述了怎样利用a ...
- Java中I/O流之数据流
Java 中的数据流: 对于某问题:将一个 long 类型的数据写到文件中,有办法吗? 转字符串 → 通过 getbytes() 写进去,费劲,而且在此过程中 long 类型的数需要不断地转换. ...
- Jenkins系列-Jenkins添加git密钥对
添加密钥 1.添加git用户和git密码对 ,用于git客户端从gitlab上拉取代码到本地
- DVD与CD区别
经常听朋友说什么DVD什么CD什么的,不知道到底有什么区别,专门百度找了下,找到以下资料 ======================================================= ...