001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018package org.apache.hadoop.hbase.regionserver; 019 020import java.io.IOException; 021import java.util.function.IntConsumer; 022import org.apache.hadoop.fs.Path; 023import org.apache.hadoop.hbase.ExtendedCell; 024import org.apache.hadoop.hbase.client.Scan; 025 026public class DelegatingKeyValueScanner implements KeyValueScanner { 027 protected KeyValueScanner delegate; 028 029 public DelegatingKeyValueScanner(KeyValueScanner delegate) { 030 this.delegate = delegate; 031 } 032 033 @Override 034 public void shipped() throws IOException { 035 delegate.shipped(); 036 } 037 038 @Override 039 public ExtendedCell peek() { 040 return delegate.peek(); 041 } 042 043 @Override 044 public ExtendedCell next() throws IOException { 045 return delegate.next(); 046 } 047 048 @Override 049 public boolean seek(ExtendedCell key) throws IOException { 050 return delegate.seek(key); 051 } 052 053 @Override 054 public boolean reseek(ExtendedCell key) throws IOException { 055 return delegate.reseek(key); 056 } 057 058 @Override 059 public long getScannerOrder() { 060 return delegate.getScannerOrder(); 061 } 062 063 @Override 064 public void close() { 065 delegate.close(); 066 } 067 068 @Override 069 public boolean shouldUseScanner(Scan scan, HStore store, long oldestUnexpiredTS) { 070 return delegate.shouldUseScanner(scan, store, oldestUnexpiredTS); 071 } 072 073 @Override 074 public boolean requestSeek(ExtendedCell kv, boolean forward, boolean useBloom) 075 throws IOException { 076 return delegate.requestSeek(kv, forward, useBloom); 077 } 078 079 @Override 080 public boolean realSeekDone() { 081 return delegate.realSeekDone(); 082 } 083 084 @Override 085 public void enforceSeek() throws IOException { 086 delegate.enforceSeek(); 087 } 088 089 @Override 090 public boolean isFileScanner() { 091 return delegate.isFileScanner(); 092 } 093 094 @Override 095 public Path getFilePath() { 096 return delegate.getFilePath(); 097 } 098 099 @Override 100 public boolean backwardSeek(ExtendedCell key) throws IOException { 101 return delegate.backwardSeek(key); 102 } 103 104 @Override 105 public boolean seekToPreviousRow(ExtendedCell key) throws IOException { 106 return delegate.seekToPreviousRow(key); 107 } 108 109 @Override 110 public boolean seekToLastRow() throws IOException { 111 return delegate.seekToLastRow(); 112 } 113 114 @Override 115 public ExtendedCell getNextIndexedKey() { 116 return delegate.getNextIndexedKey(); 117 } 118 119 @Override 120 public void recordBlockSize(IntConsumer blockSizeConsumer) { 121 delegate.recordBlockSize(blockSizeConsumer); 122 } 123}