@InterfaceAudience.Private public class PrettyPrinter extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PrettyPrinter.Unit |
Modifier and Type | Field and Description |
---|---|
private static Pattern |
INTERVAL_PATTERN |
private static String |
INTERVAL_REGEX |
private static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
PrettyPrinter() |
Modifier and Type | Method and Description |
---|---|
static String |
format(String value,
PrettyPrinter.Unit unit) |
private static long |
humanReadableIntervalToSec(String humanReadableInterval)
Convert a human readable time interval to seconds.
|
private static String |
humanReadableTTL(long interval) |
static String |
valueOf(String pretty,
PrettyPrinter.Unit unit)
Convert a human readable string to its value.
|
private static final org.slf4j.Logger LOG
private static final String INTERVAL_REGEX
private static final Pattern INTERVAL_PATTERN
public PrettyPrinter()
public static String format(String value, PrettyPrinter.Unit unit)
public static String valueOf(String pretty, PrettyPrinter.Unit unit) throws HBaseException
pretty
- unit
- HBaseException
format(String, Unit)
private static String humanReadableTTL(long interval)
private static long humanReadableIntervalToSec(String humanReadableInterval) throws HBaseException
humanReadableInterval
- HBaseException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.