Re: Basic query in setting up secure inter-dc cluster

2016-01-06 Thread Neha Dave
Hi Ajay,
Have a look here :
https://docs.datastax.com/en/cassandra/1.2/cassandra/security/secureSSLNodeToNode_t.html

You can configure for DC level Security:

Procedure

On each node under sever_encryption_options:

   - Enable internode_encryption.
   The available options are:
  - all
  - none
  - dc: Cassandra encrypts the traffic between the data centers.
  - rack: Cassandra encrypts the traffic between the racks.

regards

Neha



On Wed, Jan 6, 2016 at 12:48 PM, Singh, Abhijeet 
wrote:

> Security is a very wide concept. What exactly do you want to achieve ?
>
>
>
> *From:* Ajay Garg [mailto:ajaygargn...@gmail.com]
> *Sent:* Wednesday, January 06, 2016 11:27 AM
> *To:* user@cassandra.apache.org
> *Subject:* Basic query in setting up secure inter-dc cluster
>
>
>
> Hi All.
>
> We have a 2*2 cluster deployed, but no security as of now.
>
> As a first stage, we wish to implement inter-dc security.
>
> Is it possible to enable security one machine at a time?
>
> For example, let's say the machines are DC1M1, DC1M2, DC2M1, DC2M2.
>
> If I make the changes JUST IN DC2M2 and restart it, will the traffic
> between DC1M1/DC1M2 and DC2M2 be secure? Or security will kick in ONLY
> AFTER the changes are made in all the 4 machines?
>
> Asking here, because I don't want to screw up a live cluster due to my
> lack of experience.
>
> Looking forward to some pointers.
>
>
> --
>
> Regards,
> Ajay
>


Re: I am a Datastax certified Cassandra architect now :)

2015-11-25 Thread Neha Dave
Congrats Prem !!!
Me too planning to take up the certificate.
Please, Provide tips?

regards
Neha

On Wed, Nov 25, 2015 at 10:36 PM, Ariel Weisberg  wrote:

> Hi,
>
> Congratulations! I hope the certification brings good things for you.
>
> Regards,
> Ariel
>
>
> On Sun, Nov 22, 2015, at 01:00 PM, Prem Yadav wrote:
>
> Just letting the community know that I just passed the Cassandra architect
> certification with flying colors :).
> Have to say I learnt a lot from this forum.
>
> Thanks,
> Prem
>
>
>


Re: Nested Collections in Cassandra

2015-11-15 Thread Neha Dave
Hi Jack,
Thanks for the response.

Do you think it's a good idea to have a separate table like :

CREATE TYPE metadata (
  key text,
  value set,
  path_id uuid
  );

