You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by se...@apache.org on 2018/07/23 04:20:49 UTC
[3/3] hive git commit: HIVE-19532 : fix tests for master-txnstats
branch - fix build (Sergey Shelukhin)
HIVE-19532 : fix tests for master-txnstats branch - fix build (Sergey Shelukhin)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/e8d7cdcc
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/e8d7cdcc
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/e8d7cdcc
Branch: refs/heads/master-txnstats
Commit: e8d7cdcc372e14f8a0a664911b5ae6934201e30b
Parents: b17a347
Author: sergey <se...@apache.org>
Authored: Sun Jul 22 21:20:46 2018 -0700
Committer: sergey <se...@apache.org>
Committed: Sun Jul 22 21:20:46 2018 -0700
----------------------------------------------------------------------
.../hcatalog/listener/DummyRawStoreFailEvent.java | 16 ++++++++--------
.../hadoop/hive/ql/stats/StatsUpdaterThread.java | 4 ++--
2 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/e8d7cdcc/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java
----------------------------------------------------------------------
diff --git a/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java b/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java
index 1c105d1..be40395 100644
--- a/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java
+++ b/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java
@@ -321,10 +321,10 @@ public class DummyRawStoreFailEvent implements RawStore, Configurable {
}
@Override
- public void alterTable(String catName, String dbName, String name, Table newTable, String queryValidWriteIds)
+ public Table alterTable(String catName, String dbName, String name, Table newTable, String queryValidWriteIds)
throws InvalidObjectException, MetaException {
if (shouldEventSucceed) {
- objectStore.alterTable(catName, dbName, name, newTable, queryValidWriteIds);
+ return objectStore.alterTable(catName, dbName, name, newTable, queryValidWriteIds);
} else {
throw new RuntimeException("Event failed.");
}
@@ -385,22 +385,22 @@ public class DummyRawStoreFailEvent implements RawStore, Configurable {
}
@Override
- public void alterPartition(String catName, String dbName, String tblName, List<String> partVals,
+ public Partition alterPartition(String catName, String dbName, String tblName, List<String> partVals,
Partition newPart, String queryValidWriteIds) throws InvalidObjectException, MetaException {
if (shouldEventSucceed) {
- objectStore.alterPartition(catName, dbName, tblName, partVals, newPart, queryValidWriteIds);
+ return objectStore.alterPartition(catName, dbName, tblName, partVals, newPart, queryValidWriteIds);
} else {
throw new RuntimeException("Event failed.");
}
}
@Override
- public void alterPartitions(String catName, String dbName, String tblName,
+ public List<Partition> alterPartitions(String catName, String dbName, String tblName,
List<List<String>> partValsList, List<Partition> newParts,
long writeId, String queryValidWriteIds)
throws InvalidObjectException, MetaException {
if (shouldEventSucceed) {
- objectStore.alterPartitions(catName, dbName, tblName, partValsList, newParts, writeId, queryValidWriteIds);
+ return objectStore.alterPartitions(catName, dbName, tblName, partValsList, newParts, writeId, queryValidWriteIds);
} else {
throw new RuntimeException("Event failed.");
}
@@ -736,13 +736,13 @@ public class DummyRawStoreFailEvent implements RawStore, Configurable {
}
@Override
- public boolean updateTableColumnStatistics(ColumnStatistics statsObj, String validWriteIds, long writeId)
+ public Map<String, String> updateTableColumnStatistics(ColumnStatistics statsObj, String validWriteIds, long writeId)
throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException {
return objectStore.updateTableColumnStatistics(statsObj, validWriteIds, writeId);
}
@Override
- public boolean updatePartitionColumnStatistics(ColumnStatistics statsObj,
+ public Map<String, String> updatePartitionColumnStatistics(ColumnStatistics statsObj,
List<String> partVals, String validWriteIds, long writeId)
throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException {
return objectStore.updatePartitionColumnStatistics(statsObj, partVals, validWriteIds, writeId);
http://git-wip-us.apache.org/repos/asf/hive/blob/e8d7cdcc/ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUpdaterThread.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUpdaterThread.java b/ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUpdaterThread.java
index f34cb61..a50ec18 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUpdaterThread.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUpdaterThread.java
@@ -447,7 +447,7 @@ public class StatsUpdaterThread extends Thread implements MetaStoreThread {
}
// TODO: we should probably skip updating if writeId is from an active txn
boolean isTxnValid = (writeIdString == null) || ObjectStore.isCurrentStatsValidForTheQuery(
- conf, db, tbl, params, statsWriteId , writeIdString, false);
+ conf, params, statsWriteId , writeIdString, false);
return getExistingStatsToUpdate(existingStats, params, isTxnValid);
}
@@ -472,7 +472,7 @@ public class StatsUpdaterThread extends Thread implements MetaStoreThread {
}
// TODO: we should probably skip updating if writeId is from an active txn
if (writeIdString != null && !ObjectStore.isCurrentStatsValidForTheQuery(
- conf, db, tbl, params, statsWriteId, writeIdString, false)) {
+ conf, params, statsWriteId, writeIdString, false)) {
return allCols;
}
List<String> colsToUpdate = new ArrayList<>();