You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Duo Zhang (Jira)" <ji...@apache.org> on 2023/06/23 01:49:00 UTC
[jira] [Updated] (HBASE-26630) TableSnapshotInputFormat terminates in the middle
[ https://issues.apache.org/jira/browse/HBASE-26630?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Duo Zhang updated HBASE-26630:
------------------------------
Summary: TableSnapshotInputFormat terminates in the middle (was: When using SingleColumnValueFilter in TableSnapshotInputFormat, there was a problem that the job was terminated in the middle.)
> TableSnapshotInputFormat terminates in the middle
> -------------------------------------------------
>
> Key: HBASE-26630
> URL: https://issues.apache.org/jira/browse/HBASE-26630
> Project: HBase
> Issue Type: Bug
> Affects Versions: 2.2.3
> Reporter: hyungseok.lim
> Assignee: Hernan Gelaf-Romer
> Priority: Minor
>
> I am using by adding SingleColumnValueFilter in TableSnapshotInputFormat. In fact, there is a lot of data in the snapshot, but it was found that the mapper was completed in the middle.
>
> There was a problem in the next method of ClientSideRegionScanner.
>
> {code:java}
> public Result next() throws IOException {
> values.clear();
> scanner.nextRaw(values);
> if (values.isEmpty()) {
> //we are done
> return null;
> }
> Result result = Result.create(values);
> if (this.scanMetrics != null) {
> long resultSize = 0;
> for (Cell cell : values) {
> resultSize += PrivateCellUtil.estimatedSerializedSizeOf(cell);
> }
> this.scanMetrics.countOfBytesInResults.addAndGet(resultSize);
> this.scanMetrics.countOfRowsScanned.incrementAndGet();
> }
> return result;
> } {code}
> values is empty, but scanner.nextRaw(values) returned true.
> I modified it as follows and it worked normally.
> {code:java}
> public Result next() throws IOException {
> values.clear();
> boolean moreValues;
> do {
> moreValues = scanner.nextRaw(values);
> } while (values.isEmpty() && moreValues);
> if (!moreValues) {
> return null;
> }
> Result result = Result.create(values);
> if (this.scanMetrics != null) {
> long resultSize = 0;
> for (Cell cell : values) {
> resultSize += PrivateCellUtil.estimatedSerializedSizeOf(cell);
> }
> this.scanMetrics.countOfBytesInResults.addAndGet(resultSize);
> this.scanMetrics.countOfRowsScanned.incrementAndGet();
> }
> return result;
> } {code}
> Please check this.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)