FAQ
Author: hashutosh
Date: Tue Jun 24 05:43:49 2014
New Revision: 1605008

URL: http://svn.apache.org/r1605008
Log:
HIVE-7242 : alter table drop partition is acquiring the wrong type of lock (Alan Gates via Ashutosh Chauhan)

Modified:
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java?rev=1605008&r1=1605007&r2=1605008&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java Tue Jun 24 05:43:49 2014
@@ -2606,7 +2606,9 @@ public class DDLSemanticAnalyzer extends
      if (partSpecs.isEmpty()) return; // nothing to do

      validateAlterTableType(tab, AlterTableTypes.DROPPARTITION, expectView);
- inputs.add(new ReadEntity(tab));
+ ReadEntity re = new ReadEntity(tab);
+ re.noLockNeeded();
+ inputs.add(re);

      boolean ignoreProtection = ast.getFirstChildWithType(HiveParser.TOK_IGNOREPROTECTION) != null;
      addTableDropPartsOutputs(tab, partSpecs.values(), !ifExists, ignoreProtection);
@@ -3143,7 +3145,7 @@ public class DDLSemanticAnalyzer extends
              throw new SemanticException(
                ErrorMsg.DROP_COMMAND_NOT_ALLOWED_FOR_PARTITION.getMsg(p.getCompleteName()));
            }
- outputs.add(new WriteEntity(p, WriteEntity.WriteType.DELETE));
+ outputs.add(new WriteEntity(p, WriteEntity.WriteType.DDL_EXCLUSIVE));
          }
        }
      }

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedJun 24, '14 at 5:44a
activeJun 24, '14 at 5:44a
posts1
users1
websitehive.apache.org

1 user in discussion

Hashutosh: 1 post

People

Translate

site design / logo © 2021 Grokbase