Re: cqlsh problem

2016-03-18 Thread joseph gao
Of course yes.

2016-03-17 22:35 GMT+08:00 Vishwas Gupta :

> Have you started the Cassandra service?
>
> sh cassandra
> On 17-Mar-2016 7:59 pm, "Alain RODRIGUEZ"  wrote:
>
>> Hi, did you try with the address of the node rather than 127.0.0.1
>>
>> Is the transport protocol used by cqlsh (not sure if it is thrift or
>> binary - native in 2.1)  active ? What is the "nodetool info" output ?
>>
>> C*heers,
>> ---
>> Alain Rodriguez - al...@thelastpickle.com
>> France
>>
>> The Last Pickle - Apache Cassandra Consulting
>> http://www.thelastpickle.com
>>
>> 2016-03-17 14:26 GMT+01:00 joseph gao :
>>
>>> hi, all
>>> cassandra version 2.1.7
>>> When I use cqlsh to connect cassandra, something is wrong
>>>
>>> Connection error: ( Unable to connect to any servers', {'127.0.0.1':
>>> OperationTimedOut('errors=None, last_host=None,)})
>>>
>>> This happens lots of times, but sometime it works just fine. Anybody
>>> knows why?
>>>
>>> --
>>> --
>>> Joseph Gao
>>> PhoneNum:15210513582
>>> QQ: 409343351
>>>
>>
>>


-- 
--
Joseph Gao
PhoneNum:15210513582
QQ: 409343351


Re: Deploy latest cassandra on top of datastax-ddc ?

2016-03-18 Thread Mohamed Lrhazi
Thanks Robert.

FYI.. for the curious.. what I did resulted in a cluster where i tested
these two things:

- nodetool status shows all 8 nodes as Up and Nomral.
- A couple of cql select statements seem to return correct data.

I have no inclination to keep using such a setup.. just reporting the
experiment :)

Thanks,
Mohamed.


On Fri, Mar 18, 2016 at 7:19 PM, Robert Coli  wrote:

> On Fri, Mar 18, 2016 at 2:18 PM, Mohamed Lrhazi <
> mohamed.lrh...@georgetown.edu> wrote:
>
>> So, after doing an ant build from the latest source... how would one
>> "install" or deploy cassandra?  Could not find a document on the install
>> from source part... any pointers?  All I find makes use of yum or apt
>> repo's, or deploy from binary tarball...
>>
>
> Per jeffj@IRC :
>
> "'ant release' creates a binary package that's runnable."
>
> =ROB
>
>
>


Re: Deploy latest cassandra on top of datastax-ddc ?

2016-03-18 Thread Robert Coli
On Fri, Mar 18, 2016 at 2:18 PM, Mohamed Lrhazi <
mohamed.lrh...@georgetown.edu> wrote:

> So, after doing an ant build from the latest source... how would one
> "install" or deploy cassandra?  Could not find a document on the install
> from source part... any pointers?  All I find makes use of yum or apt
> repo's, or deploy from binary tarball...
>

Per jeffj@IRC :

"'ant release' creates a binary package that's runnable."

=ROB


RE: DTCS Question

2016-03-18 Thread Anubhav Kale
Thanks for the explanation.

From: Marcus Eriksson [mailto:krum...@gmail.com]
Sent: Thursday, March 17, 2016 12:56 AM
To: user@cassandra.apache.org
Subject: Re: DTCS Question



On Wed, Mar 16, 2016 at 6:49 PM, Anubhav Kale 
mailto:anubhav.k...@microsoft.com>> wrote:
I am using Cassandra 2.1.13 which has all the latest DTCS fixes (it does STCS 
within the DTCS windows). It also introduced a field called MAX_WINDOW_SIZE 
which defaults to one day.

So in my data folders, I may see SS Tables that span beyond a day (generated 
through old data through repairs or commit logs), but whenever I see a message 
in logs “Compacted Foo” (meaning the SS Table under question was definitely a 
result of compaction), the “Foo” SS Table should never have data beyond a day. 
Is this understanding accurate ?
No - not until 
https://issues.apache.org/jira/browse/CASSANDRA-10496
 (read for explanation)


If we have issues with repairs pulling in old data, should MAX_WINDOW_SIZE 
instead be set to a larger value so that we don’t run the risk of too many SS 
Tables lying around and never getting compacted ?
No, with CASSANDRA-10280 that old data will get compacted if needed (assuming 
you have default settings). If the remote node is correctly date tiered, the 
streamed sstable will also be correctly date tiered. Then that streamed sstable 
will be put in a time window and if there are enough sstables in that old 
window, we do a compaction.

/Marcus



Re: Deploy latest cassandra on top of datastax-ddc ?

2016-03-18 Thread Robert Coli
On Fri, Mar 18, 2016 at 5:00 PM, Mohamed Lrhazi <
mohamed.lrh...@georgetown.edu> wrote:

> FYI.. for the curious.. what I did resulted in a cluster where i tested
> these two things:
> ...
>
I have no inclination to keep using such a setup.. just reporting the
> experiment :)
>

