You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/04/28 15:31:00 UTC
[jira] [Commented] (PHOENIX-6693) Remove Hbase 2.1 and Hbase 2.2 support from Phoenix
[ https://issues.apache.org/jira/browse/PHOENIX-6693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17529498#comment-17529498 ]
ASF GitHub Bot commented on PHOENIX-6693:
-----------------------------------------
gjacoby126 commented on code in PR #1425:
URL: https://github.com/apache/phoenix/pull/1425#discussion_r861031933
##########
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/BaseScannerRegionObserver.java:
##########
@@ -403,14 +419,165 @@ RegionScanner getWrappedScanner(final ObserverContext<RegionCoprocessorEnvironme
/* We want to override the store scanner so that we can read "past" a delete
marker on an SCN / lookback query to see the underlying edit. This was possible
in HBase 1.x, but not possible after the interface changes in HBase 2.0. HBASE-24321 in
- HBase 2.3 gave us this ability back, but we need to use it through a compatibility shim
- so we can compile against 2.1 and 2.2. When 2.3 is the minimum supported HBase
- version, the shim can be retired and the logic moved into the real coproc.
-
+ HBase 2.3 gave us this ability back.
We also need to override the flush compaction coproc hooks in order to implement max lookback
age to keep versions from being purged.
+ */
+
+ @Override
+ public void preCompactScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Store store,
+ ScanType scanType, ScanOptions options, CompactionLifeCycleTracker tracker,
+ CompactionRequest request) throws IOException {
+ Configuration conf = c.getEnvironment().getConfiguration();
+ if (isMaxLookbackTimeEnabled(conf)) {
+ setScanOptionsForFlushesAndCompactions(conf, options, store, scanType);
+ }
+ }
+
+ @Override
+ public void preFlushScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Store store,
+ ScanOptions options, FlushLifeCycleTracker tracker) throws IOException {
+ Configuration conf = c.getEnvironment().getConfiguration();
+ if (isMaxLookbackTimeEnabled(conf)) {
+ setScanOptionsForFlushesAndCompactions(conf, options, store, ScanType.COMPACT_RETAIN_DELETES);
+ }
+ }
+
+ @Override
+ public void preMemStoreCompactionCompactScannerOpen(
+ ObserverContext<RegionCoprocessorEnvironment> c, Store store, ScanOptions options)
+ throws IOException {
+ Configuration conf = c.getEnvironment().getConfiguration();
+ if (isMaxLookbackTimeEnabled(conf)) {
+ MemoryCompactionPolicy inMemPolicy =
+ store.getColumnFamilyDescriptor().getInMemoryCompaction();
+ ScanType scanType;
+ //the eager and adaptive in-memory compaction policies can purge versions; the others
+ // can't. (Eager always does; adaptive sometimes does)
+ if (inMemPolicy.equals(MemoryCompactionPolicy.EAGER) ||
+ inMemPolicy.equals(MemoryCompactionPolicy.ADAPTIVE)) {
+ scanType = ScanType.COMPACT_DROP_DELETES;
+ } else {
+ scanType = ScanType.COMPACT_RETAIN_DELETES;
+ }
+ setScanOptionsForFlushesAndCompactions(conf, options, store, scanType);
+ }
+ }
+
+ @Override
+ public void preStoreScannerOpen(ObserverContext<RegionCoprocessorEnvironment> ctx, Store store,
+ ScanOptions options) throws IOException {
+
+ if (!storeFileScanDoesntNeedAlteration(options)) {
+ //PHOENIX-4277
> Remove Hbase 2.1 and Hbase 2.2 support from Phoenix
> ---------------------------------------------------
>
> Key: PHOENIX-6693
> URL: https://issues.apache.org/jira/browse/PHOENIX-6693
> Project: Phoenix
> Issue Type: Task
> Components: core
> Affects Versions: 5.2.0
> Reporter: Istvan Toth
> Assignee: Istvan Toth
> Priority: Major
>
> Both 5.1 and 5.2 have been EOL for more than a year.
> To simplify the code base, drop support for these branches before the Phoenix 5.2 release.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)