Skip to content

Commit

Permalink
HBASE-28185 Alter table to set TTL using hbase shell failed when ttl …
Browse files Browse the repository at this point in the history
…string is not match format (apache#5494)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 027a119)
(cherry picked from commit e6f269b)
Change-Id: I6a34df4c6457daca5666fc7b827dbb910cd6ae9b
  • Loading branch information
chaijunjie0101 authored and Apache9 committed Nov 14, 2023
1 parent 7fe84fc commit 9e1f593
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,11 @@ private static long humanReadableIntervalToSec(final String humanReadableInterva
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;
Expand Down

0 comments on commit 9e1f593

Please sign in to comment.