FAQ
Author: hashutosh
Date: Tue Oct 2 17:25:55 2012
New Revision: 1393051

URL: http://svn.apache.org/viewvc?rev=1393051&view=rev
Log:
HIVE-3481: <Resource leak>: Hiveserver is not closing the existing driver handle before executing the next command. It results in to file handle leaks. (Kanna Karanam via Ashutosh Chauhan)

Modified:
hive/trunk/service/src/java/org/apache/hadoop/hive/service/HiveServer.java

Modified: hive/trunk/service/src/java/org/apache/hadoop/hive/service/HiveServer.java
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/java/org/apache/hadoop/hive/service/HiveServer.java?rev=1393051&r1=1393050&r2=1393051&view=diff
==============================================================================
--- hive/trunk/service/src/java/org/apache/hadoop/hive/service/HiveServer.java (original)
+++ hive/trunk/service/src/java/org/apache/hadoop/hive/service/HiveServer.java Tue Oct 2 17:25:55 2012
@@ -179,6 +179,12 @@ public class HiveServer extends ThriftHi
String SQLState = null;

try {
+ // Close the existing driver object (CommandProcessor) before creating
+ // the new driver (CommandProcessor) object to clean-up the resources
+ if (driver != null) {
+ driver.close();
+ driver = null;
+ }
CommandProcessor proc = CommandProcessorFactory.get(tokens[0]);
if (proc != null) {
if (proc instanceof Driver) {

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedOct 2, '12 at 5:26p
activeOct 2, '12 at 5:26p
posts1
users1
websitehive.apache.org

1 user in discussion

Hashutosh: 1 post

People

Translate

site design / logo © 2022 Grokbase