Tianyi Wang has posted comments on this change. (
http://gerrit.cloudera.org:8080/11641 )
Change subject: IMPALA-7670: Avoid getting the latest tables in
bulkAlterPartitions()
......................................................................
Patch Set 1:
> Patch Set 1:
>
> (1 comment)
>
> ya I don't think it is specific to V2 (updated the jira description).
I've been running concurrent invalidate and drop stats with this diff and
haven't reproduced it.
diff --git a/fe/src/main/java/org/apache/impala/catalog/FeFsTable.java
b/fe/src/main/java/org/apache/impala/catalog/FeFsTable.java
index e9ef929103..7058a384e2 100644
--- a/fe/src/main/java/org/apache/impala/catalog/FeFsTable.java
+++ b/fe/src/main/java/org/apache/impala/catalog/FeFsTable.java
@@ -424,6 +424,7 @@ public interface FeFsTable extends FeTable {
break;
}
}
+ try { Thread.sleep(100);} catch (Exception e) {}
if (matchFound) return partition;
}
return null;
diff --git a/fe/src/main/java/org/apache/impala/catalog/HdfsTable.java
b/fe/src/main/java/org/apache/impala/catalog/HdfsTable.java
index 88c1fd5138..892be0a5a7 100644
--- a/fe/src/main/java/org/apache/impala/catalog/HdfsTable.java
+++ b/fe/src/main/java/org/apache/impala/catalog/HdfsTable.java
@@ -792,6 +792,7 @@ public class HdfsTable extends Table implements FeFsTable {
HdfsPartition partition = createPartition(msPartition.getSd(),
msPartition,
permCache);
addPartition(partition);
+ try { Thread.sleep(100);} catch (Exception e) {}
// If the partition is null, its HDFS path does not exist, and it was
not added
// to this table's partition list. Skip the partition.
if (partition == null) continue;
diff --git a/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
b/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
index 36725df84c..e2fcc785a4 100644
--- a/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
+++ b/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
@@ -3275,6 +3275,7 @@ public class CatalogOpExecutor {
MetastoreShim.alterPartitions(msClient.getHiveClient(), dbName,
tableName,
hmsPartitionsSubList);
// Mark the corresponding HdfsPartition objects as dirty
+ try {Thread.sleep(3000);} catch (Exception e) {}
for (org.apache.hadoop.hive.metastore.api.Partition msPartition:
hmsPartitionsSubList) {
try {
--
To view, visit http://gerrit.cloudera.org:8080/11641
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0ec120f9df64d6e7e7d4978b5e190376721a6897
Gerrit-Change-Number: 11641
Gerrit-PatchSet: 1
Gerrit-Owner: Tianyi Wang <[email protected]>
Gerrit-Reviewer: Bharath Vissapragada <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Tianyi Wang <[email protected]>
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Vuk Ercegovac <[email protected]>
Gerrit-Comment-Date: Fri, 12 Oct 2018 21:38:28 +0000
Gerrit-HasComments: No