Hi Vladimir,

Indeed, that's a little weird, I think it is like a empty string: '' but is
a timeuuid value. We have many such records that inserted by Astyanax API,
when we select it in cqlsh, it is like as below, note the column4 is
timeuuid, it is not null or some value, just "empty".

key              | column1      | column2 | column3 | column4 | value
------------------+--------------------+------------+------------
+------------+----------------------
test by thrift | accessState |              |              |              |
0x5

But when we use Cql, we couldn't set this empty value, it is null or
explicit value, like below,

key              | column1      | column2 | column3 | column4  | value
------------------+-------------------+--
-----------+-------------+--------------+----------------------
 test by cql   | accessState |              |             |  null         |
0x5

key              | column1      | column2 | column3 |
column4                              | value
-------------------+------------------+--
------------+------------+-----------------------------------------------------------+-
--------------------------------
 test by cql   | accessState |              |             |
4a528300-95cb-11e6-8650-0242f5eaa8c3| 0x5

I don't know whether you could understand now, if not I could provide some
code related to Astyanax. Really appreciate your help.


On Wed, Oct 19, 2016 at 9:53 PM, Vladimir Yudovin <vla...@winguzone.com>
wrote:

> Hi,
>
> what does it exactly mean 'empty timeuuid'?  UUID takes 16 bytes for
> storage, so it should be either null, or some value. Do you mean 'zero'
> UUID?
>
> Best regards, Vladimir Yudovin,
>
> *Winguzone <https://winguzone.com?from=list> - Hosted Cloud
> CassandraLaunch your cluster in minutes.*
>
>
> ---- On Wed, 19 Oct 2016 09:16:29 -0400*coderhlj <coder...@gmail.com
> <coder...@gmail.com>>* wrote ----
>
> Hi all,
>
> We use Cassandra 2.1.11 in our product, and we update the Java Drive from
> Astyanax(Thrift API) to DataStax Java Driver(Cql) recently, but we
> encounter a difficult issue as following, please help us, thanks in advance.
>
> Previously we were using Astyanax API, and we can insert empty timeuuid
> like below, but now we can only insert null timeuuid by cql command but not
> empty one. Is there any cql function to insert an empty timeuuid like by
> Astyanax?
> And this cause a tough problem is that we can not delete the record by
> specifying the primary key, like:
> *delete from "Foo" where column1='test' and column2='accessState' and
> column3='' and column4=(need fill empty uuid here) IF EXISTS;*
>
> key              | column1      | column2 | column3 | column4 | value
> -------------+-------------+---------+---------
> +---------+----------------------
> test by thrift | accessState |              |              |              |
> 0x5
>
> key              | column1      | column2 | column3 | column4  | value
> -------------+-------------+---------+---------+----------+-
> ---------------------
>  test by cql   | accessState |              |             |  null         |
> 0x5
>
>
> cqlsh:StorageOS> desc table "Foo";
>
> CREATE TABLE "Foo" (
>   key text,
>   column1 text,
>   column2 text,
>   column3 text,
>   column4 timeuuid,
>   value blob,
>   PRIMARY KEY (key, column1, column2, column3, column4)
> ) WITH COMPACT STORAGE AND
>   bloom_filter_fp_chance=0.010000 AND
>   caching='{"keys":"ALL", "rows_per_partition":"NONE"}' AND
>   comment='' AND
>   dclocal_read_repair_chance=0.100000 AND
>   gc_grace_seconds=432000 AND
>   read_repair_chance=0.000000 AND
>   default_time_to_live=0 AND
>   speculative_retry='NONE' AND
>   memtable_flush_period_in_ms=0 AND
>   compaction={'class': 'SizeTieredCompactionStrategy'} AND
>   compression={'sstable_compression': 'LZ4Compressor'};
>
> ------------------
> Thanks,
> Lijun Huang
>
>
>


-- 
Best regards,
Lijun Huang

Reply via email to