You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ka...@apache.org on 2019/10/02 04:10:25 UTC
[phoenix] branch 4.14-HBase-1.4 updated: PHOENIX-5503 IndexTool
does not rebuild all the rows (addendum)
This is an automated email from the ASF dual-hosted git repository.
kadir pushed a commit to branch 4.14-HBase-1.4
in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/4.14-HBase-1.4 by this push:
new 5275a95 PHOENIX-5503 IndexTool does not rebuild all the rows (addendum)
5275a95 is described below
commit 5275a95ab538bf530c9be3785fa70ab67ba1d09b
Author: Kadir <ko...@salesforce.com>
AuthorDate: Tue Oct 1 19:36:49 2019 -0700
PHOENIX-5503 IndexTool does not rebuild all the rows (addendum)
---
.../apache/phoenix/mapreduce/index/IndexTool.java | 23 +++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexTool.java b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexTool.java
index ab9e817..4bc57b5 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexTool.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/IndexTool.java
@@ -279,23 +279,24 @@ public class IndexTool extends Configured implements Tool {
public Job getJob() throws Exception {
if (isPartialBuild) {
return configureJobForPartialBuild();
- } else if (useSnapshot || !useDirectApi || (!isLocalIndexBuild && pDataTable.isTransactional())) {
+ } else {
long maxTimeRange = pIndexTable.getTimeStamp() + 1;
// this is set to ensure index tables remains consistent post population.
if (pDataTable.isTransactional()) {
configuration.set(PhoenixConfigurationUtil.TX_SCN_VALUE,
Long.toString(TransactionUtil.convertToNanoseconds(maxTimeRange)));
}
- configuration.set(PhoenixConfigurationUtil.CURRENT_SCN_VALUE,
- Long.toString(maxTimeRange));
- return configureJobForAysncIndex();
- }
- else {
- // Local and non-transactional global indexes to be built on the server side
- // It is safe not to set CURRENT_SCN_VALUE for server side rebuilds, in order to make sure that
- // all the rows that exist so far will be rebuilt. The current time of the servers will
- // be used to set the time range for server side scans.
- return configureJobForServerBuildIndex();
+ if (useSnapshot || !useDirectApi || (!isLocalIndexBuild && pDataTable.isTransactional())) {
+ configuration.set(PhoenixConfigurationUtil.CURRENT_SCN_VALUE,
+ Long.toString(maxTimeRange));
+ return configureJobForAysncIndex();
+ } else {
+ // Local and non-transactional global indexes to be built on the server side
+ // It is safe not to set CURRENT_SCN_VALUE for server side rebuilds, in order to make sure that
+ // all the rows that exist so far will be rebuilt. The current time of the servers will
+ // be used to set the time range for server side scans.
+ return configureJobForServerBuildIndex();
+ }
}
}