You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2024/01/10 04:07:12 UTC

(hbase) branch branch-2.5 updated: HBASE-28297 IntegrationTestImportTsv fails with ArrayIndexOfOutBounds (#5612)

This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.5 by this push:
     new 808afdf3de8 HBASE-28297 IntegrationTestImportTsv fails with ArrayIndexOfOutBounds (#5612)
808afdf3de8 is described below

commit 808afdf3de8c0bd6388f09ed0d99fb023f73e1de
Author: Duo Zhang <zh...@apache.org>
AuthorDate: Wed Jan 10 11:13:09 2024 +0800

    HBASE-28297 IntegrationTestImportTsv fails with ArrayIndexOfOutBounds (#5612)
    
    Signed-off-by: Nihal Jain <ni...@apache.org>
    (cherry picked from commit a09305d5854fc98300426271fad3b53a69d2ae71)
---
 .../org/apache/hadoop/hbase/mapreduce/IntegrationTestImportTsv.java   | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestImportTsv.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestImportTsv.java
index a56879cd50d..9d17b3ec976 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestImportTsv.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestImportTsv.java
@@ -60,6 +60,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.hbase.thirdparty.com.google.common.base.Splitter;
+import org.apache.hbase.thirdparty.com.google.common.base.Strings;
 
 /**
  * Validate ImportTsv + LoadIncrementalHFiles on a distributed cluster.
@@ -85,6 +86,9 @@ public class IntegrationTestImportTsv extends Configured implements Tool {
       {
         byte[] family = Bytes.toBytes("d");
         for (String line : Splitter.on('\n').split(simple_tsv)) {
+          if (Strings.isNullOrEmpty(line)) {
+            continue;
+          }
           String[] row = line.split("\t");
           byte[] key = Bytes.toBytes(row[0]);
           long ts = Long.parseLong(row[1]);