This is an automated email from the ASF dual-hosted git repository. zhangduo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push: new 027a119bcf4 HBASE-28185 Alter table to set TTL using hbase shell failed when ttl string is not match format (#5494) 027a119bcf4 is described below commit 027a119bcf495e18b3e0fa4984f8982b9ed1390d Author: chaijunjie0101 <64140218+chaijunjie0...@users.noreply.github.com> AuthorDate: Mon Nov 6 10:32:19 2023 +0800 HBASE-28185 Alter table to set TTL using hbase shell failed when ttl string is not match format (#5494) Signed-off-by: Duo Zhang <zhang...@apache.org> --- .../src/main/java/org/apache/hadoop/hbase/util/PrettyPrinter.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/PrettyPrinter.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/PrettyPrinter.java index f73064f70a8..1b19bd25287 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/PrettyPrinter.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/PrettyPrinter.java @@ -184,7 +184,11 @@ public final class PrettyPrinter { hours = matcher.group(6); minutes = matcher.group(8); seconds = matcher.group(10); + } else { + LOG.warn("Given interval value '{}' is not a number and does not match human readable format," + + " value will be set to 0.", humanReadableInterval); } + ttl = 0; ttl += days != null ? Long.parseLong(days) * HConstants.DAY_IN_SECONDS : 0; ttl += hours != null ? Long.parseLong(hours) * HConstants.HOUR_IN_SECONDS : 0;