FWIW, given the general .jar-ryness of the product, IRC discussion
suggested that this mode may be less-insane than I would personally presume.

I am still not recommending it! :D

=Rob


Re: Question about SELECT command

2016-03-18 Thread Thouraya TH
As i read here
http://docs.datastax.com/en//cassandra/2.0/cassandra/architecture/architectureDataDistributeAbout_c.html

Cassandra partitions the data across the cluster.

My question is: how works the SELECT command ? it uses the gossip protocol
to get all lines in the distributed table ?
I have tested it and i can get the list of all elements from ANY NODE.

Bests.



2016-03-17 16:10 GMT+01:00 Thouraya TH :

> Hi all;
>
> Please, i have a question about the architecure behind SELECT command.
> Given this table:
>
>   c1   c2  c3
> value1 value2   value3
> ...
> 
> etc...
>
> lines of this table are distributed over nodes that's it ?
>
>
> Thank you so much for answers.
> Kind regards.
>


Re: Questions about Datastax support

2016-03-18 Thread Rakesh Kumar
> 1. They have a published support policy:
> http://www.datastax.com/support-policy/supported-software

Why is the version number so different from the cassandra community edition.

Take a look at this:
4.8.2Release NotesNov 11, 2015Mar 23, 2016Sep 23, 2017

What is version 4.8.2


Re: Understanding SELECT * paging/ordering

2016-03-18 Thread Tyler Hobbs
On Fri, Mar 18, 2016 at 4:58 PM, Dan Checkoway  wrote:

> Say I have a table with 50M rows in a keyspace with RF=3 in a cluster of
> 15 nodes (single local data center).  When I do "SELECT * FROM table" and
> page through those results (with a fetch size of say 1000), I'd like to
> understand better how that paging works.
>
> Specifically, what determines the order in which which rows are returned?
>

Results are returned in token order (murmur3 hash of the partition key),
and within a single partition, rows are ordered by the clustering key.


>   And what's happening under the hood...i.e. is the coordinator fetching
> pages of 1000 from each node, passing some sort of paging state to each
> node, and the coordinator merges the per-node sorted result sets?
>

The coordinator sequentially[1] queries each token range until it has
enough rows to meet the page size.  When the next page is fetched, it
resumes this process, but starts at the last-used token (which is in the
paging state that the driver passes to the coordinator) rather than the
start of the ring.


> I'm also curious how consistency level comes into play.  i.e. if I use ONE
> vs. QUORUM vs. ALL, how that impacts where the results come from and how
> they're ordered, merged, and who knows what else I don't know...  :-)
>

The only difference between ONE and QUORUM is that the coordinator will
query multiple replicas for each token range and perform the standard
conflict resolution.

[1] In reality, based on estimates of how many token ranges it will need to
query in order to meet the page size, it will query multiple token ranges
in parallel.  See CASSANDRA-1337 for details.

-- 
Tyler Hobbs
DataStax 


Re: Single node Solr FTs not working

2016-03-18 Thread Joseph Tech
I had verified that it works on a 2-node cluster where one is setup as
online, and the other as search. That's on our customer env where I don't
have full access, and this is the only difference I could see so far.
On Mar 18, 2016 8:15 PM, "Jack Krupansky"  wrote:

