You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by sk...@apache.org on 2019/10/09 23:03:51 UTC
svn commit: r1868207 - in /phoenix/site: publish/secondary_indexing.html
source/src/site/markdown/secondary_indexing.md
Author: skadam
Date: Wed Oct 9 23:03:51 2019
New Revision: 1868207
URL: http://svn.apache.org/viewvc?rev=1868207&view=rev
Log:
Adding how to of IndexUpgradeTool in secondary indexing page
Modified:
phoenix/site/publish/secondary_indexing.html
phoenix/site/source/src/site/markdown/secondary_indexing.md
Modified: phoenix/site/publish/secondary_indexing.html
URL: http://svn.apache.org/viewvc/phoenix/site/publish/secondary_indexing.html?rev=1868207&r1=1868206&r2=1868207&view=diff
==============================================================================
--- phoenix/site/publish/secondary_indexing.html (original)
+++ phoenix/site/publish/secondary_indexing.html Wed Oct 9 23:03:51 2019
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!--
- Generated by Apache Maven Doxia at 2019-07-10
+ Generated by Apache Maven Doxia at 2019-10-09
Rendered using Reflow Maven Skin 1.1.0 (http://andriusvelykis.github.io/reflow-maven-skin)
-->
<html xml:lang="en" lang="en">
@@ -540,6 +540,22 @@ CREATE LOCAL INDEX my_index ON my_table
</tr>
</tbody>
</table>
+</div>
+<div class="section">
+ <h2 id="Index_Upgrade_Tool">Index Upgrade Tool</h2>
+ <p>IndexUpgradeTool accepts following parameters</p>
+ <ol style="list-style-type: decimal">
+ <li>âoperation / -o : <i>upgrade</i> or <i>rollback</i></li>
+ <li>âtables / -tb : <i>[table1,table2,table3]</i></li>
+ <li>âfile / -f : csv file with above format</li>
+ <li>âdry-run / -d : if passed this will just output steps that will be executed; like a dry run</li>
+ <li>âhelp / -h : Help on how to use the tool</li>
+ <li>âlogfile / -lf : file location to dump the logs.</li>
+ <li>âindex-sync-rebuild / -sr: Whether or not synchronously rebuild the indexes; default rebuild asynchronous</li>
+ </ol>
+ <p>${HBASE_HOME}/bin/hbase org.apache.phoenix.mapreduce.index.IndexUpgradeTool -o [upgrade/rollback] -tb [table_name] -lf [/tmp/index-upgrade-tool.log]</p>
+ <p>Depending on whether index is mutable, it will remove <i>Indexer</i> coprocessor from a data table and load new coprocessor <i>IndexRegionObserver</i>. For both immutable and mutable, it will load <i>GlobalIndexChecker</i> coprocessor on Index table. During this process, data table and index table are <i>disabled-loaded/unloaded with coproc-enabled</i> within short time span. At the end, it does an asynchronous index rebuilds. Index reads are not blocked while index-rebuild is still ongoing, however, they may be a bit slower for rows written prior to upgrade.</p>
+ <p>IndexUpgradeTool doesnât make any distinction between view-index and table-index. When a table is passed, it will perform the upgrade-operation on all the âchildrenâ indexes of the given table. </p>
<div class="section">
<h3 id="Limitations">Limitations</h3>
<ul>
Modified: phoenix/site/source/src/site/markdown/secondary_indexing.md
URL: http://svn.apache.org/viewvc/phoenix/site/source/src/site/markdown/secondary_indexing.md?rev=1868207&r1=1868206&r2=1868207&view=diff
==============================================================================
--- phoenix/site/source/src/site/markdown/secondary_indexing.md (original)
+++ phoenix/site/source/src/site/markdown/secondary_indexing.md Wed Oct 9 23:03:51 2019
@@ -359,6 +359,27 @@ The following parameters can be used wit
|-t,--time |Timestamp in millis at which to run the scrutiny. This is important so that incoming writes don't throw off the scrutiny. Defaults to current time minus 60 seconds |
|-b,--batch-size |Number of rows to compare at a time |
+## Index Upgrade Tool
+
+IndexUpgradeTool accepts following parameters
+
+1. --operation / -o : *upgrade* or *rollback*
+2. --tables / -tb : *[table1,table2,table3]*
+3. --file / -f : csv file with above format
+4. --dry-run / -d : if passed this will just output steps that will be executed; like a dry run
+5. --help / -h : Help on how to use the tool
+6. --logfile / -lf : file location to dump the logs.
+7. --index-sync-rebuild / -sr: Whether or not synchronously rebuild the indexes; default rebuild asynchronous
+
+
+${HBASE_HOME}/bin/hbase org.apache.phoenix.mapreduce.index.IndexUpgradeTool -o [upgrade/rollback] -tb [table_name]
+ -lf [/tmp/index-upgrade-tool.log]
+
+Depending on whether index is mutable, it will remove *Indexer* coprocessor from a data table and load new coprocessor *IndexRegionObserver*. For both immutable and mutable, it will load *GlobalIndexChecker* coprocessor on Index table. During this process, data table and index table are *disabled-loaded/unloaded with coproc-enabled* within short time span. At the end, it does an asynchronous index rebuilds. Index reads are not blocked while index-rebuild is still ongoing, however, they may be a bit slower for rows written prior to upgrade.
+
+IndexUpgradeTool doesn't make any distinction between view-index and table-index. When a table is passed, it will perform the upgrade-operation on all the 'children' indexes of the given table.
+
+
### Limitations
* If rows are actively being updated or deleted while the scrutiny is running, the tool may give you false positives for inconsistencies ([PHOENIX-4277](https://issues.apache.org/jira/browse/PHOENIX-4277)).
* Snapshot reads are not supported by the scrutiny tool ([PHOENIX-4270](https://issues.apache.org/jira/browse/PHOENIX-4270)).