
org.apache.phoenix.hbase.index.scanner.Scanner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of phoenix-server-hbase-2.6
Show all versions of phoenix-server-hbase-2.6
Phoenix HBase Server Side JAR
The newest version!
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.phoenix.hbase.index.scanner;
import java.io.Closeable;
import java.io.IOException;
import org.apache.hadoop.hbase.Cell;
import org.apache.hadoop.hbase.KeyValue;
/**
* Scan the primary table. This is similar to HBase's scanner, but ensures that you will never see
* deleted columns/rows
*/
public interface Scanner extends Closeable {
/**
* @return the next keyvalue in the scanner or null if there is no next {@link KeyValue}
* @throws IOException if there is an underlying error reading the data
*/
public Cell next() throws IOException;
/**
* Seek to immediately before the given {@link KeyValue}. If that exact {@link KeyValue} is
* present in this, it will be returned by the next call to {@link #next()}. Otherwise,
* returns the next {@link KeyValue} after the seeked {@link KeyValue}.
* @param next {@link KeyValue} to seek to. Doesn't need to already be present in this
* @return true if there are values left in this, false otherwise
* @throws IOException if there is an error reading the underlying data.
*/
public boolean seek(Cell next) throws IOException;
/**
* Read the {@link KeyValue} at the top of this without 'popping' it off the top of the
* scanner.
* @return the next {@link KeyValue} or null if there are no more values in this
* @throws IOException if there is an error reading the underlying data.
*/
public Cell peek() throws IOException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy