[
https://issues.apache.org/jira/browse/HBASE-15664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Duo Zhang updated HBASE-15664:
------------------------------
Description:
The TTL per CF is in seconds, we will convert it to milliseconds when construct
HStore. And if it is HConstants.FOREVER, we will set it to Long.MAX_VALUE.
{code:title=HStore.java}
public static long determineTTLFromFamily(final HColumnDescriptor family) {
// HCD.getTimeToLive returns ttl in seconds. Convert to milliseconds.
long ttl = family.getTimeToLive();
if (ttl == HConstants.FOREVER) {
// Default is unlimited ttl.
ttl = Long.MAX_VALUE;
} else if (ttl == -1) {
ttl = Long.MAX_VALUE;
} else {
// Second -> ms adjust for user data
ttl *= 1000;
}
return ttl;
}
{code}
was:The TTL per CF is in seconds, we will convert it to milliseconds when
construct HStore. And if it is HConstants.FOREVER, we will set it to
Long.MAX_VALUE.
> Use Long.MAX_VALUE instead of HConstants.FOREVER in CompactionPolicy
> --------------------------------------------------------------------
>
> Key: HBASE-15664
> URL: https://issues.apache.org/jira/browse/HBASE-15664
> Project: HBase
> Issue Type: Bug
> Reporter: Duo Zhang
> Assignee: Duo Zhang
>
> The TTL per CF is in seconds, we will convert it to milliseconds when
> construct HStore. And if it is HConstants.FOREVER, we will set it to
> Long.MAX_VALUE.
> {code:title=HStore.java}
> public static long determineTTLFromFamily(final HColumnDescriptor family) {
> // HCD.getTimeToLive returns ttl in seconds. Convert to milliseconds.
> long ttl = family.getTimeToLive();
> if (ttl == HConstants.FOREVER) {
> // Default is unlimited ttl.
> ttl = Long.MAX_VALUE;
> } else if (ttl == -1) {
> ttl = Long.MAX_VALUE;
> } else {
> // Second -> ms adjust for user data
> ttl *= 1000;
> }
> return ttl;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)