Re: Copy from CSV on OS X problem with varint values <= -2^63

2017-04-04 Thread Stefania Alborghetti
You are welcome.

I traced the problem to a commit of the Python driver that shipped in
version 3.8 of the driver. It is fixed in 3.8.1. More details on
CASSANDRA-13408 . I
don't think it's related to the OS.

Since Cassandra 3.10 ships with an older version of the driver embedded in
a zip file in the lib folder, and this version is not affected, I'm
guessing that either the embedded version does not work on OS X, or you are
manually using a different version of the driver by setting CQLSH_NO_BUNDLED
(which is why I could reproduce it on my laptop).

You can run cqlsh with --debug to see the version of the driver that cqlsh
is using, for example:

*cqlsh --debug*
*Using CQL driver: *

Can you confirm if you were overriding the Python driver by setting
CQLSH_NO_BUNDLED and the version of the driver?



On Tue, Apr 4, 2017 at 6:12 PM, Boris Babic  wrote:

> Thanks Stefania, going from memory don't think I noticed this on windows
> but haven't got a machine handy to test it on at the moment.
>
> On Apr 4, 2017, at 19:44, Stefania Alborghetti  datastax.com> wrote:
>
> I've reproduced the same problem on Linux, and I've opened CASSANDRA-13408
> . As a workaround,
> disable prepared statements and it will work (WITH HEADER = TRUE AND
> PREPAREDSTATEMENTS = False).
>
> On Tue, Apr 4, 2017 at 5:02 PM, Boris Babic  wrote:
>
>>
>> On Apr 4, 2017, at 7:00 PM, Boris Babic  wrote:
>>
>> Hi
>>
>> I’m testing the write of various datatypes on OS X for fun running
>> cassandra 3.10 on a single laptop instance, and from what i can see varint
>> should map to java.math.BigInteger and have no problems with Long.MIN_VALE
>> , -9223372036854775808, but i can’t see what I’m doing wrong.
>>
>> cqlsh: 5.0.1
>> cassandra 3.10
>> osx el capitan.
>>
>> data.csv:
>>
>> id,varint
>> -2147483648 <(214)%20748-3648>,-9223372036854775808
>> 2147483647 <(214)%20748-3647>,9223372036854775807
>>
>> COPY mykeyspace.data (id,varint) FROM 'data.csv' WITH HEADER=true;
>>
>> *  Failed to make batch statement: Received an argument of invalid
>> type for column "varint". Expected: > 'cassandra.cqltypes.IntegerType'>, Got: ; (descriptor
>> 'bit_length' requires a 'int' object but received a 'long’)*
>>
>> If I directly type a similar insert in cqlsh no such problem occurs, in
>> fact I can make the value many orders of magnitude less and all is fine.
>>
>> cqlsh> insert into mykeyspace.data (id,varint)
>> values(1,-9223372036854775808898989898) ;
>>
>> Had not observed this before on other OS, is this something todo with the
>> way the copy from parser is interpreting varint for values <= -2^63 ?
>>
>> Thanks for any input
>> Boris
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>
> --
>
> 
>
> STEFANIA ALBORGHETTI
>
> Software engineer | +852 6114 9265 <+852%206114%209265> |
> stefania.alborghe...@datastax.com
>
>
> [image: http://www.datastax.com/cloud-applications]
> 
>
>
>
>


-- 



STEFANIA ALBORGHETTI

Software engineer | +852 6114 9265 | stefania.alborghe...@datastax.com


[image: http://www.datastax.com/cloud-applications]



Re: cassandra OOM

2017-04-04 Thread Gopal, Dhruva
Thanks, that’s interesting – so CMS is a better option for 
stability/performance? We’ll try this out in our cluster.

From: Alexander Dejanovski 
Reply-To: "user@cassandra.apache.org" 
Date: Monday, April 3, 2017 at 10:31 PM
To: "user@cassandra.apache.org" 
Subject: Re: cassandra OOM

Hi,

we've seen G1GC going OOM on production clusters (repeatedly) with a 16GB heap 
when the workload is intense, and given you're running on m4.2xl I wouldn't go 
over 16GB for the heap.

I'd suggest to revert back to CMS, using a 16GB heap and up to 6GB of new gen. 
You can use 5 as MaxTenuringThreshold as an initial value and activate GC 
logging to fine tune the settings afterwards.

FYI CMS tends to perform better than G1 even though it's a little bit harder to 
tune.

Cheers,

On Mon, Apr 3, 2017 at 10:54 PM Gopal, Dhruva 
> wrote:
16 Gig heap, with G1. Pertinent info from jvm.options below (we’re using 
m2.2xlarge instances in AWS):


#
# HEAP SETTINGS #
#

# Heap size is automatically calculated by cassandra-env based on this
# formula: max(min(1/2 ram, 1024MB), min(1/4 ram, 8GB))
# That is:
# - calculate 1/2 ram and cap to 1024MB
# - calculate 1/4 ram and cap to 8192MB
# - pick the max
#
# For production use you may wish to adjust this for your environment.
# If that's the case, uncomment the -Xmx and Xms options below to override the
# automatic calculation of JVM heap memory.
#
# It is recommended to set min (-Xms) and max (-Xmx) heap sizes to
# the same value to avoid stop-the-world GC pauses during resize, and
# so that we can lock the heap in memory on startup to prevent any
# of it from being swapped out.
-Xms16G
-Xmx16G

# Young generation size is automatically calculated by cassandra-env
# based on this formula: min(100 * num_cores, 1/4 * heap size)
#
# The main trade-off for the young generation is that the larger it
# is, the longer GC pause times will be. The shorter it is, the more
# expensive GC will be (usually).
#
# It is not recommended to set the young generation size if using the
# G1 GC, since that will override the target pause-time goal.
# More info: http://www.oracle.com/technetwork/articles/java/g1gc-1984535.html
#
# The example below assumes a modern 8-core+ machine for decent
# times. If in doubt, and if you do not particularly want to tweak, go
# 100 MB per physical CPU core.
#-Xmn800M

#
#  GC SETTINGS  #
#

### CMS Settings

#-XX:+UseParNewGC
#-XX:+UseConcMarkSweepGC
#-XX:+CMSParallelRemarkEnabled
#-XX:SurvivorRatio=8
#-XX:MaxTenuringThreshold=1
#-XX:CMSInitiatingOccupancyFraction=75
#-XX:+UseCMSInitiatingOccupancyOnly
#-XX:CMSWaitDuration=1
#-XX:+CMSParallelInitialMarkEnabled
#-XX:+CMSEdenChunksRecordAlways
# some JVMs will fill up their heap when accessed via JMX, see CASSANDRA-6541
#-XX:+CMSClassUnloadingEnabled

### G1 Settings (experimental, comment previous section and uncomment section 
below to enable)

## Use the Hotspot garbage-first collector.
-XX:+UseG1GC
#
## Have the JVM do less remembered set work during STW, instead
## preferring concurrent GC. Reduces p99.9 latency.
-XX:G1RSetUpdatingPauseTimePercent=5
#
## Main G1GC tunable: lowering the pause target will lower throughput and vise 
versa.
## 200ms is the JVM default and lowest viable setting
## 1000ms increases throughput. Keep it smaller than the timeouts in 
cassandra.yaml.
-XX:MaxGCPauseMillis=500

## Optional G1 Settings

# Save CPU time on large (>= 16GB) heaps by delaying region scanning
# until the heap is 70% full. The default in Hotspot 8u40 is 40%.
-XX:InitiatingHeapOccupancyPercent=70

# For systems with > 8 cores, the default ParallelGCThreads is 5/8 the number 
of logical cores.
# Otherwise equal to the number of cores when 8 or less.
# Machines with > 10 cores should try setting these to <= full cores.
#-XX:ParallelGCThreads=16
# By default, ConcGCThreads is 1/4 of ParallelGCThreads.
# Setting both to the same value can reduce STW durations.
#-XX:ConcGCThreads=16

### GC logging options -- uncomment to enable

#-XX:+PrintGCDetails
#-XX:+PrintGCDateStamps
#-XX:+PrintHeapAtGC
#-XX:+PrintTenuringDistribution
#-XX:+PrintGCApplicationStoppedTime
#-XX:+PrintPromotionFailure
#-XX:PrintFLSStatistics=1
#-Xloggc:/var/log/cassandra/gc.log
#-XX:+UseGCLogFileRotation
#-XX:NumberOfGCLogFiles=10
#-XX:GCLogFileSize=10M


From: Alexander Dejanovski 
>
Reply-To: "user@cassandra.apache.org" 
>
Date: Monday, April 3, 2017 at 8:00 AM
To: "user@cassandra.apache.org" 
>
Subject: Re: cassandra OOM

Hi,

could you share your GC settings ? G1 or CMS ? Heap size, etc...

Thanks,

On Sun, Apr 2, 

Re: Effective partition key for time series data, which allows range queries?

2017-04-04 Thread Jim Ancona
The typical recommendation for maximum partition size is on the order of
100mb and/or 100,000 rows. That's not a hard limit, but you may be setting
yourself up for issues as you approach or exceed those numbers.

If you need to reduce partition size, the typical way to do this is by
"bucketing," that is adding a synthetic column to the partition key to
separate the data into separate buckets. In your example above, I assume
that your current primary key is (user, timestamp), where user is the
partition key and timestamp is the clustering key. Say that you want to
store a maximum of a years worth of data in a partition. You would make the
primary key be ((user, year), timestamp). The partition key is now (user,
year) where year is the year part of the timestamp. Now if you want to
query the data for last month, you would do:

select * from data where user_id = 'foo' and year = 2017 and timestamp >=
'<1 month ago>' and timestamp <= ''


If you wanted to get the data for the last 6 month, you'd do something
like:

select * from data where user_id = 'foo' and year in (2016, 2017) and
timestamp >= '<6 months ago>' and timestamp <= ''  (Notice that
because the query spans two years, you have to include both years in the
select criteria so that C* knows which partitions to query. )


You can make the buckets smaller (e.g. weeks, days, hours instead of
years), but of course querying multiple buckets is less efficient, so it's
worth making your buckets as large as you can without making them too big.

Hope this helps!

Jim




On Mon, Mar 27, 2017 at 8:47 PM, Ali Akhtar  wrote:

> I have a use case where the data for individual users is being tracked,
> and every 15 minutes or so, the data for the past 15 minutes is inserted
> into the table.
>
> The table schema looks like:
> user id, timestamp, foo, bar, etc.
>
> Where foo, bar, etc are the items being tracked, and their values over the
> past 15 minutes.
>
> I initially planned to use the user id as the primary key of the table.
> But, I realized that this may cause really wide rows ( tracking for 24
> hours means 96 records inserted (1 for each 15 min window), over 1 year
> this means 36k records per user, over 2 years, 72k, etc).
>
> I know the  limit of wide rows is billions of records, but I've heard that
> the practical limit is much lower.
>
> So I considered using a composite primary key: (user, timestamp)
>
> If I'm correct, the above should create a new row for each user &
> timestamp logged.
>
> However, will i still be able to do range queries on the timestamp, to e.g
> return the data for the last week?
>
> E.g select * from data where user_id = 'foo' and timestamp >= '<1 month
> ago>' and timestamp <= '' ?
>
>


Re: upgrade to Cassandra 3.0.12

2017-04-04 Thread Jacob Shadix
I installed 2.7 and updated PYTHONPATH, but it is still not finding the
newer version.

-- Jacob Shadix

On Tue, Apr 4, 2017 at 11:22 AM, Voytek Jarnot 
wrote:

> Multiple versions of python can coexist, the cqlsh shell script will
> attempt to execute via a python2.7 executable if it finds one.
>
> On Tue, Apr 4, 2017 at 9:49 AM, Jacob Shadix 
> wrote:
>
>> I've recently upgraded to 3.0.12 and unable to run CQLSH.
>> No appropriate python interpreter found.
>>
>> The current python version installed is 2.6.6. I realize I need to
>> upgrade to 2.7.12 at least, but I also cannot remove the 2.6.6 version. Are
>> there any recommendations for installing a newer version of python
>> alongside the older release?
>>
>> -- Jacob Shadix
>>
>
>


Re: Node Gossiping Information.

2017-04-04 Thread Jeff Jirsa
Cassandra uses system.peers to record the list of peers for subsequent
startups, but gossip state is only in memory

You shouldn't ever manually need to disable/re-enable gossip unless you
want the rest of the ring to believe a node went offline/online.

What version are you using?

On Tue, Apr 4, 2017 at 7:46 AM, Pranay akula 
wrote:

> @Jeff thanks for your reply,
>
> What i am trying to find is where Gossip data will be stored on, which
> Keyspace ??  The nodes will Gossip at the time of their start or will get
> Gossiping Data from seed nodes, What i wanted to do is can we refresh the
> Gossiping Data with out restarting service, I often see Hinted Handoff's
> getting hanged on Some nodes so what i am currently doing to handle that
> situation is i am disabling and enabling Gossip  for that particular node.
> which is currently helping but i am not  sure if it's right way to do it.
>
> Does  streaming_socket_timeout_in_ms parameter has any role to play for
> Hinted Hand-off's ??
>
> Is there any setting in Yaml file i can change get through this situation.
>
> Thanks
> Pranay.
>
> On Tue, Apr 4, 2017 at 12:19 AM, Jeff Jirsa  wrote:
>
>>
>>
>> On 2017-04-02 11:27 (-0700), Pranay akula 
>> wrote:
>> > where can we check  gossip information of a node ??  I couldn't find
>> > anything in System keyspace.
>> >
>> > Is it possible to update or refresh Gossiping information on a node
>> without
>> > restarting. Does enabling and disabling Gossip will help to refresh
>> Gossip
>> > information on that node.
>> >
>>
>>
>> "nodetool gossipinfo"
>>
>>
>>
>


Re: upgrade to Cassandra 3.0.12

2017-04-04 Thread Enrique Bautista
Hi Jacob,

if you use RHEL/Centos, this article in Datastax Help Center explains how
to solve the issue:
https://support.datastax.com/hc/en-us/articles/115000180726--No-appropriate-python-interpreter-found-when-running-cqlsh

Kind regards,

2017-04-04 17:22 GMT+02:00 Voytek Jarnot :

> Multiple versions of python can coexist, the cqlsh shell script will
> attempt to execute via a python2.7 executable if it finds one.
>
> On Tue, Apr 4, 2017 at 9:49 AM, Jacob Shadix 
> wrote:
>
>> I've recently upgraded to 3.0.12 and unable to run CQLSH.
>> No appropriate python interpreter found.
>>
>> The current python version installed is 2.6.6. I realize I need to
>> upgrade to 2.7.12 at least, but I also cannot remove the 2.6.6 version. Are
>> there any recommendations for installing a newer version of python
>> alongside the older release?
>>
>> -- Jacob Shadix
>>
>
>


-- 
Enrique Bautista
Software Engineer
OpenJaw Technologies
T: + 34 91 021 1878
W: www.openjawtech.com

-- 
*The information in this e-mail and any attachments is confidential. It is 
intended solely for the addressee(s) named above. If you are not an 
intended recipient, please notify the sender and delete the message and any 
attachments from your system. Any use, copying or disclosure of the 
contents is unauthorised unless expressly permitted. Any views expressed in 
this message are those of the sender unless expressly stated to be those of 
OpenJaw. Virus checking of emails and attachments is the responsibility of 
the recipient and OpenJaw cannot accept responsibility for any loss or 
damage arising from the use of this email or attachments. OpenJaw 
Technologies Limited is a limited company registered in Ireland having 
registration number 353613 and registered office at Grattan Bridge House, 1 
Ormond Quay Upper, Dublin 7.*


Re: upgrade to Cassandra 3.0.12

2017-04-04 Thread Voytek Jarnot
Multiple versions of python can coexist, the cqlsh shell script will
attempt to execute via a python2.7 executable if it finds one.

On Tue, Apr 4, 2017 at 9:49 AM, Jacob Shadix  wrote:

> I've recently upgraded to 3.0.12 and unable to run CQLSH.
> No appropriate python interpreter found.
>
> The current python version installed is 2.6.6. I realize I need to upgrade
> to 2.7.12 at least, but I also cannot remove the 2.6.6 version. Are there
> any recommendations for installing a newer version of python alongside the
> older release?
>
> -- Jacob Shadix
>


upgrade to Cassandra 3.0.12

2017-04-04 Thread Jacob Shadix
I've recently upgraded to 3.0.12 and unable to run CQLSH.
No appropriate python interpreter found.

The current python version installed is 2.6.6. I realize I need to upgrade
to 2.7.12 at least, but I also cannot remove the 2.6.6 version. Are there
any recommendations for installing a newer version of python alongside the
older release?

-- Jacob Shadix


Re: Node Gossiping Information.

2017-04-04 Thread Pranay akula
@Jeff thanks for your reply,

What i am trying to find is where Gossip data will be stored on, which
Keyspace ??  The nodes will Gossip at the time of their start or will get
Gossiping Data from seed nodes, What i wanted to do is can we refresh the
Gossiping Data with out restarting service, I often see Hinted Handoff's
getting hanged on Some nodes so what i am currently doing to handle that
situation is i am disabling and enabling Gossip  for that particular node.
which is currently helping but i am not  sure if it's right way to do it.

Does  streaming_socket_timeout_in_ms parameter has any role to play for
Hinted Hand-off's ??

Is there any setting in Yaml file i can change get through this situation.

Thanks
Pranay.

On Tue, Apr 4, 2017 at 12:19 AM, Jeff Jirsa  wrote:

>
>
> On 2017-04-02 11:27 (-0700), Pranay akula 
> wrote:
> > where can we check  gossip information of a node ??  I couldn't find
> > anything in System keyspace.
> >
> > Is it possible to update or refresh Gossiping information on a node
> without
> > restarting. Does enabling and disabling Gossip will help to refresh
> Gossip
> > information on that node.
> >
>
>
> "nodetool gossipinfo"
>
>
>


Re: Copy from CSV on OS X problem with varint values <= -2^63

2017-04-04 Thread Boris Babic
Thanks Stefania, going from memory don't think I noticed this on windows but 
haven't got a machine handy to test it on at the moment. 

> On Apr 4, 2017, at 19:44, Stefania Alborghetti 
>  wrote:
> 
> I've reproduced the same problem on Linux, and I've opened CASSANDRA-13408. 
> As a workaround, disable prepared statements and it will work (WITH HEADER = 
> TRUE AND PREPAREDSTATEMENTS = False).
> 
>> On Tue, Apr 4, 2017 at 5:02 PM, Boris Babic  wrote:
>> 
>> On Apr 4, 2017, at 7:00 PM, Boris Babic  wrote:
>> 
>> Hi
>> 
>> I’m testing the write of various datatypes on OS X for fun running cassandra 
>> 3.10 on a single laptop instance, and from what i can see varint should map 
>> to java.math.BigInteger and have no problems with Long.MIN_VALE , 
>> -9223372036854775808, but i can’t see what I’m doing wrong.
>> 
>> cqlsh: 5.0.1
>> cassandra 3.10
>> osx el capitan.
>> 
>> data.csv:
>> 
>> id,varint
>> -2147483648,-9223372036854775808
>> 2147483647,9223372036854775807
>> 
>> COPY mykeyspace.data (id,varint) FROM 'data.csv' WITH HEADER=true;
>> 
>>   Failed to make batch statement: Received an argument of invalid type 
>> for column "varint". Expected: , 
>> Got: ; (descriptor 'bit_length' requires a 'int' object but 
>> received a 'long’)
>> 
>> If I directly type a similar insert in cqlsh no such problem occurs, in fact 
>> I can make the value many orders of magnitude less and all is fine.
>> 
>> cqlsh> insert into mykeyspace.data (id,varint) 
>> values(1,-9223372036854775808898989898) ;
>> 
>> Had not observed this before on other OS, is this something todo with the 
>> way the copy from parser is interpreting varint for values <= -2^63 ?
>> 
>> Thanks for any input
>> Boris
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
> 
> 
> 
> -- 
> 
> STEFANIA ALBORGHETTI
> Software engineer | +852 6114 9265 | stefania.alborghe...@datastax.com
> 
> 
> 
> 


Re: Copy from CSV on OS X problem with varint values <= -2^63

2017-04-04 Thread Stefania Alborghetti
I've reproduced the same problem on Linux, and I've opened CASSANDRA-13408
. As a workaround,
disable prepared statements and it will work (WITH HEADER = TRUE AND
PREPAREDSTATEMENTS = False).

On Tue, Apr 4, 2017 at 5:02 PM, Boris Babic  wrote:

>
> On Apr 4, 2017, at 7:00 PM, Boris Babic  wrote:
>
> Hi
>
> I’m testing the write of various datatypes on OS X for fun running
> cassandra 3.10 on a single laptop instance, and from what i can see varint
> should map to java.math.BigInteger and have no problems with Long.MIN_VALE
> , -9223372036854775808, but i can’t see what I’m doing wrong.
>
> cqlsh: 5.0.1
> cassandra 3.10
> osx el capitan.
>
> data.csv:
>
> id,varint
> -2147483648 <(214)%20748-3648>,-9223372036854775808
> 2147483647 <(214)%20748-3647>,9223372036854775807
>
> COPY mykeyspace.data (id,varint) FROM 'data.csv' WITH HEADER=true;
>
> *  Failed to make batch statement: Received an argument of invalid
> type for column "varint". Expected:  'cassandra.cqltypes.IntegerType'>, Got: ; (descriptor
> 'bit_length' requires a 'int' object but received a 'long’)*
>
> If I directly type a similar insert in cqlsh no such problem occurs, in
> fact I can make the value many orders of magnitude less and all is fine.
>
> cqlsh> insert into mykeyspace.data (id,varint) 
> values(1,-9223372036854775808898989898)
> ;
>
> Had not observed this before on other OS, is this something todo with the
> way the copy from parser is interpreting varint for values <= -2^63 ?
>
> Thanks for any input
> Boris
>
>
>
>
>
>
>
>
>
>


-- 



STEFANIA ALBORGHETTI

Software engineer | +852 6114 9265 | stefania.alborghe...@datastax.com


[image: http://www.datastax.com/cloud-applications]



Re: [Cassandra 3.0.9 ] Disable “delete/Truncate/Drop”

2017-04-04 Thread Abhishek Gupta
Hi Abhishek,

Truncate is very much a part of CQL and it does exactly what the name
suggests i.e truncating/deleting all the rows of the table.

TRUNCATE sends a JMX command to all nodes, telling them to delete SSTables
that hold the data from the specified table. If any of these nodes is down
or doesn't respond, the command fails. Hence, it is important to ensure the
command is run using CONSISTENCY ALL and when all the nodes are up. (use
nodetool status)

Please see
https://docs.datastax.com/en/cql/3.3/cql/cql_reference/cqlTruncate.html for
further details.

Thanks,
Abhishek


On Tue, Apr 4, 2017 at 1:58 PM, Abhishek Kumar Maheshwari <
abhishek.maheshw...@timesinternet.in> wrote:

> Hi all,
>
>
>
> There is any way to disable “delete/Truncate/Drop” command on Cassandra?
>
>
>
> If yes then how we can implement this?
>
>
>
> *Thanks & Regards,*
> *Abhishek Kumar Maheshwari*
> *+91- 805591 (Mobile)*
>
> Times Internet Ltd. | A Times of India Group Company
>
> FC - 6, Sector 16A, Film City,  Noida,  U.P. 201301 | INDIA
>
> *P** Please do not print this email unless it is absolutely necessary.
> Spread environmental awareness.*
>
>
> The “Times Cartoonist Hunt” is now your chance to be the next legendary
> cartoonist. Send us 2 original cartoons, one on current affairs and the
> second on any subject of your choice. All entries must be uploaded on
> www.toicartoonisthunt.com by 5th April 2017. Alternatively, you can email
> your entries at toicarto...@gmail.com with your Name, Age, City and
> Mobile number. Gear up, the Hunt has begun!
>


Re: [Cassandra 3.0.9 ] Disable “delete/Truncate/Drop”

2017-04-04 Thread Bhuvan Rawal
Hi Abhishek,

You can restrict commands a user can issue by enabling authentication &
authorization, then authorizing concerned user with appropriate privileges.

For reference : http://cassandra.apache.org/doc/latest/cql/security.html

Thanks,
Bhuvan

On Tue, Apr 4, 2017 at 1:58 PM, Abhishek Kumar Maheshwari <
abhishek.maheshw...@timesinternet.in> wrote:

> Hi all,
>
>
>
> There is any way to disable “delete/Truncate/Drop” command on Cassandra?
>
>
>
> If yes then how we can implement this?
>
>
>
> *Thanks & Regards,*
> *Abhishek Kumar Maheshwari*
> *+91- 805591 (Mobile)*
>
> Times Internet Ltd. | A Times of India Group Company
>
> FC - 6, Sector 16A, Film City,  Noida,  U.P. 201301 | INDIA
>
> *P** Please do not print this email unless it is absolutely necessary.
> Spread environmental awareness.*
>
>
> The “Times Cartoonist Hunt” is now your chance to be the next legendary
> cartoonist. Send us 2 original cartoons, one on current affairs and the
> second on any subject of your choice. All entries must be uploaded on
> www.toicartoonisthunt.com by 5th April 2017. Alternatively, you can email
> your entries at toicarto...@gmail.com with your Name, Age, City and
> Mobile number. Gear up, the Hunt has begun!
>


Copy from CSV on OS X problem with varint values <= -2^63

2017-04-04 Thread Boris Babic

On Apr 4, 2017, at 7:00 PM, Boris Babic  wrote:

Hi

I’m testing the write of various datatypes on OS X for fun running cassandra 
3.10 on a single laptop instance, and from what i can see varint should map to 
java.math.BigInteger and have no problems with Long.MIN_VALE , 
-9223372036854775808, but i can’t see what I’m doing wrong.

cqlsh: 5.0.1
cassandra 3.10
osx el capitan.

data.csv:

id,varint
-2147483648,-9223372036854775808
2147483647,9223372036854775807

COPY mykeyspace.data (id,varint) FROM 'data.csv' WITH HEADER=true;

  Failed to make batch statement: Received an argument of invalid type for 
column "varint". Expected: , Got: ; (descriptor 'bit_length' requires a 'int' object but received a 'long’)

If I directly type a similar insert in cqlsh no such problem occurs, in fact I 
can make the value many orders of magnitude less and all is fine.

cqlsh> insert into mykeyspace.data (id,varint) 
values(1,-9223372036854775808898989898) ;

Had not observed this before on other OS, is this something todo with the way 
the copy from parser is interpreting varint for values <= -2^63 ?

Thanks for any input
Boris











[Cassandra 3.0.9 ] Disable “delete/Truncate/Drop”

2017-04-04 Thread Abhishek Kumar Maheshwari
Hi all,

There is any way to disable “delete/Truncate/Drop” command on Cassandra?

If yes then how we can implement this?

Thanks & Regards,
Abhishek Kumar Maheshwari
+91- 805591 (Mobile)
Times Internet Ltd. | A Times of India Group Company
FC - 6, Sector 16A, Film City,  Noida,  U.P. 201301 | INDIA
P Please do not print this email unless it is absolutely necessary. Spread 
environmental awareness.

The “Times Cartoonist Hunt” is now your chance to be the next legendary 
cartoonist. Send us 2 original cartoons, one on current affairs and the second 
on any subject of your choice. All entries must be uploaded on 
www.toicartoonisthunt.com by 5th April 2017. Alternatively, you can email your 
entries at toicarto...@gmail.com with your Name, Age, City and Mobile number. 
Gear up, the Hunt has begun!