You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Rajanish GJ <ra...@apigee.com> on 2014/11/21 18:29:38 UTC
max ttl for column
Does hector or cassandra imposes a limit on max ttl value for a column?
I am trying to insert record into one of the column family and seeing the
following error..
Cassandra version : 1.1.12
Hector : 1.1-4
Any pointers appreciated.
me.prettyprint.hector.api.exceptions.HInvalidRequestException:
InvalidRequestException(why:ttl is too large. requested (951027277) maximum
(630720000))
at
me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:52)
~[hector-core-1.1-4.jar:na]
at
me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:260)
~[hector-core-1.1-4.jar:na]
at
me.prettyprint.cassandra.model.ExecutingKeyspace.doExecuteOperation(ExecutingKeyspace.java:113)
~[hector-core-1.1-4.jar:na]
at me.prettyprint.cassandra.model.MutatorImpl.execute(MutatorImpl.java:243)
~[hector-core-1.1-4.jar:na]
at
me.prettyprint.cassandra.service.template.AbstractColumnFamilyTemplate.executeBatch(AbstractColumnFamilyTemplate.java:115)
~[hector-core-1.1-4.jar:na]
at
me.prettyprint.cassandra.service.template.AbstractColumnFamilyTemplate.executeIfNotBatched(AbstractColumnFamilyTemplate.java:163)
~[hector-core-1.1-4.jar:na]
at
me.prettyprint.cassandra.service.template.ColumnFamilyTemplate.update(ColumnFamilyTemplate.java:69)
~[hector-core-1.1-4.jar:na]
=================================
*Also tried using cql, and it seems to hangs and not responding.. trying
again with few combinations*
*INSERT INTO users (key,id) values ('test6','951027277 secs') USING
TTL 951027277 ; *
Regards
Rajanish GJ
apigee | rajanish@apigee.com
Re: max ttl for column
Posted by Mark Reddy <ma...@gmail.com>.
Hi Rajanish,
Cassandra imposes a max TTL of 20 years.
public static final int MAX_TTL = 20 * 365 * 24 * 60 * 60; // 20 years in
> seconds
See:
https://github.com/apache/cassandra/blob/8d8fed52242c34b477d0384ba1d1ce3978efbbe8/src/java/org/apache/cassandra/db/ExpiringCell.java#L37
Mark
On 21 November 2014 17:29, Rajanish GJ <ra...@apigee.com> wrote:
>
> Does hector or cassandra imposes a limit on max ttl value for a column?
>
> I am trying to insert record into one of the column family and seeing the
> following error..
> Cassandra version : 1.1.12
> Hector : 1.1-4
>
> Any pointers appreciated.
>
> me.prettyprint.hector.api.exceptions.HInvalidRequestException:
> InvalidRequestException(why:ttl is too large. requested (951027277) maximum
> (630720000))
> at
> me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:52)
> ~[hector-core-1.1-4.jar:na]
> at
> me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:260)
> ~[hector-core-1.1-4.jar:na]
> at
> me.prettyprint.cassandra.model.ExecutingKeyspace.doExecuteOperation(ExecutingKeyspace.java:113)
> ~[hector-core-1.1-4.jar:na]
> at
> me.prettyprint.cassandra.model.MutatorImpl.execute(MutatorImpl.java:243)
> ~[hector-core-1.1-4.jar:na]
> at
> me.prettyprint.cassandra.service.template.AbstractColumnFamilyTemplate.executeBatch(AbstractColumnFamilyTemplate.java:115)
> ~[hector-core-1.1-4.jar:na]
> at
> me.prettyprint.cassandra.service.template.AbstractColumnFamilyTemplate.executeIfNotBatched(AbstractColumnFamilyTemplate.java:163)
> ~[hector-core-1.1-4.jar:na]
> at
> me.prettyprint.cassandra.service.template.ColumnFamilyTemplate.update(ColumnFamilyTemplate.java:69)
> ~[hector-core-1.1-4.jar:na]
>
> =================================
> *Also tried using cql, and it seems to hangs and not responding.. trying
> again with few combinations*
>
> *INSERT INTO users (key,id) values ('test6','951027277 secs') USING
> TTL 951027277 ; *
>
>
>
> Regards
> Rajanish GJ
> apigee | rajanish@apigee.com
>
Re: max ttl for column
Posted by Rajanish GJ <ra...@apigee.com>.
Mark / Philip - Thanks a lot. This is really helpful.
BTW It was my bad, i was mistaken that ttl was in miliseconds rather than
seconds..
Regards
Rajanish GJ
apigee | rajanish@apigee.com
On Fri, Nov 21, 2014 at 9:42 AM, Philip Thompson <
philip.thompson@datastax.com> wrote:
> With the newest versions of Cassandra, cql is not hanging, but returns the
> same Invalid Query Exception you are seeing through hector. I would assume
> from the exception that 630720000 is in fact that largest TTL you can use.
> What are you doing that you need to set a TTL of approximately 30 years?
>
> On Fri, Nov 21, 2014 at 11:29 AM, Rajanish GJ <ra...@apigee.com> wrote:
>
>>
>> Does hector or cassandra imposes a limit on max ttl value for a column?
>>
>> I am trying to insert record into one of the column family and seeing the
>> following error..
>> Cassandra version : 1.1.12
>> Hector : 1.1-4
>>
>> Any pointers appreciated.
>>
>> me.prettyprint.hector.api.exceptions.HInvalidRequestException:
>> InvalidRequestException(why:ttl is too large. requested (951027277) maximum
>> (630720000))
>> at
>> me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:52)
>> ~[hector-core-1.1-4.jar:na]
>> at
>> me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:260)
>> ~[hector-core-1.1-4.jar:na]
>> at
>> me.prettyprint.cassandra.model.ExecutingKeyspace.doExecuteOperation(ExecutingKeyspace.java:113)
>> ~[hector-core-1.1-4.jar:na]
>> at
>> me.prettyprint.cassandra.model.MutatorImpl.execute(MutatorImpl.java:243)
>> ~[hector-core-1.1-4.jar:na]
>> at
>> me.prettyprint.cassandra.service.template.AbstractColumnFamilyTemplate.executeBatch(AbstractColumnFamilyTemplate.java:115)
>> ~[hector-core-1.1-4.jar:na]
>> at
>> me.prettyprint.cassandra.service.template.AbstractColumnFamilyTemplate.executeIfNotBatched(AbstractColumnFamilyTemplate.java:163)
>> ~[hector-core-1.1-4.jar:na]
>> at
>> me.prettyprint.cassandra.service.template.ColumnFamilyTemplate.update(ColumnFamilyTemplate.java:69)
>> ~[hector-core-1.1-4.jar:na]
>>
>> =================================
>> *Also tried using cql, and it seems to hangs and not responding.. trying
>> again with few combinations*
>>
>> *INSERT INTO users (key,id) values ('test6','951027277 secs') USING
>> TTL 951027277 ; *
>>
>>
>>
>> Regards
>> Rajanish GJ
>> apigee | rajanish@apigee.com
>>
>
>
Re: max ttl for column
Posted by Philip Thompson <ph...@datastax.com>.
With the newest versions of Cassandra, cql is not hanging, but returns the
same Invalid Query Exception you are seeing through hector. I would assume
from the exception that 630720000 is in fact that largest TTL you can use.
What are you doing that you need to set a TTL of approximately 30 years?
On Fri, Nov 21, 2014 at 11:29 AM, Rajanish GJ <ra...@apigee.com> wrote:
>
> Does hector or cassandra imposes a limit on max ttl value for a column?
>
> I am trying to insert record into one of the column family and seeing the
> following error..
> Cassandra version : 1.1.12
> Hector : 1.1-4
>
> Any pointers appreciated.
>
> me.prettyprint.hector.api.exceptions.HInvalidRequestException:
> InvalidRequestException(why:ttl is too large. requested (951027277) maximum
> (630720000))
> at
> me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:52)
> ~[hector-core-1.1-4.jar:na]
> at
> me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:260)
> ~[hector-core-1.1-4.jar:na]
> at
> me.prettyprint.cassandra.model.ExecutingKeyspace.doExecuteOperation(ExecutingKeyspace.java:113)
> ~[hector-core-1.1-4.jar:na]
> at
> me.prettyprint.cassandra.model.MutatorImpl.execute(MutatorImpl.java:243)
> ~[hector-core-1.1-4.jar:na]
> at
> me.prettyprint.cassandra.service.template.AbstractColumnFamilyTemplate.executeBatch(AbstractColumnFamilyTemplate.java:115)
> ~[hector-core-1.1-4.jar:na]
> at
> me.prettyprint.cassandra.service.template.AbstractColumnFamilyTemplate.executeIfNotBatched(AbstractColumnFamilyTemplate.java:163)
> ~[hector-core-1.1-4.jar:na]
> at
> me.prettyprint.cassandra.service.template.ColumnFamilyTemplate.update(ColumnFamilyTemplate.java:69)
> ~[hector-core-1.1-4.jar:na]
>
> =================================
> *Also tried using cql, and it seems to hangs and not responding.. trying
> again with few combinations*
>
> *INSERT INTO users (key,id) values ('test6','951027277 secs') USING
> TTL 951027277 ; *
>
>
>
> Regards
> Rajanish GJ
> apigee | rajanish@apigee.com
>