Kallin Nagelberg | 16 Feb 23:05 2011
Picon

ttl not returned in columns

Hey,

I have been doing some experimenting with TTL on columns and I notice
that when I use HFactory.createSliceQuery I am not able to see the ttl
that the columns were inserted with. I've verified that the columns
are being inserted with a non-zero TTL, but they are always returned
with TTL=0.

Thanks,
-Kal

Nate McCall | 16 Feb 23:10 2011

Re: ttl not returned in columns

I think you may be confusing the timestamp with time-to-live. Hector
inserts timestamps of [now] by default, but you must explicitly set
ttl in order to have your columns automatcally deleted by cassandra.

On Wed, Feb 16, 2011 at 4:05 PM, Kallin Nagelberg
<kallin.nagelberg@...> wrote:
> Hey,
>
> I have been doing some experimenting with TTL on columns and I notice
> that when I use HFactory.createSliceQuery I am not able to see the ttl
> that the columns were inserted with. I've verified that the columns
> are being inserted with a non-zero TTL, but they are always returned
> with TTL=0.
>
> Thanks,
> -Kal
>

Kallin Nagelberg | 16 Feb 23:12 2011
Picon

Re: ttl not returned in columns

I am setting TTL and the columns are being deleted as expected.
However, when I use Hector to query it always shows the columns as
having ttl=0.

-Kal

On Wed, Feb 16, 2011 at 5:10 PM, Nate McCall <nate@...> wrote:
> I think you may be confusing the timestamp with time-to-live. Hector
> inserts timestamps of [now] by default, but you must explicitly set
> ttl in order to have your columns automatcally deleted by cassandra.
>
> On Wed, Feb 16, 2011 at 4:05 PM, Kallin Nagelberg
> <kallin.nagelberg@...> wrote:
>> Hey,
>>
>> I have been doing some experimenting with TTL on columns and I notice
>> that when I use HFactory.createSliceQuery I am not able to see the ttl
>> that the columns were inserted with. I've verified that the columns
>> are being inserted with a non-zero TTL, but they are always returned
>> with TTL=0.
>>
>> Thanks,
>> -Kal
>>
>

Nate McCall | 16 Feb 23:15 2011

Re: ttl not returned in columns

Got it - apologies for the misunderstanding. Which API calls are you using?

On Wed, Feb 16, 2011 at 4:12 PM, Kallin Nagelberg
<kallin.nagelberg@...> wrote:
> I am setting TTL and the columns are being deleted as expected.
> However, when I use Hector to query it always shows the columns as
> having ttl=0.
>
> -Kal
>
> On Wed, Feb 16, 2011 at 5:10 PM, Nate McCall <nate@...> wrote:
>> I think you may be confusing the timestamp with time-to-live. Hector
>> inserts timestamps of [now] by default, but you must explicitly set
>> ttl in order to have your columns automatcally deleted by cassandra.
>>
>> On Wed, Feb 16, 2011 at 4:05 PM, Kallin Nagelberg
>> <kallin.nagelberg@...> wrote:
>>> Hey,
>>>
>>> I have been doing some experimenting with TTL on columns and I notice
>>> that when I use HFactory.createSliceQuery I am not able to see the ttl
>>> that the columns were inserted with. I've verified that the columns
>>> are being inserted with a non-zero TTL, but they are always returned
>>> with TTL=0.
>>>
>>> Thanks,
>>> -Kal
>>>
>>
>
(Continue reading)

Kallin Nagelberg | 16 Feb 23:18 2011
Picon

Re: ttl not returned in columns

NP, calls are something like:

SliceQuery<String, String, String> query =
HFactory.createSliceQuery(keyspace, ss, ss, ss)
query.key = sessionKey
// retrieve the first 100 columns in the row
query.setRange("", "", false, 100)
query.columnFamily = "Session"
QueryResult<ColumnSlice<String, String>> execute = query.execute()
ColumnSlice<String, String> queryResult = execute.get()

I'm looking at the columns in the queryResult's columnMap.

-Kal

On Wed, Feb 16, 2011 at 5:15 PM, Nate McCall <nate@...> wrote:
> Got it - apologies for the misunderstanding. Which API calls are you using?
>
> On Wed, Feb 16, 2011 at 4:12 PM, Kallin Nagelberg
> <kallin.nagelberg@...> wrote:
>> I am setting TTL and the columns are being deleted as expected.
>> However, when I use Hector to query it always shows the columns as
>> having ttl=0.
>>
>> -Kal
>>
>> On Wed, Feb 16, 2011 at 5:10 PM, Nate McCall <nate@...> wrote:
>>> I think you may be confusing the timestamp with time-to-live. Hector
>>> inserts timestamps of [now] by default, but you must explicitly set
>>> ttl in order to have your columns automatcally deleted by cassandra.
(Continue reading)

Nate McCall | 16 Feb 23:24 2011

Re: ttl not returned in columns

Indeed - looks like we are missing a set of the ttl from the provided
thrift Column in the HColumnImpl constructor. I'll fix this now so
it's in the next release. Good catch.

On Wed, Feb 16, 2011 at 4:18 PM, Kallin Nagelberg
<kallin.nagelberg@...> wrote:
> NP, calls are something like:
>
> SliceQuery<String, String, String> query =
> HFactory.createSliceQuery(keyspace, ss, ss, ss)
> query.key = sessionKey
> // retrieve the first 100 columns in the row
> query.setRange("", "", false, 100)
> query.columnFamily = "Session"
> QueryResult<ColumnSlice<String, String>> execute = query.execute()
> ColumnSlice<String, String> queryResult = execute.get()
>
>
> I'm looking at the columns in the queryResult's columnMap.
>
> -Kal
>
>
> On Wed, Feb 16, 2011 at 5:15 PM, Nate McCall <nate@...> wrote:
>> Got it - apologies for the misunderstanding. Which API calls are you using?
>>
>> On Wed, Feb 16, 2011 at 4:12 PM, Kallin Nagelberg
>> <kallin.nagelberg@...> wrote:
>>> I am setting TTL and the columns are being deleted as expected.
>>> However, when I use Hector to query it always shows the columns as
(Continue reading)

Kallin Nagelberg | 16 Feb 23:40 2011
Picon

Re: ttl not returned in columns

Awesome, thanks for the quick investigation.

-Kal

On Wed, Feb 16, 2011 at 5:24 PM, Nate McCall <nate@...> wrote:
> Indeed - looks like we are missing a set of the ttl from the provided
> thrift Column in the HColumnImpl constructor. I'll fix this now so
> it's in the next release. Good catch.
>
> On Wed, Feb 16, 2011 at 4:18 PM, Kallin Nagelberg
> <kallin.nagelberg@...> wrote:
>> NP, calls are something like:
>>
>> SliceQuery<String, String, String> query =
>> HFactory.createSliceQuery(keyspace, ss, ss, ss)
>> query.key = sessionKey
>> // retrieve the first 100 columns in the row
>> query.setRange("", "", false, 100)
>> query.columnFamily = "Session"
>> QueryResult<ColumnSlice<String, String>> execute = query.execute()
>> ColumnSlice<String, String> queryResult = execute.get()
>>
>>
>> I'm looking at the columns in the queryResult's columnMap.
>>
>> -Kal
>>
>>
>> On Wed, Feb 16, 2011 at 5:15 PM, Nate McCall <nate@...> wrote:
>>> Got it - apologies for the misunderstanding. Which API calls are you using?
(Continue reading)


Gmane