Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve query performance with HBase #2178

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import java.io.IOException;
import java.io.InterruptedIOException;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
Expand Down Expand Up @@ -418,7 +419,11 @@ default R scan(String table, Set<byte[]> prefixes) {
*/
default R scan(String table, byte[] startRow, boolean inclusiveStart,
byte[] prefix) {
short value = (short) (((startRow[0] << 8) | (startRow[1] & 0xFF)) +1);
byte[] endRow = ByteBuffer.allocate(2).putShort(value).array();
Copy link
Member

@imbajin imbajin Mar 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not quiet clear with it,could u explain it more?

and for any of the scan query condition,we always add the end-row?

could u give a case for it(before vs after),and check the ci problems(a string of ci failed now)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can call increaseOne()?


Scan scan = new Scan().withStartRow(startRow, inclusiveStart)
.withStopRow(endRow)
.setFilter(new PrefixFilter(prefix));
return this.scan(table, scan);
}
Expand Down