回复:Re: What's the format of Cassandra's timestamp, microsecond or millisecond?

2015-08-10 Thread yhqruc
Thanks,  Something wrong with the client.


- 原始邮件 -
发件人:Jeff Jirsa jeff.ji...@crowdstrike.com
收件人:user@cassandra.apache.org user@cassandra.apache.org, yhq...@sina.com 
yhq...@sina.com
主题:Re: What's the format of Cassandra's timestamp, microsecond or millisecond?
日期:2015年08月11日 00点00分

The timestamp is arbitrary precision, selected by the client. If you’re seeing 
milliseconds on some data and microseconds on others, then you have one client 
that’s using microseconds and another on milliseconds – adjust your clients.


From:  yhq...@sina.com
Reply-To:  user@cassandra.apache.org, yhq...@sina.com
Date:  Sunday, August 9, 2015 at 10:40 PM
To:  user
Subject:  What's the format of Cassandra's timestamp, microsecond or 
millisecond?

Hi, All:When I use cassandra.thrift API to manipulate the data, the 
timestamp is in millisecond. It can be verified in cli:[default@ks_wwapp] get 
cf_user['100031'];

= (super_column=01#uid#,
 (name=0#d#, value=bf860100, timestamp=1438689394196))
   When I use cli to set a column, the timestamp is in microseconds. Such 
as:[default@ks_wwapp] get cf_user['100049'];

= (super_column=sc_name,
 (name=c_name, value=635f76616c7565, timestamp=1439184495344000))
Now, I can't use cassandra.thrift API to update the key 100049. 
What's wrong with cassandra?
Thanks!





What's the format of Cassandra's timestamp, microsecond or millisecond?

2015-08-09 Thread yhqruc
Hi, All:When I use cassandra.thrift API to manipulate the data, the 
timestamp is in millisecond. It can be verified in cli:[default@ks_wwapp] get 
cf_user['100031'];
= (super_column=01#uid#,
 (name=0#d#, value=bf860100, timestamp=1438689394196))
   When I use cli to set a column, the timestamp is in microseconds. Such 
as:[default@ks_wwapp] get cf_user['100049'];
= (super_column=sc_name,
 (name=c_name, value=635f76616c7565, timestamp=1439184495344000))
Now, I can't use cassandra.thrift API to update the key 100049. 
What's wrong with cassandra?
Thanks!



Is it possible to implement a interface to replace a row in cassandra using cassandra.thrift?

2015-01-06 Thread yhqruc
Hi, all:I use cassandra.thrift to implement a replace row interface in this 
way:First use batch_mutate to delete that row, then use batch_mutate to 
insert a new row.I always find that after call this interface, the row is 
not exist.
Then I doubt that it is the problem caused by the deletion, because the 
deleteion has a timestamp set by the client.Maybe the time is not so sync 
between the client and cassandra server (1 or more seconds diff).

How to solve this?? Is it possible to implement a  interface to replace a 
row in cassandra.???\

Thanks.


Is it possible to implement a interface to replace a row in cassandra using cassandra.thrift?

2015-01-06 Thread yhqruc
Hi, all:I use cassandra.thrift to implement a replace row interface in this 
way:First use batch_mutate to delete that row, then use batch_mutate to 
insert a new row.I always find that after call this interface, the row is 
not exist.
Then I doubt that it is the problem caused by the deletion, because the 
deleteion has a timestamp set by the client.Maybe the time is not so sync 
between the client and cassandra server (1 or more seconds diff).

How to solve this?? Is it possible to implement a  interface to replace a 
row in cassandra.???\

Thanks.


Is it possible to implement a interface to replace a row in cassandra using cassandra.thrift?

2015-01-06 Thread yhqruc
Hi, all:I use cassandra.thrift to implement a replace row interface in this 
way:First use batch_mutate to delete that row, then use batch_mutate to 
insert a new row.I always find that after call this interface, the row is 
not exist.
Then I doubt that it is the problem caused by the deletion, because the 
deleteion has a timestamp set by the client.Maybe the time is not so sync 
between the client and cassandra server (1 or more seconds diff).

How to solve this?? Is it possible to implement a  interface to replace a 
row in cassandra.???\

Thanks.


Is it possible to implement a interface to replace a row in cassandra using cassandra.thrift?

2015-01-06 Thread yhqruc
Hi, all:I use cassandra.thrift to implement a replace row interface in this 
way:First use batch_mutate to delete that row, then use batch_mutate to 
insert a new row.I always find that after call this interface, the row is 
not exist.
Then I doubt that it is the problem caused by the deletion, because the 
deleteion has a timestamp set by the client.Maybe the time is not so sync 
between the client and cassandra server (1 or more seconds diff).

How to solve this?? Is it possible to implement a  interface to replace a 
row in cassandra.???\

Thanks.


转发:Re: Is it possible to implement a interface to replace a row in cassandra using cassandra.thrift?

2015-01-06 Thread yhqruc
Hi, 
I found that in my function, both delete and update  use the client side 
timestamp.The update timestamp should  be always bigger than the deletion 
timestamp.
I wonder why the update failed in some cases?
thank you.

- 原始邮件 -
发件人:Ryan Svihla r...@foundev.pro
收件人:user@cassandra.apache.org, yhq...@sina.com
主题:Re: Is it possible to implement a interface to replace a row in cassandra 
using cassandra.thrift?
日期:2015年01月06日 23点34分

replies inline
On Tue, Jan 6, 2015 at 2:28 AM,  yhq...@sina.com wrote:
Hi, all:I use cassandra.thrift to implement a replace row interface in this 
way:First use batch_mutate to delete that row, then use batch_mutate to 
insert a new row.I always find that after call this interface, the row is 
not exist.
Then I doubt that it is the problem caused by the deletion, because the 
deleteion has a timestamp set by the client.Maybe the time is not so sync 
between the client and cassandra server (1 or more seconds diff).
It's a distributed database so time synchronization really really matters so 
use NTP, however if you're using client side timestamps on both the insert and 
the delete it's not going to matter for that use case

How to solve this?? Is it possible to implement a  interface to replace a 
row in cassandra.???\
yeah all updates are this way. Inserts are actually UPSERTS and you can go 
ahead and do two updates instead of insert, delete, update. 

Thanks.


-- 
Thanks,Ryan Svihla




Why read row is so slower than read column.

2014-12-26 Thread yhqruc
Hi, all:   In my cf, each row has two column, one column is the 
timestamp(64bit), another column is data which may be 500k about.
   I read row, the qps is about 30.   I read that data column, the qps is about 
500.
   Why read performance is so slow where add a so small column in read??
Thanks.

 

Why read row is so slower than read column.

2014-12-26 Thread yhqruc
Hi, all:   In my cf, each row has two column, one column is the 
timestamp(64bit), another column is data which may be 500k about.
   I read row, the qps is about 30.   I read that data column, the qps is about 
500.
   Why read performance is so slow where add a so small column in read??
Thanks.

 

转发:Re: Why read row is so slower than read column.

2014-12-26 Thread yhqruc
I use thrift interface to query the data.

- -

What do your CQL queries look like?-- Jack Krupansky

On Fri, Dec 26, 2014 at 8:00 AM,  yhq...@sina.com wrote:
Hi, all:   In my cf, each row has two column, one column is the 
timestamp(64bit), another column is data which may be 500k about.
   I read row, the qps is about 30.   I read that data column, the qps is about 
500.
   Why read performance is so slow where add a so small column in read??
Thanks.

 




Cassandra update row after delete immediately, and read that, the data not right?

2014-12-25 Thread yhqruc
Hi, all
  I write a program to test the cassandra2.1. I have 6 nodes cluster.
  First, I insert 1 million row data into cassandra. the row key from 1 to 
100.
  Then I run my test program. My test program first delete(use batch mutate) 
the row and insert (use batch mutate) that row, 
 then read (use gen_slice_range) the same row. After that check whether the 
read data is same with the insert data or not.  The consistency level used is 
quorum. 
  I found there some cases that not the same. About 1/1. In this error 
cases, some column is not same.  Then I use cassandra-cli to check the data, 
found that column is not exist. It seems insert partly.
  My test program has 20 threads. the QPS 800 about

  What's wrong with cassandra?? 
  

Thanks! 


转发:Re: Cassandra update row after delete immediately, and read that, the data not right?

2014-12-25 Thread yhqruc
Hi, all:   The test program first insert one row and then delete it, then read 
it to compare.   The test program run this flow row by row, not batch.
Today I found the problem is caused by the deletion timestamp. The machine 
running the test program may not be time sync with cassandra machine strictly.  
   
 Why cassandra use the local timestamp for deletion??


发件人:Jack Krupansky jack.krupan...@gmail.com
收件人:user@cassandra.apache.org, yhq...@sina.com
主题:Re: Cassandra update row after delete immediately, and read that, the data 
not right?
日期:2014年12月25日 21点04分

What RF?
Is the update and read immediately after the delete and insert, or is the read 
after doing all the updates?
Is the delete and insert done with a single batch?-- Jack Krupansky

On Thu, Dec 25, 2014 at 4:14 AM,  yhq...@sina.com wrote:
Hi, all
  I write a program to test the cassandra2.1. I have 6 nodes cluster.
  First, I insert 1 million row data into cassandra. the row key from 1 to 
100.
  Then I run my test program. My test program first delete(use batch mutate) 
the row and insert (use batch mutate) that row, 
 then read (use gen_slice_range) the same row. After that check whether the 
read data is same with the insert data or not.  The consistency level used is 
quorum. 
  I found there some cases that not the same. About 1/1. In this error 
cases, some column is not same.  Then I use cassandra-cli to check the data, 
found that column is not exist. It seems insert partly.
  My test program has 20 threads. the QPS 800 about

  What's wrong with cassandra?? 
  

Thanks!