And then index it on Value so that the query like... :
SELECT * from metadata where value CONTAINS {values: {'FOX'};

2. Can I use composite column? any idea?

regards
neha




On Sat, Nov 14, 2015 at 9:21 PM, Jack Krupansky <jack.krupan...@gmail.com>
wrote:

> You can only nest frozen collections and even then you can only access the
> full nested value, not individual entries within the nested map.
>
> So, in your example, you can only access mimetype and then must specify
> the full mime type value, which doesn't satisfy your query requirement.
>
> You will need to flatten your nesting into distinct rows with clustering
> keys. Then you can query a row with the mimetype in a clustering key. And
> add a clustering key for the mime values name.
>
> -- Jack Krupansky
>
> On Sat, Nov 14, 2015 at 5:16 AM, Neha Dave <nehajtriv...@gmail.com> wrote:
>
>> Any Help?
>>
>> On Tue, Nov 10, 2015 at 7:44 PM, Neha Dave <nehajtriv...@gmail.com>
>> wrote:
>>
>>> How can we achieve Nested Collections in cassandra.
>>>
>>> My requirement :
>>> metadata map<text,list> ... Is it possible?
>>>
>>> Eg. 'mime-type' : 'MIME'
>>>   'Security'  : {'SOX','FOX'}
>>>
>>> Query will be Give me all the ID's where 'Security'  : {'SOX'} OR
>>> contains 'SOX'
>>>
>>> Is it Possible?
>>> Can I use UDT to do it?
>>>
>>> Eg CQL :
>>>
>>> CREATE TYPE security (
>>>   number text,
>>>   tags set
>>>   );
>>>
>>>
>>> CREATE TYPE listdata (
>>>   values set
>>>   );
>>>
>>>   CREATE TABLE test_path (
>>>   path_id text PRIMARY KEY,
>>>   metadata map<text, frozen>
>>>   );
>>>
>>> INSERT INTO test_path (path_id, metadata ) VALUES ( '2', { 'mime-type':
>>> {values : {'Mime'}}
>>> {'applicable-security-policy' : {'SOX','FOX'}} });
>>>
>>>
>>> Query (which does not work) can be :
>>> SELECT * from test_path where metadata CONTAINS {values: {'FOX'},
>>> 'SOX'}} ;
>>> OR
>>> SELECT * from test_path where metadata CONTAINS {values: {'FOX'};
>>>
>>>
>>> Thanks
>>> Regards
>>> Neha
>>>
>>>
>>>
>>>
>>>
>>
>


UDT - Collection - Query

2015-11-15 Thread Neha Dave
CREATE type metadata1 (
  key text,
  value set,
  );

CREATE TABLE test_path3 (

  path_id text,
  mdata frozen,
  PRIMARY KEY (path_id,mdata)
  );
CREATE INDEX metadata_teste_path3 on test_path3 (mdata) ;

INSERT INTO test_path3 (path_id, mdata ) VALUES ( '2', { key
:'mime-type',value: {'Mime'}});

INSERT INTO test_path3 (path_id, mdata ) VALUES ( '1', { key
:'mime-type',value: {'Mime'}});

INSERT INTO test_path3 (path_id, mdata ) VALUES ( '1', { key
:'applicable-security-policy',value: {'SOX'}});

INSERT INTO test_path3 (path_id, mdata ) VALUES ( '1', { key
:'applicable-security-policy',value: {'FOX'}});





*Can I query Something likecqlsh:mykeyspace> SELECT * FROM test_path3
where mdata.value CONTAINS {'Mime'};SyntaxException: *
Thanks
regards
Neha


Re: Nested Collections in Cassandra

2015-11-14 Thread Neha Dave
Any Help?

On Tue, Nov 10, 2015 at 7:44 PM, Neha Dave <nehajtriv...@gmail.com> wrote:

> How can we achieve Nested Collections in cassandra.
>
> My requirement :
> metadata map<text,list> ... Is it possible?
>
> Eg. 'mime-type' : 'MIME'
>   'Security'  : {'SOX','FOX'}
>
> Query will be Give me all the ID's where 'Security'  : {'SOX'} OR contains
> 'SOX'
>
> Is it Possible?
> Can I use UDT to do it?
>
> Eg CQL :
>
> CREATE TYPE security (
>   number text,
>   tags set
>   );
>
>
> CREATE TYPE listdata (
>   values set
>   );
>
>   CREATE TABLE test_path (
>   path_id text PRIMARY KEY,
>   metadata map<text, frozen>
>   );
>
> INSERT INTO test_path (path_id, metadata ) VALUES ( '2', { 'mime-type':
> {values : {'Mime'}}
> {'applicable-security-policy' : {'SOX','FOX'}} });
>
>
> Query (which does not work) can be :
> SELECT * from test_path where metadata CONTAINS {values: {'FOX'}, 'SOX'}} ;
> OR
> SELECT * from test_path where metadata CONTAINS {values: {'FOX'};
>
>
> Thanks
> Regards
> Neha
>
>
>
>
>


Nested Collections in Cassandra

2015-11-10 Thread Neha Dave
How can we achieve Nested Collections in cassandra.

My requirement :
metadata map ... Is it possible?

Eg. 'mime-type' : 'MIME'
  'Security'  : {'SOX','FOX'}

Query will be Give me all the ID's where 'Security'  : {'SOX'} OR contains
'SOX'

Is it Possible?
Can I use UDT to do it?

Eg CQL :

CREATE TYPE security (
  number text,
  tags set
  );


CREATE TYPE listdata (
  values set
  );

  CREATE TABLE test_path (
  path_id text PRIMARY KEY,
  metadata map
  );

INSERT INTO test_path (path_id, metadata ) VALUES ( '2', { 'mime-type':
{values : {'Mime'}}
{'applicable-security-policy' : {'SOX','FOX'}} });


Query (which does not work) can be :
SELECT * from test_path where metadata CONTAINS {values: {'FOX'}, 'SOX'}} ;
OR
SELECT * from test_path where metadata CONTAINS {values: {'FOX'};


Thanks
Regards
Neha


Re: Possible to restore ENTIRE data from Cassandra-Schema in one go?

2015-09-15 Thread Neha Dave
Havent used it.. but u can try SSTaable Bulk Loader:

http://docs.datastax.com/en/cassandra/2.0/cassandra/tools/toolsBulkloader_t.html

regards
Neha

On Tue, Sep 15, 2015 at 11:21 AM, Ajay Garg  wrote:

> Hi All.
>
> We have a schema on one Cassandra-node, and wish to duplicate the
> entire schema on another server.
> Think of this a 2 clusters, each cluster containing one node.
>
> We have found the way to dump/restore schema-metainfo at ::
>
> https://dzone.com/articles/dumpingloading-schema
>
>
> And dumping/restoring data at ::
>
>
> http://docs.datastax.com/en/cassandra/2.0/cassandra/operations/ops_backup_takes_snapshot_t.html
>
> http://docs.datastax.com/en/cassandra/2.0/cassandra/operations/ops_backup_snapshot_restore_t.html
>
>
> For the restoring data step, it seems that restoring every "table"
> requires a dedicated step.
> So, if the schema has 100 "tables", we would need 100 steps.
>
>
> Is it so? If yes, can the entire data be dumped/restored in one go?
> Just asking, to save time, if it could :)
>
>
>
>
> Thanks and Regards,
> Ajay
>