> Have you verified that the documented reference example functions as
> expected on your system? If so, then incrementally morph it towards your
> own code to discover exactly at which stage the problem occurs. Or just
> having the reference example side by side with your own code/schema/table
> will help highlight what the difference is that causes the problem.
>
> Doc:
>
> http://docs.datastax.com/en/latest-dse/datastax_enterprise/srch/srchTrnsFrm.html
>
> -- Jack Krupansky
>
> On Fri, Mar 18, 2016 at 4:30 AM, Joseph Tech 
> wrote:
>
>> Hi,
>>
>> I had setup a single-node DSE 4.8.x to start in Search mode to explore
>> some aspects of Solr search with field transformers (FT). Even though the
>> configuration seems fine and Solr admin shows the indexed data, and
>> searches on the actual fields (stored=true) work fine, but the FTs are not
>> being invoked during the indexing and the search using fields managed by
>> the FT don't work , i.e the evaluate(), addFieldToDocument() etc are not
>> invoked. There are no ERRORs or similar indications in system.log, and
>> solrvalidation.log is not having any entries too.
>>
>> The only warnings are during node startup for the non-stored fields like
>> xyz
>>
>> WARN  [SolrSecondaryIndex checkout.cart index initializer.] 2016-03-16
>> 17:24:57,956  CassandraIndexSchema.java:537 - No Cassandra column found for
>> field: xyz
>>
>> The FT configuration was verified by changing the FT's class name in
>> solrconfig.xml and it threw a ClassNotFoundException, which didnt appear
>> with the right classname was given.
>>
>> The data is being inserted and retrieved from the same node. Please
>> suggest any pointers to debug this.
>>
>> Thanks,
>> Joseph
>>
>
>


Re: Modeling Audit Trail on Cassandra

2016-03-18 Thread I PVP
Jack/Tom
Thanks for answering.

Here is the table definition so far:

CREATE TABLE audit_trail (
auditid timeuuid,
actiontype text,
objecttype text,
executedby uuid ( or timeuuid?),
executedat timestamp,
objectbefore text,
objectafter text,
clientipaddr text,
serveripaddr text,
servername text,
channel text,
PRIMARY KEY (auditid)
);

objectbefore/after are the only ones that will have JSON content. quering based 
on the contents of these two  columns are not a requirement.

At this moment the queries are going to be mainly on executedby ( the employee 
id).
Stratio’s Cassandra Lucene Index will be used to allow querying/filtering on 
executedat (timestamp) ,objecttype(order, customer, ticket, message,account, 
paymenttransaction,refund etc.)  and actiontype(create, retrieve, update, 
delete, approve, activate, unlock, lock etc.) .

I am considering to count exclusively on Stratio’s Cassandra Lucene  filtering 
and avoid to add  “period” columns like month(int), year(int), day (int).

Thanks

--
IPVP


From: Jack Krupansky 
Reply: user@cassandra.apache.org 
>
Date: March 16, 2016 at 5:22:36 PM
To: user@cassandra.apache.org 
>
Subject:  Re: Modeling Audit Trail on Cassandra

executedby is the ID assigned to an employee.

I'm presuming that JSON is to be used for objectbefore/after. This suggests no 
ability to query by individual object fields. I didn't sense any other columns 
that would be JSON.



-- Jack Krupansky

On Wed, Mar 16, 2016 at 3:48 PM, Tom van den Berge 
mailto:t...@drillster.com>> wrote:
Is text the most appropriate data type to store JSON that contain couple of 
dozen lines ?

It sure is the simplest way to store JSON.

The query requirement  is  "where executedby = ?”.

Since executedby is a timeuuid, I guess you don't want to query a single 
record, since that would require you to know the exact timeuuid. Do you mean 
that you would like to query all changes in a certain time frame, e.g. today? 
In that case, you would have to group your rows in time buckets, e.g. PRIMARY 
KEY ((period), auditid). Period can be a day, month, or any other period that 
suits your situation. Retrieving all changes in a specific time frame is done 
by retrieving all relevant periods.

Tom



Re: cqlsh problem

2016-03-18 Thread Vishwas Gupta
Have you started the Cassandra service?

sh cassandra
On 17-Mar-2016 7:59 pm, "Alain RODRIGUEZ"  wrote:

> Hi, did you try with the address of the node rather than 127.0.0.1
>
> Is the transport protocol used by cqlsh (not sure if it is thrift or
> binary - native in 2.1)  active ? What is the "nodetool info" output ?
>
> C*heers,
> ---
> Alain Rodriguez - al...@thelastpickle.com
> France
>
> The Last Pickle - Apache Cassandra Consulting
> http://www.thelastpickle.com
>
> 2016-03-17 14:26 GMT+01:00 joseph gao :
>
>> hi, all
>> cassandra version 2.1.7
>> When I use cqlsh to connect cassandra, something is wrong
>>
>> Connection error: ( Unable to connect to any servers', {'127.0.0.1':
>> OperationTimedOut('errors=None, last_host=None,)})
>>
>> This happens lots of times, but sometime it works just fine. Anybody
>> knows why?
>>
>> --
>> --
>> Joseph Gao
>> PhoneNum:15210513582
>> QQ: 409343351
>>
>
>