From 6bd2cd6d1177edd0c416800b7fd1a5e3a0a6c3a6 Mon Sep 17 00:00:00 2001 From: Rushabh Shah Date: Sat, 5 Mar 2022 04:45:45 -0500 Subject: [PATCH] HBASE-26792 Implement ScanInfo#toString (#4154) Signed-off-by: Duo Zhang --- .../hadoop/hbase/regionserver/ScanInfo.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScanInfo.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScanInfo.java index 831ce01f8714..94cd00bd800e 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScanInfo.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScanInfo.java @@ -18,6 +18,7 @@ package org.apache.hadoop.hbase.regionserver; +import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.CellComparator; import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor; @@ -184,4 +185,21 @@ ScanInfo customize(int maxVersions, long ttl, KeepDeletedCells keepDeletedCells, comparator, tableMaxRowSize, usePread, cellsPerTimeoutCheck, parallelSeekEnabled, preadMaxBytes, newVersionBehavior); } + + @Override + public String toString() { + return new ToStringBuilder(this) + .append("family", Bytes.toStringBinary(family)) + .append("minVersions", minVersions) + .append("maxVersions", maxVersions) + .append("ttl", ttl) + .append("keepDeletedCells", keepDeletedCells) + .append("timeToPurgeDeletes", timeToPurgeDeletes) + .append("tableMaxRowSize", tableMaxRowSize) + .append("usePread", usePread) + .append("cellsPerTimeoutCheck", cellsPerTimeoutCheck) + .append("parallelSeekEnabled", parallelSeekEnabled) + .append("preadMaxBytes", preadMaxBytes) + .append("newVersionBehavior", newVersionBehavior).toString(); + } }