It looks batch operations are atomic after Cassandra 1.2 but not isolated. http://www.datastax.com/dev/blog/atomic-batches-in-cassandra-1-2
On Wed, Oct 15, 2014 at 6:17 PM, Shani Ranasinghe <[email protected]> wrote: > Hi, > > The Schema Structure is as follows. UM_USER_ATTRIBUTE is not used (claim > handling is not supported in this version of the user store), but the > column family is created. > > > > CF Name > > Description > > Composite key > > columns > > example > > UM_USER > > Stores users > > userName,tenantID > > > e.g(�user5��-1234�) > > KEY,SaltValue,UM_REQUIRE_CHANGE > BOOLEAN,UM_TENANT_ID,UM_USER_ID,UM_USER_NAME,secret > > KEY,000575736572350000052d3132333400 | SaltValue,uMDOiQI9wvFUzcczLXwvHQ== > | UM_REQUIRE_CHANGE BOOLEAN,false | UM_TENANT_ID,-1234 | > UM_USER_ID,a3b054e8-4823-4257-9f9d-36d3b1a09b9b | UM_USER_NAME,user5 | > secret,9u2+C9/BZv/0F5dVUo956NvwwNZV9Yi2RlFosOtWrZg= > > UM_ROLE > > Stores roles > > roleName, tenantId > > > e.g.(�role8787��-1234�) > > KEY,UM_ROLE_NAME,UM_TENANT_ID, > > KEY,0008726f6c65383738370000052d3132333400| UM_ROLE_NAME,role8787 | > UM_TENANT_ID,-1234 > > UM_USER_ROLE > > mapps the user to the role list > > userName,tenantId > > > e.g.� testUser1��-1234� > > KEY,<rolename> > > KEY,00097465737455736572310000052d3132333400(� testUser1��-1234�) | > role88,role88 | testRole1,testRole1 | testRole3,testRole3 | > testrole2,testrole2 > > UM_ROLE_USER_INDEX > > keeps the user list mapped to a role > > roleName,tenantId > > > e.g.� testRole1��-1234� > > KEY,<userName> > > KEY,000974657374526f6c65310000052d3132333400(� testRole1��-1234�) | > testUser1,testUser1 | tuser1,tuser1 | user1,user1 | user8,user8 | > user87,user87 > > > > > > > On Wed, Oct 15, 2014 at 5:38 PM, Shani Ranasinghe <[email protected]> wrote: > >> Hi All, >> I have made some improvements to the cassandra queries in the class. >> Attached is the modified version. Basically I got rid of RangeSliceQueries >> and used other types of queries in instances when I could. >> >> On Wed, Oct 15, 2014 at 2:20 PM, Shani Ranasinghe <[email protected]> wrote: >> >>> Hi, >>> >>> I have also attached the full source of the jar. >>> >>> On Wed, Oct 15, 2014 at 2:17 PM, Shani Ranasinghe <[email protected]> >>> wrote: >>> >>>> Please find the keyspace schema for the user store. >>>> >>>> CREATE TABLE UM_USER ( >>>> KEY blob PRIMARY KEY >>>> ) WITH >>>> comment='' AND >>>> comparator=blob AND >>>> read_repair_chance=0.000000 AND >>>> gc_grace_seconds=0 AND >>>> default_validation=blob AND >>>> min_compaction_threshold=4 AND >>>> max_compaction_threshold=32 AND >>>> replicate_on_write='false' AND >>>> compaction_strategy_class='SizeTieredCompactionStrategy' AND >>>> compression_parameters:sstable_compression='SnappyCompressor'; >>>> >>>> CREATE TABLE UM_USER_ROLE ( >>>> KEY blob PRIMARY KEY >>>> ) WITH >>>> comment='' AND >>>> comparator=blob AND >>>> read_repair_chance=0.000000 AND >>>> gc_grace_seconds=0 AND >>>> default_validation=blob AND >>>> min_compaction_threshold=4 AND >>>> max_compaction_threshold=32 AND >>>> replicate_on_write='false' AND >>>> compaction_strategy_class='SizeTieredCompactionStrategy' AND >>>> compression_parameters:sstable_compression='SnappyCompressor'; >>>> >>>> CREATE TABLE UM_ROLE_USER_INDEX ( >>>> KEY blob PRIMARY KEY >>>> ) WITH >>>> comment='' AND >>>> comparator=blob AND >>>> read_repair_chance=0.000000 AND >>>> gc_grace_seconds=0 AND >>>> default_validation=blob AND >>>> min_compaction_threshold=4 AND >>>> max_compaction_threshold=32 AND >>>> replicate_on_write='false' AND >>>> compaction_strategy_class='SizeTieredCompactionStrategy' AND >>>> compression_parameters:sstable_compression='SnappyCompressor'; >>>> >>>> CREATE TABLE UM_ROLE ( >>>> KEY blob PRIMARY KEY >>>> ) WITH >>>> comment='' AND >>>> comparator=blob AND >>>> read_repair_chance=0.000000 AND >>>> gc_grace_seconds=0 AND >>>> default_validation=blob AND >>>> min_compaction_threshold=4 AND >>>> max_compaction_threshold=32 AND >>>> replicate_on_write='false' AND >>>> compaction_strategy_class='SizeTieredCompactionStrategy' AND >>>> compression_parameters:sstable_compression='SnappyCompressor'; >>>> >>>> CREATE TABLE UM_USER_ATTRIBUTE ( >>>> KEY blob PRIMARY KEY >>>> ) WITH >>>> comment='' AND >>>> comparator=blob AND >>>> read_repair_chance=0.000000 AND >>>> gc_grace_seconds=0 AND >>>> default_validation=blob AND >>>> min_compaction_threshold=4 AND >>>> max_compaction_threshold=32 AND >>>> replicate_on_write='false' AND >>>> compaction_strategy_class='SizeTieredCompactionStrategy' AND >>>> compression_parameters:sstable_compression='SnappyCompressor'; >>>> >>>> >>>> On Wed, Oct 15, 2014 at 2:15 PM, Deependra Ariyadewa <[email protected]> >>>> wrote: >>>> >>>>> @Shani Please share the user mgt schema. >>>>> >>>>> On Wed, Oct 15, 2014 at 12:37 PM, Prabath Abeysekera < >>>>> [email protected]> wrote: >>>>> >>>>>> If that's the case please get Deep/Bhathiya to do a quick review on >>>>>> the Cassandra related aspects of this. We can probably go for a much >>>>>> organized code review later. >>>>>> >>>>>> Cheers, >>>>>> Prabath >>>>>> >>>>>> On Wed, Oct 15, 2014 at 12:32 PM, Shani Ranasinghe <[email protected]> >>>>>> wrote: >>>>>> >>>>>>> Hi Prabath, >>>>>>> >>>>>>> Actually this is quite urgent as this needs to be shared to two >>>>>>> customers. Hence shared the code in this manner. I just scheduled the >>>>>>> code >>>>>>> review for today. >>>>>>> >>>>>>> On Wed, Oct 15, 2014 at 12:26 PM, Shani Ranasinghe <[email protected]> >>>>>>> wrote: >>>>>>> >>>>>>>> [adding dev@] >>>>>>>> >>>>>>>> Just to add some context, the user store supports limited >>>>>>>> functionality. They are >>>>>>>> >>>>>>>> In super tenant mode >>>>>>>> - add/edit/delete user >>>>>>>> - add/edit/delete role >>>>>>>> - attach user to role >>>>>>>> - attach role to user >>>>>>>> - view users >>>>>>>> - view roles >>>>>>>> >>>>>>>> >>>>>>>> On Wed, Oct 15, 2014 at 12:22 PM, Shani Ranasinghe <[email protected]> >>>>>>>> wrote: >>>>>>>> >>>>>>>>> >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> Attached herewith is the CassandraUserStoreManager.java which I >>>>>>>>> have implemented for Carbon 4.2.0. >>>>>>>>> >>>>>>>>> Would appreciate if I could get someone from the IS team and a >>>>>>>>> cassandra expert to review the code. >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Thanks and Regards >>>>>>>>> *,Shani Ranasinghe* >>>>>>>>> Software Engineer >>>>>>>>> WSO2 Inc.; http://wso2.com >>>>>>>>> lean.enterprise.middleware >>>>>>>>> >>>>>>>>> mobile: +94 77 2273555 >>>>>>>>> linked in: lk.linkedin.com/pub/shani-ranasinghe/34/111/ab >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Thanks and Regards >>>>>>>> *,Shani Ranasinghe* >>>>>>>> Software Engineer >>>>>>>> WSO2 Inc.; http://wso2.com >>>>>>>> lean.enterprise.middleware >>>>>>>> >>>>>>>> mobile: +94 77 2273555 >>>>>>>> linked in: lk.linkedin.com/pub/shani-ranasinghe/34/111/ab >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Thanks and Regards >>>>>>> *,Shani Ranasinghe* >>>>>>> Software Engineer >>>>>>> WSO2 Inc.; http://wso2.com >>>>>>> lean.enterprise.middleware >>>>>>> >>>>>>> mobile: +94 77 2273555 >>>>>>> linked in: lk.linkedin.com/pub/shani-ranasinghe/34/111/ab >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Prabath Abeysekara >>>>>> Associate Technical Lead, Data TG. >>>>>> WSO2 Inc. >>>>>> Email: [email protected] >>>>>> Mobile: +94774171471 >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Deependra Ariyadewa >>>>> WSO2, Inc. http://wso2.com/ http://wso2.org >>>>> >>>>> email [email protected]; cell +94 71 403 5996 ; >>>>> Blog http://risenfall.wordpress.com/ >>>>> PGP info: KeyID: 'DC627E6F' >>>>> >>>>> *WSO2 - Lean . Enterprise . Middleware* >>>>> >>>> >>>> >>>> >>>> -- >>>> Thanks and Regards >>>> *,Shani Ranasinghe* >>>> Software Engineer >>>> WSO2 Inc.; http://wso2.com >>>> lean.enterprise.middleware >>>> >>>> mobile: +94 77 2273555 >>>> linked in: lk.linkedin.com/pub/shani-ranasinghe/34/111/ab >>>> >>> >>> >>> >>> -- >>> Thanks and Regards >>> *,Shani Ranasinghe* >>> Software Engineer >>> WSO2 Inc.; http://wso2.com >>> lean.enterprise.middleware >>> >>> mobile: +94 77 2273555 >>> linked in: lk.linkedin.com/pub/shani-ranasinghe/34/111/ab >>> >> >> >> >> -- >> Thanks and Regards >> *,Shani Ranasinghe* >> Software Engineer >> WSO2 Inc.; http://wso2.com >> lean.enterprise.middleware >> >> mobile: +94 77 2273555 >> linked in: lk.linkedin.com/pub/shani-ranasinghe/34/111/ab >> > > > > -- > Thanks and Regards > *,Shani Ranasinghe* > Software Engineer > WSO2 Inc.; http://wso2.com > lean.enterprise.middleware > > mobile: +94 77 2273555 > linked in: lk.linkedin.com/pub/shani-ranasinghe/34/111/ab > -- Deependra Ariyadewa WSO2, Inc. http://wso2.com/ http://wso2.org email [email protected]; cell +94 71 403 5996 ; Blog http://risenfall.wordpress.com/ PGP info: KeyID: 'DC627E6F' *WSO2 - Lean . Enterprise . Middleware*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