Re: Not able to cqlsh on 2.1.9 on Ubuntu 14.04

2015-09-14 Thread Neha Dave
Try
>cqlsh 

regards
Neha

On Mon, Sep 14, 2015 at 3:53 PM, Ajay Garg  wrote:

> Hi All.
>
> We have setup a Ubuntu-14.04 server, and followed the steps exactly as
> per http://wiki.apache.org/cassandra/DebianPackaging
>
> Installation completes fine, Cassandra starts fine, however cqlsh does not
> work.
> We get the error ::
>
>
> ###
> ajay@comp:~$ cqlsh
> Connection error: ('Unable to connect to any servers', {'127.0.0.1':
> error(None, "Tried connecting to [('127.0.0.1', 9042)]. Last error:
> None")})
>
> ###
>
>
>
> Version-Info ::
>
>
> ###
> ajay@comp:~$ dpkg -l | grep cassandra
> ii  cassandra   2.1.9
>  all  distributed storage system for structured data
>
> ###
>
>
>
> The port "seems" to be opened fine.
>
>
> ###
> ajay@comp:~$ netstat -an | grep 9042
> tcp6   0  0 127.0.0.1:9042  :::*LISTEN
>
> ###
>
>
>
> Firewall-filters ::
>
>
> ###
> ajay@comp:~$ sudo iptables -L
> [sudo] password for ajay:
> Chain INPUT (policy ACCEPT)
> target prot opt source   destination
> ACCEPT all  --  anywhere anywhere state
> RELATED,ESTABLISHED
> ACCEPT tcp  --  anywhere anywhere tcp dpt:ssh
> DROP   all  --  anywhere anywhere
>
> Chain FORWARD (policy ACCEPT)
> target prot opt source   destination
>
> Chain OUTPUT (policy ACCEPT)
> target prot opt source   destination
>
> ###
>
>
>
> Even telnet fails :(
>
>
> ###
> ajay@comp:~$ telnet localhost 9042
> Trying 127.0.0.1...
>
> ###
>
>
>
> Any ideas please?? We have been stuck on this for a good 3 hours now :(
>
>
>
> Thanks and Regards,
> Ajay
>