hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gunt...@apache.org
Subject hive git commit: HIVE-10922: In HS2 doAs=false mode, file system related errors in one query causes other failures (Thejas M Nair, reviewed by Vikram Dixit K)
Date Thu, 04 Jun 2015 07:55:32 GMT
Repository: hive
Updated Branches:
  refs/heads/master a96fbdeef -> 0e5d907e5


HIVE-10922: In HS2 doAs=false mode, file system related errors in one query causes other failures
(Thejas M Nair, reviewed by Vikram Dixit K)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/0e5d907e
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/0e5d907e
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/0e5d907e

Branch: refs/heads/master
Commit: 0e5d907e57304a67752fe68108483c305f6f66a5
Parents: a96fbde
Author: Gunther Hagleitner <gunther@apache.org>
Authored: Thu Jun 4 00:52:47 2015 -0700
Committer: Gunther Hagleitner <gunther@apache.org>
Committed: Thu Jun 4 00:55:24 2015 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hive/metastore/HiveAlterHandler.java    | 10 ++++++----
 .../apache/hadoop/hive/metastore/HiveMetaStoreFsImpl.java |  1 -
 .../java/org/apache/hadoop/hive/metastore/Warehouse.java  |  2 --
 3 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/0e5d907e/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java
index 5391171..99d6680 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java
@@ -59,20 +59,24 @@ public class HiveAlterHandler implements AlterHandler {
   private static final Log LOG = LogFactory.getLog(HiveAlterHandler.class
       .getName());
 
+  @Override
   public Configuration getConf() {
     return hiveConf;
   }
 
+  @Override
   @SuppressWarnings("nls")
   public void setConf(Configuration conf) {
     hiveConf = conf;
   }
 
+  @Override
   public void alterTable(RawStore msdb, Warehouse wh, String dbname,
       String name, Table newt) throws InvalidOperationException, MetaException {
     alterTable(msdb, wh, dbname, name, newt, false);
   }
 
+  @Override
   public void alterTable(RawStore msdb, Warehouse wh, String dbname,
       String name, Table newt, boolean cascade) throws InvalidOperationException, MetaException
{
     if (newt == null) {
@@ -200,8 +204,6 @@ public class HiveAlterHandler implements AlterHandler {
                 + " already exists : " + destPath);
           }
         } catch (IOException e) {
-          Warehouse.closeFs(srcFs);
-          Warehouse.closeFs(destFs);
           throw new InvalidOperationException("Unable to access new location "
               + destPath + " for table " + newt.getDbName() + "."
               + newt.getTableName());
@@ -316,6 +318,7 @@ public class HiveAlterHandler implements AlterHandler {
     }
     return ex.getMessage();
   }
+  @Override
   public Partition alterPartition(final RawStore msdb, Warehouse wh, final String dbname,
       final String name, final List<String> part_vals, final Partition new_part)
       throws InvalidOperationException, InvalidObjectException, AlreadyExistsException,
@@ -430,8 +433,6 @@ public class HiveAlterHandler implements AlterHandler {
                 + " already exists : " + destPath);
             }
           } catch (IOException e) {
-            Warehouse.closeFs(srcFs);
-            Warehouse.closeFs(destFs);
             throw new InvalidOperationException("Unable to access new location "
               + destPath + " for partition " + tbl.getDbName() + "."
               + tbl.getTableName() + " " + new_part.getValues());
@@ -491,6 +492,7 @@ public class HiveAlterHandler implements AlterHandler {
     return oldPart;
   }
 
+  @Override
   public List<Partition> alterPartitions(final RawStore msdb, Warehouse wh, final String
dbname,
       final String name, final List<Partition> new_parts)
       throws InvalidOperationException, InvalidObjectException, AlreadyExistsException,

http://git-wip-us.apache.org/repos/asf/hive/blob/0e5d907e/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreFsImpl.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreFsImpl.java
b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreFsImpl.java
index c3598db..b255090 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreFsImpl.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreFsImpl.java
@@ -60,7 +60,6 @@ public class HiveMetaStoreFsImpl implements MetaStoreFS {
     } catch (FileNotFoundException e) {
       return true; // ok even if there is not data
     } catch (Exception e) {
-      Warehouse.closeFs(fs);
       MetaStoreUtils.logAndThrowMetaException(e);
     }
     return false;

http://git-wip-us.apache.org/repos/asf/hive/blob/0e5d907e/metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java b/metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java
index 011d4d8..bc0f6e3 100755
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java
@@ -200,7 +200,6 @@ public class Warehouse {
       fs = getFs(f);
       return FileUtils.mkdir(fs, f, inheritPerms, conf);
     } catch (IOException e) {
-      closeFs(fs);
       MetaStoreUtils.logAndThrowMetaException(e);
     }
     return false;
@@ -480,7 +479,6 @@ public class Warehouse {
     } catch (FileNotFoundException e) {
       return false;
     } catch (IOException e) {
-      closeFs(fs);
       MetaStoreUtils.logAndThrowMetaException(e);
     }
     return true;


Mime
View raw message