Re: Multi-DC Deployment
If you want to use local quorum for a distributed setup, it doesn't make sense to have less than RF=3 local and remote. Three copies at both ends will give you high availability. Only one copy of the data is sent over the wide area link (with recent versions). There is no need to use mirrored or RAID5 disk in each node in this case, since you are using RAIN (N for nodes) to protect your data. So the extra disk space to hold three copies at each end shouldn't be a big deal. Netflix is using striped internal disks on EC2 nodes for this. Adrian On Mon, Apr 18, 2011 at 11:16 PM, Terje Marthinussen wrote: > Hum... > Seems like it could be an idea in a case like this with a mode where result > is always returned (if possible), but where a flay saying if the consistency > level was met, or to what level it was met (number of nodes answering for > instance).? > Terje > > On Tue, Apr 19, 2011 at 1:13 AM, Jonathan Ellis wrote: >> >> They will timeout until failure detector realizes the DC1 nodes are >> down (~10 seconds). After that they will immediately return >> UnavailableException until DC1 comes back up. >> >> On Mon, Apr 18, 2011 at 10:43 AM, Baskar Duraikannu >> wrote: >> > We are planning to deploy Cassandra on two data centers. Let us say >> > that >> > we went with three replicas with 2 being in one data center and last >> > replica >> > in 2nd Data center. >> > >> > What will happen to Quorum Reads and Writes when DC1 goes down (2 of 3 >> > replicas are unreachable)? Will they timeout? >> > >> > >> > Regards, >> > Baskar >> >> >> >> -- >> Jonathan Ellis >> Project Chair, Apache Cassandra >> co-founder of DataStax, the source for professional Cassandra support >> http://www.datastax.com > >
Re: How to warm up a cold node
Shouldn't the dynamic snitch take into account response times and ask a slow node for less requests? It seems that at node startup, only a handfull of requests arrive to the node and it keeps up well, but there's moment where there's more than it can handle with a cold cache and starts droping messages like crazy. Could it be the transition from slow node to ok node is to steep? El vie, 15-04-2011 a las 16:19 +0200, Peter Schuller escribió: > > Hi everyone, is there any recommended procedure to warm up a node before > > bringing it up? > > Currently the only out-of-the-box support for warming up caches is > that implied by the key cache and row cache, which will pre-heat on > start-up. Indexes will be indirectly preheated by index sampling, to > the extent that they operating system retains them in page cache. > > If you're wanting to pre-heat sstables there's currently no way to do > that (but it's a useful feature to have). Pragmatically, you can > script something that e.g. does "cat path/to/keyspace/* > /dev/null" > or similar. But that only works if the total database size fits > reasonably well in page cache. > > Pre-heating sstables on a per-cf basis on start-up would be a nice > feature to have. >
CQL transport (was: CQL DELETE statement)
On Tue, 19 Apr 2011 00:21:44 +0100 Courtney Robinson wrote: CR> Cool... Okay, the plan is to eventually not use thrift underneath, CR> for the CQL stuff right? Once this is done and the new transport is CR> in place, or evening while designing the new transport, is this not CR> something that's worth looking into again? I think it'd be a nice CR> feature. I'm assuming your question was tangential and not in the sense that "fixing the transport will fix the reported issue." There's https://issues.apache.org/jira/browse/CASSANDRA-2478 for a custom non-Thrift protocol. Most of the Cassandra developers feel HTTP+JSON or XML is inadequate for this purpose; while this may be true for some cases, it's also true that for many of the end users HTTP+JSON or XML is easier to support and use from a client. So I hope eventually HTTP as the transport and JSON or XML as the serialization format are at least an option. Ted
AW: AW: Two versions of schema
Yeah it happens from time to time even if everything seems to be fine that schema changes don't work correctly. But it's always repairable with the described procedure. Therefore the operator being available is a must have I think. Drain is a nodetool command. The node flushes data and stops accepting new writes. This just speeds up bringing the node back up again in this case. Probably a flush is equally acceptable. -Ursprüngliche Nachricht- Von: mcasandra [mailto:mohitanch...@gmail.com] Gesendet: Montag, 18. April 2011 18:27 An: cassandra-u...@incubator.apache.org Betreff: Re: AW: Two versions of schema In my case all hosts were reachable and I ran nodetool ring before running the schema update. I don't think it was because of node being down. I tihnk for some reason it just took over 10 secs because I was reducing key_cache from 1M to 1000. I think it might be taking long to trim the keys hence 10 sec default may not be the right way. What is drain? -- View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Two-versions-of-schema-tp6277365p6284276.html Sent from the cassandra-u...@incubator.apache.org mailing list archive at Nabble.com.
Tombstones and memtable_operations
Hi everyone. I've configured in one of my column families memtable_operations = 0.02 and started deleting keys. I have already deleted 54k, but there hasn't been any flush of the memtable. Memory keeps pilling up and eventually nodes start to do stop-the-world GCs. Is this the way this is supposed to work or have I done something wrong? Thanks!
Re: Tombstones and memtable_operations
Ok, I've read about gc grace seconds, but i'm not sure I understand it fully. Untill gc grace seconds have passed, and there is a compaction, the tombstones live in memory? I have to delete 100 million rows and my insert rate is very low, so I don't have a lot of compactions. What should I do in this case? Lower the major compaction threshold and memtable_operations to some very low number? Thanks El mar, 19-04-2011 a las 17:36 +0200, Héctor Izquierdo Seliva escribió: > Hi everyone. I've configured in one of my column families > memtable_operations = 0.02 and started deleting keys. I have already > deleted 54k, but there hasn't been any flush of the memtable. Memory > keeps pilling up and eventually nodes start to do stop-the-world GCs. Is > this the way this is supposed to work or have I done something wrong? > > Thanks! >
Re: AW: AW: Two versions of schema
What would be the procedure in this case? Run drain on the node that is disagreeing? But is it enough to run just drain or you suggest drain + rm system files? -- View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Two-versions-of-schema-tp6277365p6287863.html Sent from the cassandra-u...@incubator.apache.org mailing list archive at Nabble.com.
Re: Problems with subcolumn retrieval after upgrade from 0.6 to 0.7
Ok, set up a unit test for the supercolumns which seem to have problems, I posted a few examples below. As I mentioned, the retrieved bytes for the name and value appear to have additional data; in previous tests the buffer's position, mark, and limit have been verified, and when I call column.getName(), just the bytes for the name itself are properly retrieved(if not I should be getting validation errors for the custom uuid types, correct?). Abe Sanderson get_slice for key: 80324d09-302b-4093-9708-e509091e5d8f supercolumn: 0faced00057372002a6c696e676f74656b2e646f6373746f72652e43617373616e647261446f63756d656e74245461726765749d0b9f071f4cb0410200024900076d5f70686173654c00066d5f6c616e677400124c6a6176612f6c616e672f537472696e673b787174000564655f4445 subcolumn: [ cf="TranslationsByTarget" name="78cfd525-a520-458e-8584-259415b88405"] colParent:ColumnParent(column_family:TranslationsByTarget, super_column:0F AC ED 00 05 73 72 00 2A 6C 69 6E 67 6F 74 65 6B 2E 64 6F 63 73 74 6F 72 65 2E 43 61 73 73 61 6E 64 72 61 44 6F 63 75 6D 65 6E 74 24 54 61 72 67 65 74 9D 0B 9F 07 1F 4C B0 41 02 00 02 49 00 07 6D 5F 70 68 61 73 65 4C 00 06 6D 5F 6C 61 6E 67 74 00 12 4C 6A 61 76 61 2F 6C 61 6E 67 2F 53 74 72 69 6E 67 3B 78 70 00 00 00 01 74 00 05 64 65 5F 44 45) predicate:SlicePredicate(column_names:[java.nio.HeapByteBuffer[pos=0 lim=17 cap=17]]) col: ColumnOrSuperColumn(column:Column(name:80 01 00 02 00 00 00 09 67 65 74 5F 73 6C 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 04 0C 00 01 0B 00 01 00 00 00 11 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF 6F 60 63, value:80 01 00 02 00 00 00 09 67 65 74 5F 73 6C 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 04 0C 00 01 0B 00 01 00 00 00 11 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF 6F 60 63 0B 00 02 00 00 00 11 10 FC 0A 0D 43 B1 E0 44 F9 96 AA FC EE 41 EC 40 7E, timestamp:1301327609539)) col: ColumnOrSuperColumn(column:Column(name:80 01 00 02 00 00 00 09 67 65 74 5F 73 6C 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 04 0C 00 01 0B 00 01 00 00 00 11 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF 6F 60 63 0B 00 02 00 00 00 11 10 FC 0A 0D 43 B1 E0 44 F9 96 AA FC EE 41 EC 40 7E 0A 00 03 00 00 01 2E FD 2B 7E C3 00 00 0C 00 01 0B 00 01 00 00 00 11 10 78 CF D5 25 A5 20 45 8E 85 84 25 94 15 B8 84 05, value:80 01 00 02 00 00 00 09 67 65 74 5F 73 6C 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 04 0C 00 01 0B 00 01 00 00 00 11 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF 6F 60 63 0B 00 02 00 00 00 11 10 FC 0A 0D 43 B1 E0 44 F9 96 AA FC EE 41 EC 40 7E 0A 00 03 00 00 01 2E FD 2B 7E C3 00 00 0C 00 01 0B 00 01 00 00 00 11 10 78 CF D5 25 A5 20 45 8E 85 84 25 94 15 B8 84 05 0B 00 02 00 00 00 11 10..., timestamp:1301327602293)) col: ColumnOrSuperColumn(column:Column(name:80 01 00 02 00 00 00 09 67 65 74 5F 73 6C 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 04 0C 00 01 0B 00 01 00 00 00 11 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF 6F 60 63 0B 00 02 00 00 00 11 10 FC 0A 0D 43 B1 E0 44 F9 96 AA FC EE 41 EC 40 7E 0A 00 03 00 00 01 2E FD 2B 7E C3 00 00 0C 00 01 0B 00 01 00 00 00 11 10 78 CF D5 25 A5 20 45 8E 85 84 25 94 15 B8 84 05 0B 00 02 00 00 00 11 10..., value:80 01 00 02 00 00 00 09 67 65 74 5F 73 6C 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 04 0C 00 01 0B 00 01 00 00 00 11 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF 6F 60 63 0B 00 02 00 00 00 11 10 FC 0A 0D 43 B1 E0 44 F9 96 AA FC EE 41 EC 40 7E 0A 00 03 00 00 01 2E FD 2B 7E C3 00 00 0C 00 01 0B 00 01 00 00 00 11 10 78 CF D5 25 A5 20 45 8E 85 84 25 94 15 B8 84 05 0B 00 02 00 00 00 11 10..., timestamp:1301327589704)) col: ColumnOrSuperColumn(column:Column(name:80 01 00 02 00 00 00 09 67 65 74 5F 73 6C 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 04 0C 00 01 0B 00 01 00 00 00 11 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF 6F 60 63 0B 00 02 00 00 00 11 10 FC 0A 0D 43 B1 E0 44 F9 96 AA FC EE 41 EC 40 7E 0A 00 03 00 00 01 2E FD 2B 7E C3 00 00 0C 00 01 0B 00 01 00 00 00 11 10 78 CF D5 25 A5 20 45 8E 85 84 25 94 15 B8 84 05 0B 00 02 00 00 00 11 10..., value:80 01 00 02 00 00 00 09 67 65 74 5F 73 6C 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 04 0C 00 01 0B 00 01 00 00 00 11 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF 6F 60 63 0B 00 02 00 00 00 11 10 FC 0A 0D 43 B1 E0 44 F9 96 AA FC EE 41 EC 40 7E 0A 00 03 00 00 01 2E FD 2B 7E C3 00 00 0C 00 01 0B 00 01 00 00 00 11 10 78 CF D5 25 A5 20 45 8E 85 84 25 94 15 B8 84 05 0B 00 02 00 00 00 11 10..., timestamp:1301327594118)) get_slice for key: d1c7f6b9-1425-4fab-b074-5574c54cae08 supercolumn: 0faced00057372002a6c696e676f74656b2e646f6373746f72652e43617373616e647261446f63756d656e74245461726765749d0b9f071f4cb0410200024900076d5f70686173654c00066d5f6c616e677400124c6a6176612f6c616e672f537472696e673b787174000564655f4445 subcolumn: [ cf="TranslationsByTarget" name="b2f33b97-69f4-45ec-ad87-dd14ee60d719"] colParent:ColumnParent(column_family:TranslationsByTarget, super_column:0F AC ED 00 05 73 72 00 2A 6C 69 6E 67 6F 74 65 6B 2E 64 6F 63 73 74 6F 72 65 2E 43 61 73 73 61 6E 64 72 61 44 6F 63 75 6D 65 6E 74 24 54 61 72 67 65 74 9D 0B 9F 07 1F
Re: How to warm up a cold node
The dynamic snitch only reduces the chance that a node used in a read operation, it depends on the RF, the CL for the operation, the partitioner and possibly the network topology. Dropping read messages is ok, so long as your operation completes at the requested CL. Are you using either a key_cache or a row_cache ? If so have you enabled the background save for those as part of the column definition? If this is about getting the OS caches warmed up you should see the pending count on the READ stage backup up and the io stats start to show longer queues. In that case Peters suggestion below is prob the best option. Another hacky way to warm things would be to use get_count() on rows the app thiks it may need to use. This will cause all the columns to be read from disk, but not sent over the network. Aaron On 20 Apr 2011, at 00:41, Héctor Izquierdo Seliva wrote: > Shouldn't the dynamic snitch take into account response times and ask a > slow node for less requests? It seems that at node startup, only a > handfull of requests arrive to the node and it keeps up well, but > there's moment where there's more than it can handle with a cold cache > and starts droping messages like crazy. > > Could it be the transition from slow node to ok node is to steep? > > > El vie, 15-04-2011 a las 16:19 +0200, Peter Schuller escribió: >>> Hi everyone, is there any recommended procedure to warm up a node before >>> bringing it up? >> >> Currently the only out-of-the-box support for warming up caches is >> that implied by the key cache and row cache, which will pre-heat on >> start-up. Indexes will be indirectly preheated by index sampling, to >> the extent that they operating system retains them in page cache. >> >> If you're wanting to pre-heat sstables there's currently no way to do >> that (but it's a useful feature to have). Pragmatically, you can >> script something that e.g. does "cat path/to/keyspace/* > /dev/null" >> or similar. But that only works if the total database size fits >> reasonably well in page cache. >> >> Pre-heating sstables on a per-cf basis on start-up would be a nice >> feature to have. >> > >
Re: Tombstones and memtable_operations
I think their may be an issue here, we are counting the number of columns in the operation. When deleting an entire row we do not have a column count. Can you let us know what version you are using and how you are doing the delete ? Thanks Aaron On 20 Apr 2011, at 04:21, Héctor Izquierdo Seliva wrote: > Ok, I've read about gc grace seconds, but i'm not sure I understand it > fully. Untill gc grace seconds have passed, and there is a compaction, > the tombstones live in memory? I have to delete 100 million rows and my > insert rate is very low, so I don't have a lot of compactions. What > should I do in this case? Lower the major compaction threshold and > memtable_operations to some very low number? > > Thanks > > El mar, 19-04-2011 a las 17:36 +0200, Héctor Izquierdo Seliva escribió: >> Hi everyone. I've configured in one of my column families >> memtable_operations = 0.02 and started deleting keys. I have already >> deleted 54k, but there hasn't been any flush of the memtable. Memory >> keeps pilling up and eventually nodes start to do stop-the-world GCs. Is >> this the way this is supposed to work or have I done something wrong? >> >> Thanks! >> > >
Re: How to warm up a cold node
El mié, 20-04-2011 a las 07:59 +1200, aaron morton escribió: > The dynamic snitch only reduces the chance that a node used in a read > operation, it depends on the RF, the CL for the operation, the partitioner > and possibly the network topology. Dropping read messages is ok, so long as > your operation completes at the requested CL. > > Are you using either a key_cache or a row_cache ? If so have you enabled the > background save for those as part of the column definition? > > If this is about getting the OS caches warmed up you should see the pending > count on the READ stage backup up and the io stats start to show longer > queues. In that case Peters suggestion below is prob the best option. > > Another hacky way to warm things would be to use get_count() on rows the app > thiks it may need to use. This will cause all the columns to be read from > disk, but not sent over the network. > > Aaron The rows that need to be readed change over time and they are only read for short amounts of time, so it's a bit tricky. I'll try to figure out a way to use your suggestions. In another thread I asked if it would be feasible to somehow store what parts of the sstables are hot on shutdown and re read those parts of the files on startup. Could it be done in a similar way to the work that's being done on page migrations? What do you think? Thanks for your time! > > On 20 Apr 2011, at 00:41, Héctor Izquierdo Seliva wrote: > > > Shouldn't the dynamic snitch take into account response times and ask a > > slow node for less requests? It seems that at node startup, only a > > handfull of requests arrive to the node and it keeps up well, but > > there's moment where there's more than it can handle with a cold cache > > and starts droping messages like crazy. > > > > Could it be the transition from slow node to ok node is to steep? > > > > > > El vie, 15-04-2011 a las 16:19 +0200, Peter Schuller escribió: > >>> Hi everyone, is there any recommended procedure to warm up a node before > >>> bringing it up? > >> > >> Currently the only out-of-the-box support for warming up caches is > >> that implied by the key cache and row cache, which will pre-heat on > >> start-up. Indexes will be indirectly preheated by index sampling, to > >> the extent that they operating system retains them in page cache. > >> > >> If you're wanting to pre-heat sstables there's currently no way to do > >> that (but it's a useful feature to have). Pragmatically, you can > >> script something that e.g. does "cat path/to/keyspace/* > /dev/null" > >> or similar. But that only works if the total database size fits > >> reasonably well in page cache. > >> > >> Pre-heating sstables on a per-cf basis on start-up would be a nice > >> feature to have. > >> > > > > >
Re: Tombstones and memtable_operations
El mié, 20-04-2011 a las 08:16 +1200, aaron morton escribió: > I think their may be an issue here, we are counting the number of columns in > the operation. When deleting an entire row we do not have a column count. > > Can you let us know what version you are using and how you are doing the > delete ? > > Thanks > Aaron > I'm using 0.7.4. I have a file with all the row keys I have to delete (around 100 million) and I just go through the file and issue deletes through pelops. Should I manually issue flushes with a cron every x time? > On 20 Apr 2011, at 04:21, Héctor Izquierdo Seliva wrote: > > > Ok, I've read about gc grace seconds, but i'm not sure I understand it > > fully. Untill gc grace seconds have passed, and there is a compaction, > > the tombstones live in memory? I have to delete 100 million rows and my > > insert rate is very low, so I don't have a lot of compactions. What > > should I do in this case? Lower the major compaction threshold and > > memtable_operations to some very low number? > > > > Thanks > > > > El mar, 19-04-2011 a las 17:36 +0200, Héctor Izquierdo Seliva escribió: > >> Hi everyone. I've configured in one of my column families > >> memtable_operations = 0.02 and started deleting keys. I have already > >> deleted 54k, but there hasn't been any flush of the memtable. Memory > >> keeps pilling up and eventually nodes start to do stop-the-world GCs. Is > >> this the way this is supposed to work or have I done something wrong? > >> > >> Thanks! > >> > > > > >
Re: Tombstones and memtable_operations
You can use memtable_flush_after_mins instead of the cron Shimi 2011/4/19 Héctor Izquierdo Seliva > > El mié, 20-04-2011 a las 08:16 +1200, aaron morton escribió: > > I think their may be an issue here, we are counting the number of columns > in the operation. When deleting an entire row we do not have a column count. > > > > Can you let us know what version you are using and how you are doing the > delete ? > > > > Thanks > > Aaron > > > > I'm using 0.7.4. I have a file with all the row keys I have to delete > (around 100 million) and I just go through the file and issue deletes > through pelops. > > Should I manually issue flushes with a cron every x time? > > > On 20 Apr 2011, at 04:21, Héctor Izquierdo Seliva wrote: > > > > > Ok, I've read about gc grace seconds, but i'm not sure I understand it > > > fully. Untill gc grace seconds have passed, and there is a compaction, > > > the tombstones live in memory? I have to delete 100 million rows and my > > > insert rate is very low, so I don't have a lot of compactions. What > > > should I do in this case? Lower the major compaction threshold and > > > memtable_operations to some very low number? > > > > > > Thanks > > > > > > El mar, 19-04-2011 a las 17:36 +0200, Héctor Izquierdo Seliva escribió: > > >> Hi everyone. I've configured in one of my column families > > >> memtable_operations = 0.02 and started deleting keys. I have already > > >> deleted 54k, but there hasn't been any flush of the memtable. Memory > > >> keeps pilling up and eventually nodes start to do stop-the-world GCs. > Is > > >> this the way this is supposed to work or have I done something wrong? > > >> > > >> Thanks! > > >> > > > > > > > > > > >
Re: Tombstones and memtable_operations
El mar, 19-04-2011 a las 23:33 +0300, shimi escribió: > You can use memtable_flush_after_mins instead of the cron > > > Shimi > Good point! I'll try that. Wouldn't it be better to count a delete as a one column operation so it contributes to flush by operations? > 2011/4/19 Héctor Izquierdo Seliva > > El mié, 20-04-2011 a las 08:16 +1200, aaron morton escribió: > > I think their may be an issue here, we are counting the > number of columns in the operation. When deleting an entire > row we do not have a column count. > > > > Can you let us know what version you are using and how you > are doing the delete ? > > > > Thanks > > Aaron > > > > > I'm using 0.7.4. I have a file with all the row keys I have to > delete > (around 100 million) and I just go through the file and issue > deletes > through pelops. > > Should I manually issue flushes with a cron every x time? > > > > On 20 Apr 2011, at 04:21, Héctor Izquierdo Seliva wrote: > > > > > Ok, I've read about gc grace seconds, but i'm not sure I > understand it > > > fully. Untill gc grace seconds have passed, and there is a > compaction, > > > the tombstones live in memory? I have to delete 100 > million rows and my > > > insert rate is very low, so I don't have a lot of > compactions. What > > > should I do in this case? Lower the major compaction > threshold and > > > memtable_operations to some very low number? > > > > > > Thanks > > > > > > El mar, 19-04-2011 a las 17:36 +0200, Héctor Izquierdo > Seliva escribió: > > >> Hi everyone. I've configured in one of my column families > > >> memtable_operations = 0.02 and started deleting keys. I > have already > > >> deleted 54k, but there hasn't been any flush of the > memtable. Memory > > >> keeps pilling up and eventually nodes start to do > stop-the-world GCs. Is > > >> this the way this is supposed to work or have I done > something wrong? > > >> > > >> Thanks! > > >> > > > > > > > > > > > > >
Re: Problems with subcolumn retrieval after upgrade from 0.6 to 0.7
Can you provide a little more info on what I'm seeing here. When name is shown for the column, are you showing me the entire byte buffer for the name or just up to limit ? Aaron On 20 Apr 2011, at 05:49, Abraham Sanderson wrote: > Ok, set up a unit test for the supercolumns which seem to have problems, I > posted a few examples below. As I mentioned, the retrieved bytes for the > name and value appear to have additional data; in previous tests the buffer's > position, mark, and limit have been verified, and when I call > column.getName(), just the bytes for the name itself are properly > retrieved(if not I should be getting validation errors for the custom uuid > types, correct?). > > Abe Sanderson > > get_slice for key: 80324d09-302b-4093-9708-e509091e5d8f supercolumn: > 0faced00057372002a6c696e676f74656b2e646f6373746f72652e43617373616e647261446f63756d656e74245461726765749d0b9f071f4cb0410200024900076d5f70686173654c00066d5f6c616e677400124c6a6176612f6c616e672f537472696e673b787174000564655f4445 > subcolumn: [ cf="TranslationsByTarget" > name="78cfd525-a520-458e-8584-259415b88405"] > colParent:ColumnParent(column_family:TranslationsByTarget, super_column:0F AC > ED 00 05 73 72 00 2A 6C 69 6E 67 6F 74 65 6B 2E 64 6F 63 73 74 6F 72 65 2E 43 > 61 73 73 61 6E 64 72 61 44 6F 63 75 6D 65 6E 74 24 54 61 72 67 65 74 9D 0B 9F > 07 1F 4C B0 41 02 00 02 49 00 07 6D 5F 70 68 61 73 65 4C 00 06 6D 5F 6C 61 6E > 67 74 00 12 4C 6A 61 76 61 2F 6C 61 6E 67 2F 53 74 72 69 6E 67 3B 78 70 00 00 > 00 01 74 00 05 64 65 5F 44 45) > predicate:SlicePredicate(column_names:[java.nio.HeapByteBuffer[pos=0 lim=17 > cap=17]]) > col: ColumnOrSuperColumn(column:Column(name:80 01 00 02 00 00 00 09 67 65 74 > 5F 73 6C 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 04 0C 00 01 0B 00 01 00 00 > 00 11 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF 6F 60 63, value:80 01 00 02 > 00 00 00 09 67 65 74 5F 73 6C 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 04 0C > 00 01 0B 00 01 00 00 00 11 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF 6F 60 63 > 0B 00 02 00 00 00 11 10 FC 0A 0D 43 B1 E0 44 F9 96 AA FC EE 41 EC 40 7E, > timestamp:1301327609539)) > col: ColumnOrSuperColumn(column:Column(name:80 01 00 02 00 00 00 09 67 65 74 > 5F 73 6C 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 04 0C 00 01 0B 00 01 00 00 > 00 11 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF 6F 60 63 0B 00 02 00 00 00 11 > 10 FC 0A 0D 43 B1 E0 44 F9 96 AA FC EE 41 EC 40 7E 0A 00 03 00 00 01 2E FD 2B > 7E C3 00 00 0C 00 01 0B 00 01 00 00 00 11 10 78 CF D5 25 A5 20 45 8E 85 84 25 > 94 15 B8 84 05, value:80 01 00 02 00 00 00 09 67 65 74 5F 73 6C 69 63 65 00 > 00 00 02 0F 00 00 0C 00 00 00 04 0C 00 01 0B 00 01 00 00 00 11 10 49 5D 01 32 > 73 0D 48 03 85 09 CA F1 AF 6F 60 63 0B 00 02 00 00 00 11 10 FC 0A 0D 43 B1 E0 > 44 F9 96 AA FC EE 41 EC 40 7E 0A 00 03 00 00 01 2E FD 2B 7E C3 00 00 0C 00 01 > 0B 00 01 00 00 00 11 10 78 CF D5 25 A5 20 45 8E 85 84 25 94 15 B8 84 05 0B 00 > 02 00 00 00 11 10..., timestamp:1301327602293)) > col: ColumnOrSuperColumn(column:Column(name:80 01 00 02 00 00 00 09 67 65 74 > 5F 73 6C 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 04 0C 00 01 0B 00 01 00 00 > 00 11 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF 6F 60 63 0B 00 02 00 00 00 11 > 10 FC 0A 0D 43 B1 E0 44 F9 96 AA FC EE 41 EC 40 7E 0A 00 03 00 00 01 2E FD 2B > 7E C3 00 00 0C 00 01 0B 00 01 00 00 00 11 10 78 CF D5 25 A5 20 45 8E 85 84 25 > 94 15 B8 84 05 0B 00 02 00 00 00 11 10..., value:80 01 00 02 00 00 00 09 67 > 65 74 5F 73 6C 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 04 0C 00 01 0B 00 01 > 00 00 00 11 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF 6F 60 63 0B 00 02 00 00 > 00 11 10 FC 0A 0D 43 B1 E0 44 F9 96 AA FC EE 41 EC 40 7E 0A 00 03 00 00 01 2E > FD 2B 7E C3 00 00 0C 00 01 0B 00 01 00 00 00 11 10 78 CF D5 25 A5 20 45 8E 85 > 84 25 94 15 B8 84 05 0B 00 02 00 00 00 11 10..., timestamp:1301327589704)) > col: ColumnOrSuperColumn(column:Column(name:80 01 00 02 00 00 00 09 67 65 74 > 5F 73 6C 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 04 0C 00 01 0B 00 01 00 00 > 00 11 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF 6F 60 63 0B 00 02 00 00 00 11 > 10 FC 0A 0D 43 B1 E0 44 F9 96 AA FC EE 41 EC 40 7E 0A 00 03 00 00 01 2E FD 2B > 7E C3 00 00 0C 00 01 0B 00 01 00 00 00 11 10 78 CF D5 25 A5 20 45 8E 85 84 25 > 94 15 B8 84 05 0B 00 02 00 00 00 11 10..., value:80 01 00 02 00 00 00 09 67 > 65 74 5F 73 6C 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 04 0C 00 01 0B 00 01 > 00 00 00 11 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF 6F 60 63 0B 00 02 00 00 > 00 11 10 FC 0A 0D 43 B1 E0 44 F9 96 AA FC EE 41 EC 40 7E 0A 00 03 00 00 01 2E > FD 2B 7E C3 00 00 0C 00 01 0B 00 01 00 00 00 11 10 78 CF D5 25 A5 20 45 8E 85 > 84 25 94 15 B8 84 05 0B 00 02 00 00 00 11 10..., timestamp:1301327594118)) > > > get_slice for key: d1c7f6b9-1425-4fab-b074-5574c54cae08 supercolumn: > 0faced00057372002a6c696e676f74656b2e646f6373746f72652e43617373616e647261446f63756d656e74245461726765749d0b9f071f4cb0410200024900076d5f706
Re: Tombstones and memtable_operations
How do you do the deletes ? Aaron On 20 Apr 2011, at 08:39, Héctor Izquierdo Seliva wrote: > El mar, 19-04-2011 a las 23:33 +0300, shimi escribió: >> You can use memtable_flush_after_mins instead of the cron >> >> >> Shimi >> > > Good point! I'll try that. > > Wouldn't it be better to count a delete as a one column operation so it > contributes to flush by operations? > >> 2011/4/19 Héctor Izquierdo Seliva >> >>El mié, 20-04-2011 a las 08:16 +1200, aaron morton escribió: >>> I think their may be an issue here, we are counting the >>number of columns in the operation. When deleting an entire >>row we do not have a column count. >>> >>> Can you let us know what version you are using and how you >>are doing the delete ? >>> >>> Thanks >>> Aaron >>> >> >> >>I'm using 0.7.4. I have a file with all the row keys I have to >>delete >>(around 100 million) and I just go through the file and issue >>deletes >>through pelops. >> >>Should I manually issue flushes with a cron every x time? >> >> >>> On 20 Apr 2011, at 04:21, Héctor Izquierdo Seliva wrote: >>> Ok, I've read about gc grace seconds, but i'm not sure I >>understand it fully. Untill gc grace seconds have passed, and there is a >>compaction, the tombstones live in memory? I have to delete 100 >>million rows and my insert rate is very low, so I don't have a lot of >>compactions. What should I do in this case? Lower the major compaction >>threshold and memtable_operations to some very low number? Thanks El mar, 19-04-2011 a las 17:36 +0200, Héctor Izquierdo >>Seliva escribió: > Hi everyone. I've configured in one of my column families > memtable_operations = 0.02 and started deleting keys. I >>have already > deleted 54k, but there hasn't been any flush of the >>memtable. Memory > keeps pilling up and eventually nodes start to do >>stop-the-world GCs. Is > this the way this is supposed to work or have I done >>something wrong? > > Thanks! > >>> >> >> >> >> >> > >
Re: Tombstones and memtable_operations
I poste it a couple of messages back, but here it is again: I'm using 0.7.4. I have a file with all the row keys I have to delete (around 100 million) and I just go through the file and issue deletes through pelops. Should I manually issue flushes with a cron every x time?
Re: Problems with subcolumn retrieval after upgrade from 0.6 to 0.7
Can you show what comes back from calling Column.getName() Aaron On 20 Apr 2011, at 09:00, aaron morton wrote: > Can you provide a little more info on what I'm seeing here. When name is > shown for the column, are you showing me the entire byte buffer for the name > or just up to limit ? > > Aaron > > > On 20 Apr 2011, at 05:49, Abraham Sanderson wrote: > >> Ok, set up a unit test for the supercolumns which seem to have problems, I >> posted a few examples below. As I mentioned, the retrieved bytes for the >> name and value appear to have additional data; in previous tests the >> buffer's position, mark, and limit have been verified, and when I call >> column.getName(), just the bytes for the name itself are properly >> retrieved(if not I should be getting validation errors for the custom uuid >> types, correct?). >> >> Abe Sanderson >> >> get_slice for key: 80324d09-302b-4093-9708-e509091e5d8f supercolumn: >> 0faced00057372002a6c696e676f74656b2e646f6373746f72652e43617373616e647261446f63756d656e74245461726765749d0b9f071f4cb0410200024900076d5f70686173654c00066d5f6c616e677400124c6a6176612f6c616e672f537472696e673b787174000564655f4445 >> subcolumn: [ cf="TranslationsByTarget" >> name="78cfd525-a520-458e-8584-259415b88405"] >> colParent:ColumnParent(column_family:TranslationsByTarget, super_column:0F >> AC ED 00 05 73 72 00 2A 6C 69 6E 67 6F 74 65 6B 2E 64 6F 63 73 74 6F 72 65 >> 2E 43 61 73 73 61 6E 64 72 61 44 6F 63 75 6D 65 6E 74 24 54 61 72 67 65 74 >> 9D 0B 9F 07 1F 4C B0 41 02 00 02 49 00 07 6D 5F 70 68 61 73 65 4C 00 06 6D >> 5F 6C 61 6E 67 74 00 12 4C 6A 61 76 61 2F 6C 61 6E 67 2F 53 74 72 69 6E 67 >> 3B 78 70 00 00 00 01 74 00 05 64 65 5F 44 45) >> predicate:SlicePredicate(column_names:[java.nio.HeapByteBuffer[pos=0 lim=17 >> cap=17]]) >> col: ColumnOrSuperColumn(column:Column(name:80 01 00 02 00 00 00 09 67 65 74 >> 5F 73 6C 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 04 0C 00 01 0B 00 01 00 >> 00 00 11 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF 6F 60 63, value:80 01 00 >> 02 00 00 00 09 67 65 74 5F 73 6C 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 >> 04 0C 00 01 0B 00 01 00 00 00 11 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF >> 6F 60 63 0B 00 02 00 00 00 11 10 FC 0A 0D 43 B1 E0 44 F9 96 AA FC EE 41 EC >> 40 7E, timestamp:1301327609539)) >> col: ColumnOrSuperColumn(column:Column(name:80 01 00 02 00 00 00 09 67 65 74 >> 5F 73 6C 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 04 0C 00 01 0B 00 01 00 >> 00 00 11 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF 6F 60 63 0B 00 02 00 00 >> 00 11 10 FC 0A 0D 43 B1 E0 44 F9 96 AA FC EE 41 EC 40 7E 0A 00 03 00 00 01 >> 2E FD 2B 7E C3 00 00 0C 00 01 0B 00 01 00 00 00 11 10 78 CF D5 25 A5 20 45 >> 8E 85 84 25 94 15 B8 84 05, value:80 01 00 02 00 00 00 09 67 65 74 5F 73 6C >> 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 04 0C 00 01 0B 00 01 00 00 00 11 >> 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF 6F 60 63 0B 00 02 00 00 00 11 10 >> FC 0A 0D 43 B1 E0 44 F9 96 AA FC EE 41 EC 40 7E 0A 00 03 00 00 01 2E FD 2B >> 7E C3 00 00 0C 00 01 0B 00 01 00 00 00 11 10 78 CF D5 25 A5 20 45 8E 85 84 >> 25 94 15 B8 84 05 0B 00 02 00 00 00 11 10..., timestamp:1301327602293)) >> col: ColumnOrSuperColumn(column:Column(name:80 01 00 02 00 00 00 09 67 65 74 >> 5F 73 6C 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 04 0C 00 01 0B 00 01 00 >> 00 00 11 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF 6F 60 63 0B 00 02 00 00 >> 00 11 10 FC 0A 0D 43 B1 E0 44 F9 96 AA FC EE 41 EC 40 7E 0A 00 03 00 00 01 >> 2E FD 2B 7E C3 00 00 0C 00 01 0B 00 01 00 00 00 11 10 78 CF D5 25 A5 20 45 >> 8E 85 84 25 94 15 B8 84 05 0B 00 02 00 00 00 11 10..., value:80 01 00 02 00 >> 00 00 09 67 65 74 5F 73 6C 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 04 0C >> 00 01 0B 00 01 00 00 00 11 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF 6F 60 >> 63 0B 00 02 00 00 00 11 10 FC 0A 0D 43 B1 E0 44 F9 96 AA FC EE 41 EC 40 7E >> 0A 00 03 00 00 01 2E FD 2B 7E C3 00 00 0C 00 01 0B 00 01 00 00 00 11 10 78 >> CF D5 25 A5 20 45 8E 85 84 25 94 15 B8 84 05 0B 00 02 00 00 00 11 10..., >> timestamp:1301327589704)) >> col: ColumnOrSuperColumn(column:Column(name:80 01 00 02 00 00 00 09 67 65 74 >> 5F 73 6C 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 04 0C 00 01 0B 00 01 00 >> 00 00 11 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF 6F 60 63 0B 00 02 00 00 >> 00 11 10 FC 0A 0D 43 B1 E0 44 F9 96 AA FC EE 41 EC 40 7E 0A 00 03 00 00 01 >> 2E FD 2B 7E C3 00 00 0C 00 01 0B 00 01 00 00 00 11 10 78 CF D5 25 A5 20 45 >> 8E 85 84 25 94 15 B8 84 05 0B 00 02 00 00 00 11 10..., value:80 01 00 02 00 >> 00 00 09 67 65 74 5F 73 6C 69 63 65 00 00 00 02 0F 00 00 0C 00 00 00 04 0C >> 00 01 0B 00 01 00 00 00 11 10 49 5D 01 32 73 0D 48 03 85 09 CA F1 AF 6F 60 >> 63 0B 00 02 00 00 00 11 10 FC 0A 0D 43 B1 E0 44 F9 96 AA FC EE 41 EC 40 7E >> 0A 00 03 00 00 01 2E FD 2B 7E C3 00 00 0C 00 01 0B 00 01 00 00 00 11 10 78 >> CF D5 25 A5 20 45 8E 85 84 25 94 15 B8 84 05 0B 00 02 00 00 00 11 10..., >> timestamp:1301327594118)) >> >> >> get_
Re: Tombstones and memtable_operations
Yes, I saw that. Wanted to know what "issue deletes through pelops" means so I can work out what command it's sending to cassandra and hopefully I don't waste my time looking in the wrong place. Aaron On 20 Apr 2011, at 09:04, Héctor Izquierdo Seliva wrote: > I poste it a couple of messages back, but here it is again: > > I'm using 0.7.4. I have a file with all the row keys I have to delete > (around 100 million) and I just go through the file and issue deletes > through pelops. Should I manually issue flushes with a cron every x > time? >
Re: Tombstones and memtable_operations
El mié, 20-04-2011 a las 09:08 +1200, aaron morton escribió: > Yes, I saw that. > > Wanted to know what "issue deletes through pelops" means so I can work out > what command it's sending to cassandra and hopefully I don't waste my time > looking in the wrong place. > > Aaron > Oh, sorry. Didn't get what you were asking. I use this code: RowDeletor deletor = Pelops.createRowDeletor(keySpace); deletor.deleteRow(cf, rowId, ConsistencyLevel.QUORUM); which seems to be calling org.apache.cassandra.thrift.Cassandra.Client.remove. I hope this is useful
pig + hadoop
Hello, I did cluster configuration by http://wiki.apache.org/cassandra/HadoopSupport. When I run pig example-script.pig -x local, everything is fine and i get correct results. Problem is occurring with -x mapreduce Im getting those errors :> 2011-04-20 01:24:21,791 [main] ERROR org.apache.pig.tools.pigstats.PigStats - ERROR: java.lang.NumberFormatException: null 2011-04-20 01:24:21,792 [main] ERROR org.apache.pig.tools.pigstats.PigStatsUtil - 1 map reduce job(s) failed! 2011-04-20 01:24:21,793 [main] INFO org.apache.pig.tools.pigstats.PigStats - Script Statistics: Input(s): Failed to read data from "cassandra://Keyspace1/Standard1" Output(s): Failed to produce result in "hdfs://ip:54310/tmp/temp-1383865669/tmp-1895601791" Counters: Total records written : 0 Total bytes written : 0 Spillable Memory Manager spill count : 0 Total bags proactively spilled: 0 Total records proactively spilled: 0 Job DAG: job_201104200056_0005 -> null, null-> null, null 2011-04-20 01:24:21,793 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - Failed! 2011-04-20 01:24:21,803 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1066: Unable to open iterator for alias topnames. Backend error : java.lang.NumberFormatException: null thats from jobtasks web management - error from task directly: java.lang.RuntimeException: java.lang.NumberFormatException: null at org.apache.cassandra.hadoop.ColumnFamilyRecordReader.initialize(ColumnFamilyRecordReader.java:123) at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigRecordReader.initialize(PigRecordReader.java:176) at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.initialize(MapTask.java:418) at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:620) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305) at org.apache.hadoop.mapred.Child.main(Child.java:170) Caused by: java.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:417) at java.lang.Integer.parseInt(Integer.java:499) at org.apache.cassandra.hadoop.ConfigHelper.getRpcPort(ConfigHelper.java:233) at org.apache.cassandra.hadoop.ColumnFamilyRecordReader.initialize(ColumnFamilyRecordReader.java:105) ... 5 more Any suggestions where should be problem? Thanks,
Re: pycassa + celery
Hello, yeah, the bug was in my code because i use CL.ONE (so sometimes i got incomplete data) Thanks. 2011/4/14 aaron morton > This is going to be a bug in your code, so it's a bit tricky to know but... > > How / when is the email added to the DB? > What does the rawEmail function do ? > Set a break point, what are the two strings you are feeding into the hash > functions ? > > Aaron > On 15 Apr 2011, at 03:50, pob wrote: > > Hello, > > I'm experiencing really strange problem. I wrote data into cassandra > cluster. I'm trying to check if data inserted then fetched are equally to > source data (file). Code below is the task for celery that does > the comparison with sha1(). The problem is that celery worker returning > since time to time during the comparison output like that: > > 2011-04-14 17:24:33,225: INFO/PoolWorker-134] > tasks.insertData[f377efdb-33a2-48f4-ab00-52b1898e216c]: [Error/EmailTest] > Email corrupted.] > > If i execute the task code manually the output is correct ,[Email data > test: OK]. > > I thought that possible bug is in multi threading but i start celery > workers with only one thread to remove that case. > > > Another problem that is occurring often is : > > [2011-04-14 12:46:49,682: INFO/PoolWorker-1] Connection 1781 (IP:9160) > in ConnectionPool (id = 15612176) failed: timed out > [2011-04-14 12:46:49,844: INFO/PoolWorker-1] Connection 1781 (IP:9160) > in ConnectionPool (id = 15612176) failed: UnavailableException() > > > I'm using pycassa connection pooling with parameters pool_size=15 (5* > number of nodes), max_retries=30, max_overflow=5, timeout=4 > > > Any ideas where should be problems? The client is pycassa 1.0.8, and I > tried it with 1.0.6 too. > > > Thanks > > > Best, > Peter > > ### > > @task(ignore_result=True) > def checkData(key): > > > logger = insertData.get_logger() > logger.info("Reading email %s" % key) > logger.info("Task id %s" % checkData.request.id) > > f = open(key, 'r') > sEmail = f.readlines() > f.close() > > m = hashlib.sha1() > m.update(''.join(sEmail)) > sHash = m.hexdigest() > > #fetch email from DB > email = rawEmail(key) > > > m = hashlib.sha1() > m.update(email) > dHash = m.hexdigest() > > if sHash != dHash: > logger.info("[Error/EmailTest] Email corrupted.] < %s >" % key) > else: > logger.info("[Email data test: OK]") > > >
Cassandra 0.7.4 and LOCAL_QUORUM Consistency level
Earlier I've posted the same message to a hector-users list. Guys, I'm a bit puzzled today. I'm using just released Hector 0.7.0-29 (thank you, Nate!) and Cassandra 0.7.4 and getting the exception below, marked as (1) Exception. When I dig to Cassandra source code below, marked as (2) Cassandra source, I see that there's no check for LOCAL_QUORUM. I also see that (3) cassandra.thrift defines LOCAL_QUORUM as enum value 3 and in debugger, I see that LOCAL_QUORUM is a valid enum value. My question is, how is it possible to use LOCAL_QUORUM if Cassandra code throws exception when it sees it? Is it a bad merge or something? I know it worked before, from looking at https://issues.apache.org/jira/browse/CASSANDRA-2254 :-\ (1) Exception: 2011-04-19 14:57:33,550 [pool-2-thread-49] ERROR org.apache.cassandra.thrift.Cassandra$Processor - Internal error processing batch_mutate java.lang.UnsupportedOperationException: invalid consistency level: LOCAL_QUORUM at org.apache.cassandra.service.WriteResponseHandler.determineBlockFor(WriteResponseHandler.java:99) at org.apache.cassandra.service.WriteResponseHandler.(WriteResponseHandler.java:48) at org.apache.cassandra.service.WriteResponseHandler.create(WriteResponseHandler.java:61) at org.apache.cassandra.locator.AbstractReplicationStrategy.getWriteResponseHandler(AbstractReplicationStrategy.java:127) at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:115) at org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:415) at org.apache.cassandra.thrift.CassandraServer.batch_mutate(CassandraServer.java:388) at org.apache.cassandra.thrift.Cassandra$Processor$batch_mutate.process(Cassandra.java:3036) at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2555) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:206) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) (2) Cassandra source (line 99 is throw statement) protected int determineBlockFor(String table) { int blockFor = 0; switch (consistencyLevel) { case ONE: blockFor = 1; break; case ANY: blockFor = 1; break; case TWO: blockFor = 2; break; case THREE: blockFor = 3; break; case QUORUM: blockFor = (writeEndpoints.size() / 2) + 1; break; case ALL: blockFor = writeEndpoints.size(); break; default: throw new UnsupportedOperationException("invalid consistency level: " + consistencyLevel.toString()); } // at most one node per range can bootstrap at a time, and these will be added to the write until // bootstrap finishes (at which point we no longer need to write to the old ones). assert 1 <= blockFor && blockFor <= 2 * Table.open(table).getReplicationStrategy().getReplicationFactor() : String.format("invalid response count %d for replication factor %d", blockFor, Table.open(table).getReplicationStrategy().getReplicationFactor()); return blockFor; } (3) cassandra.thrift: enum ConsistencyLevel { ONE = 1, QUORUM = 2, LOCAL_QUORUM = 3, EACH_QUORUM = 4, ALL = 5, ANY = 6, TWO = 7, THREE = 8, }
Re: Cassandra 0.7.4 and LOCAL_QUORUM Consistency level
I had a similar error today when I tried using LOCAL_QUORUM without having a properly configured NetworkTopologyStrategy. QUORUM worked fine however. will On Tue, Apr 19, 2011 at 8:52 PM, Oleg Tsvinev wrote: > Earlier I've posted the same message to a hector-users list. > > Guys, > > I'm a bit puzzled today. I'm using just released Hector 0.7.0-29 > (thank you, Nate!) and Cassandra 0.7.4 and getting the exception > below, marked as (1) Exception. When I dig to Cassandra source code > below, marked as (2) Cassandra source, I see that there's no check for > LOCAL_QUORUM. I also see that (3) cassandra.thrift defines > LOCAL_QUORUM as enum value 3 and in debugger, I see that LOCAL_QUORUM > is a valid enum value. > > My question is, how is it possible to use LOCAL_QUORUM if Cassandra > code throws exception when it sees it? Is it a bad merge or something? > I know it worked before, from looking at > https://issues.apache.org/jira/browse/CASSANDRA-2254 > > :-\ > > (1) Exception: > > 2011-04-19 14:57:33,550 [pool-2-thread-49] ERROR > org.apache.cassandra.thrift.Cassandra$Processor - Internal error > processing batch_mutate > java.lang.UnsupportedOperationException: invalid consistency level: > LOCAL_QUORUM > at > org.apache.cassandra.service.WriteResponseHandler.determineBlockFor(WriteResponseHandler.java:99) > at > org.apache.cassandra.service.WriteResponseHandler.(WriteResponseHandler.java:48) > at > org.apache.cassandra.service.WriteResponseHandler.create(WriteResponseHandler.java:61) > at > org.apache.cassandra.locator.AbstractReplicationStrategy.getWriteResponseHandler(AbstractReplicationStrategy.java:127) > at > org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:115) > at > org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:415) > at > org.apache.cassandra.thrift.CassandraServer.batch_mutate(CassandraServer.java:388) > at > org.apache.cassandra.thrift.Cassandra$Processor$batch_mutate.process(Cassandra.java:3036) > at > org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2555) > at > org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:206) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:662) > > (2) Cassandra source (line 99 is throw statement) > > protected int determineBlockFor(String table) > { > int blockFor = 0; > switch (consistencyLevel) > { > case ONE: > blockFor = 1; > break; > case ANY: > blockFor = 1; > break; > case TWO: > blockFor = 2; > break; > case THREE: > blockFor = 3; > break; > case QUORUM: > blockFor = (writeEndpoints.size() / 2) + 1; > break; > case ALL: > blockFor = writeEndpoints.size(); > break; > default: > throw new UnsupportedOperationException("invalid > consistency level: " + consistencyLevel.toString()); > } > // at most one node per range can bootstrap at a time, and > these will be added to the write until > // bootstrap finishes (at which point we no longer need to > write to the old ones). > assert 1 <= blockFor && blockFor <= 2 * > Table.open(table).getReplicationStrategy().getReplicationFactor() > : String.format("invalid response count %d for replication > factor %d", > blockFor, > Table.open(table).getReplicationStrategy().getReplicationFactor()); > return blockFor; > } > > (3) cassandra.thrift: > > enum ConsistencyLevel { > ONE = 1, > QUORUM = 2, > LOCAL_QUORUM = 3, > EACH_QUORUM = 4, > ALL = 5, > ANY = 6, > TWO = 7, > THREE = 8, > } > -- Will Oberman Civic Science, Inc. 3030 Penn Avenue., First Floor Pittsburgh, PA 15201 (M) 412-480-7835 (E) ober...@civicscience.com
Re: Cassandra 0.7.4 and LOCAL_QUORUM Consistency level
I'm puzzled because code does not even check for LOCAL_QUORUM before throwing exception. Indeed I did not configure NetworkTopologyStrategy. Are you saying that it works after configuring it? On Tue, Apr 19, 2011 at 6:04 PM, William Oberman wrote: > I had a similar error today when I tried using LOCAL_QUORUM without having a > properly configured NetworkTopologyStrategy. QUORUM worked fine however. > will > > On Tue, Apr 19, 2011 at 8:52 PM, Oleg Tsvinev > wrote: >> >> Earlier I've posted the same message to a hector-users list. >> >> Guys, >> >> I'm a bit puzzled today. I'm using just released Hector 0.7.0-29 >> (thank you, Nate!) and Cassandra 0.7.4 and getting the exception >> below, marked as (1) Exception. When I dig to Cassandra source code >> below, marked as (2) Cassandra source, I see that there's no check for >> LOCAL_QUORUM. I also see that (3) cassandra.thrift defines >> LOCAL_QUORUM as enum value 3 and in debugger, I see that LOCAL_QUORUM >> is a valid enum value. >> >> My question is, how is it possible to use LOCAL_QUORUM if Cassandra >> code throws exception when it sees it? Is it a bad merge or something? >> I know it worked before, from looking at >> https://issues.apache.org/jira/browse/CASSANDRA-2254 >> >> :-\ >> >> (1) Exception: >> >> 2011-04-19 14:57:33,550 [pool-2-thread-49] ERROR >> org.apache.cassandra.thrift.Cassandra$Processor - Internal error >> processing batch_mutate >> java.lang.UnsupportedOperationException: invalid consistency level: >> LOCAL_QUORUM >> at >> org.apache.cassandra.service.WriteResponseHandler.determineBlockFor(WriteResponseHandler.java:99) >> at >> org.apache.cassandra.service.WriteResponseHandler.(WriteResponseHandler.java:48) >> at >> org.apache.cassandra.service.WriteResponseHandler.create(WriteResponseHandler.java:61) >> at >> org.apache.cassandra.locator.AbstractReplicationStrategy.getWriteResponseHandler(AbstractReplicationStrategy.java:127) >> at >> org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:115) >> at >> org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:415) >> at >> org.apache.cassandra.thrift.CassandraServer.batch_mutate(CassandraServer.java:388) >> at >> org.apache.cassandra.thrift.Cassandra$Processor$batch_mutate.process(Cassandra.java:3036) >> at >> org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2555) >> at >> org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:206) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) >> at java.lang.Thread.run(Thread.java:662) >> >> (2) Cassandra source (line 99 is throw statement) >> >> protected int determineBlockFor(String table) >> { >> int blockFor = 0; >> switch (consistencyLevel) >> { >> case ONE: >> blockFor = 1; >> break; >> case ANY: >> blockFor = 1; >> break; >> case TWO: >> blockFor = 2; >> break; >> case THREE: >> blockFor = 3; >> break; >> case QUORUM: >> blockFor = (writeEndpoints.size() / 2) + 1; >> break; >> case ALL: >> blockFor = writeEndpoints.size(); >> break; >> default: >> throw new UnsupportedOperationException("invalid >> consistency level: " + consistencyLevel.toString()); >> } >> // at most one node per range can bootstrap at a time, and >> these will be added to the write until >> // bootstrap finishes (at which point we no longer need to >> write to the old ones). >> assert 1 <= blockFor && blockFor <= 2 * >> Table.open(table).getReplicationStrategy().getReplicationFactor() >> : String.format("invalid response count %d for replication >> factor %d", >> blockFor, >> Table.open(table).getReplicationStrategy().getReplicationFactor()); >> return blockFor; >> } >> >> (3) cassandra.thrift: >> >> enum ConsistencyLevel { >> ONE = 1, >> QUORUM = 2, >> LOCAL_QUORUM = 3, >> EACH_QUORUM = 4, >> ALL = 5, >> ANY = 6, >> TWO = 7, >> THREE = 8, >> } > > > > -- > Will Oberman > Civic Science, Inc. > 3030 Penn Avenue., First Floor > Pittsburgh, PA 15201 > (M) 412-480-7835 > (E) ober...@civicscience.com >
Re: Tombstones and memtable_operations
Thats what I was looking for, thanks. At first glance the behaviour looks inconsistent, we count the number of columns in the delete mutation. But when deleting a row the column count is zero. I'll try to take a look later. In the mean time you can force a memtable via JConsole, navigate down to the CF and look for the forceFlush() operation. Aaron On 20 Apr 2011, at 09:39, Héctor Izquierdo Seliva wrote: > El mié, 20-04-2011 a las 09:08 +1200, aaron morton escribió: >> Yes, I saw that. >> >> Wanted to know what "issue deletes through pelops" means so I can work out >> what command it's sending to cassandra and hopefully I don't waste my time >> looking in the wrong place. >> >> Aaron >> > > Oh, sorry. Didn't get what you were asking. I use this code: > > RowDeletor deletor = Pelops.createRowDeletor(keySpace); > deletor.deleteRow(cf, rowId, ConsistencyLevel.QUORUM); > > which seems to be calling > org.apache.cassandra.thrift.Cassandra.Client.remove. > > I hope this is useful > >
Re: Cassandra 0.7.4 and LOCAL_QUORUM Consistency level
Good point, should have read your message (and the code) more closely! Sent from my iPhone On Apr 19, 2011, at 9:16 PM, Oleg Tsvinev wrote: > I'm puzzled because code does not even check for LOCAL_QUORUM before > throwing exception. > Indeed I did not configure NetworkTopologyStrategy. Are you saying > that it works after configuring it? > > On Tue, Apr 19, 2011 at 6:04 PM, William Oberman > wrote: >> I had a similar error today when I tried using LOCAL_QUORUM without having a >> properly configured NetworkTopologyStrategy. QUORUM worked fine however. >> will >> >> On Tue, Apr 19, 2011 at 8:52 PM, Oleg Tsvinev >> wrote: >>> >>> Earlier I've posted the same message to a hector-users list. >>> >>> Guys, >>> >>> I'm a bit puzzled today. I'm using just released Hector 0.7.0-29 >>> (thank you, Nate!) and Cassandra 0.7.4 and getting the exception >>> below, marked as (1) Exception. When I dig to Cassandra source code >>> below, marked as (2) Cassandra source, I see that there's no check for >>> LOCAL_QUORUM. I also see that (3) cassandra.thrift defines >>> LOCAL_QUORUM as enum value 3 and in debugger, I see that LOCAL_QUORUM >>> is a valid enum value. >>> >>> My question is, how is it possible to use LOCAL_QUORUM if Cassandra >>> code throws exception when it sees it? Is it a bad merge or something? >>> I know it worked before, from looking at >>> https://issues.apache.org/jira/browse/CASSANDRA-2254 >>> >>> :-\ >>> >>> (1) Exception: >>> >>> 2011-04-19 14:57:33,550 [pool-2-thread-49] ERROR >>> org.apache.cassandra.thrift.Cassandra$Processor - Internal error >>> processing batch_mutate >>> java.lang.UnsupportedOperationException: invalid consistency level: >>> LOCAL_QUORUM >>> at >>> org.apache.cassandra.service.WriteResponseHandler.determineBlockFor(WriteResponseHandler.java:99) >>> at >>> org.apache.cassandra.service.WriteResponseHandler.(WriteResponseHandler.java:48) >>> at >>> org.apache.cassandra.service.WriteResponseHandler.create(WriteResponseHandler.java:61) >>> at >>> org.apache.cassandra.locator.AbstractReplicationStrategy.getWriteResponseHandler(AbstractReplicationStrategy.java:127) >>> at >>> org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:115) >>> at >>> org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:415) >>> at >>> org.apache.cassandra.thrift.CassandraServer.batch_mutate(CassandraServer.java:388) >>> at >>> org.apache.cassandra.thrift.Cassandra$Processor$batch_mutate.process(Cassandra.java:3036) >>> at >>> org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2555) >>> at >>> org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:206) >>> at >>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) >>> at >>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) >>> at java.lang.Thread.run(Thread.java:662) >>> >>> (2) Cassandra source (line 99 is throw statement) >>> >>> protected int determineBlockFor(String table) >>> { >>> int blockFor = 0; >>> switch (consistencyLevel) >>> { >>> case ONE: >>> blockFor = 1; >>> break; >>> case ANY: >>> blockFor = 1; >>> break; >>> case TWO: >>> blockFor = 2; >>> break; >>> case THREE: >>> blockFor = 3; >>> break; >>> case QUORUM: >>> blockFor = (writeEndpoints.size() / 2) + 1; >>> break; >>> case ALL: >>> blockFor = writeEndpoints.size(); >>> break; >>> default: >>> throw new UnsupportedOperationException("invalid >>> consistency level: " + consistencyLevel.toString()); >>> } >>> // at most one node per range can bootstrap at a time, and >>> these will be added to the write until >>> // bootstrap finishes (at which point we no longer need to >>> write to the old ones). >>> assert 1 <= blockFor && blockFor <= 2 * >>> Table.open(table).getReplicationStrategy().getReplicationFactor() >>> : String.format("invalid response count %d for replication >>> factor %d", >>> blockFor, >>> Table.open(table).getReplicationStrategy().getReplicationFactor()); >>> return blockFor; >>> } >>> >>> (3) cassandra.thrift: >>> >>> enum ConsistencyLevel { >>> ONE = 1, >>> QUORUM = 2, >>> LOCAL_QUORUM = 3, >>> EACH_QUORUM = 4, >>> ALL = 5, >>> ANY = 6, >>> TWO = 7, >>> THREE = 8, >>> } >> >> >> >> -- >> Will Oberman >> Civic Science, Inc. >> 3030 Penn Avenue., First Floor >> Pittsburgh, PA 15201 >> (M) 412-480-7835 >> (E) ober...@civicscience.com >>
Re: pig + hadoop
Am guessing but here goes. Looks like the cassandra RPC port is not set, did you follow these steps in contrib/pig/README.txt Finally, set the following as environment variables (uppercase, underscored), or as Hadoop configuration variables (lowercase, dotted): * PIG_RPC_PORT or cassandra.thrift.port : the port thrift is listening on * PIG_INITIAL_ADDRESS or cassandra.thrift.address : initial address to connect to * PIG_PARTITIONER or cassandra.partitioner.class : cluster partitioner Hope that helps. Aaron On 20 Apr 2011, at 11:28, pob wrote: > Hello, > > I did cluster configuration by > http://wiki.apache.org/cassandra/HadoopSupport. When I run pig > example-script.pig > -x local, everything is fine and i get correct results. > > Problem is occurring with -x mapreduce > > Im getting those errors :> > > > 2011-04-20 01:24:21,791 [main] ERROR org.apache.pig.tools.pigstats.PigStats - > ERROR: java.lang.NumberFormatException: null > 2011-04-20 01:24:21,792 [main] ERROR > org.apache.pig.tools.pigstats.PigStatsUtil - 1 map reduce job(s) failed! > 2011-04-20 01:24:21,793 [main] INFO org.apache.pig.tools.pigstats.PigStats - > Script Statistics: > > Input(s): > Failed to read data from "cassandra://Keyspace1/Standard1" > > Output(s): > Failed to produce result in > "hdfs://ip:54310/tmp/temp-1383865669/tmp-1895601791" > > Counters: > Total records written : 0 > Total bytes written : 0 > Spillable Memory Manager spill count : 0 > Total bags proactively spilled: 0 > Total records proactively spilled: 0 > > Job DAG: > job_201104200056_0005 -> null, > null-> null, > null > > > 2011-04-20 01:24:21,793 [main] INFO > org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher > - Failed! > 2011-04-20 01:24:21,803 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR > 1066: Unable to open iterator for alias topnames. Backend error : > java.lang.NumberFormatException: null > > > > > thats from jobtasks web management - error from task directly: > > java.lang.RuntimeException: java.lang.NumberFormatException: null > at > org.apache.cassandra.hadoop.ColumnFamilyRecordReader.initialize(ColumnFamilyRecordReader.java:123) > at > org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigRecordReader.initialize(PigRecordReader.java:176) > at > org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.initialize(MapTask.java:418) > at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:620) > at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305) > at org.apache.hadoop.mapred.Child.main(Child.java:170) > Caused by: java.lang.NumberFormatException: null > at java.lang.Integer.parseInt(Integer.java:417) > at java.lang.Integer.parseInt(Integer.java:499) > at > org.apache.cassandra.hadoop.ConfigHelper.getRpcPort(ConfigHelper.java:233) > at > org.apache.cassandra.hadoop.ColumnFamilyRecordReader.initialize(ColumnFamilyRecordReader.java:105) > ... 5 more > > > > Any suggestions where should be problem? > > Thanks, >
Re: Cassandra 0.7.4 and LOCAL_QUORUM Consistency level
You need to be using NTS. When NetworkTopologySetting is used it overrides the AbstractReplicationStrategy.getWriteResponseHandler() function in your stack and returns a either a DataCentreWriteResponseHandler for LOCAL_QUORUM or DatacenterSyncWriteResponseHandler for EACH_QUORUM . They are DC aware. Aaron On 20 Apr 2011, at 13:25, William Oberman wrote: > Good point, should have read your message (and the code) more closely! > > Sent from my iPhone > > On Apr 19, 2011, at 9:16 PM, Oleg Tsvinev wrote: > >> I'm puzzled because code does not even check for LOCAL_QUORUM before >> throwing exception. >> Indeed I did not configure NetworkTopologyStrategy. Are you saying >> that it works after configuring it? >> >> On Tue, Apr 19, 2011 at 6:04 PM, William Oberman >> wrote: >>> I had a similar error today when I tried using LOCAL_QUORUM without having a >>> properly configured NetworkTopologyStrategy. QUORUM worked fine however. >>> will >>> >>> On Tue, Apr 19, 2011 at 8:52 PM, Oleg Tsvinev >>> wrote: Earlier I've posted the same message to a hector-users list. Guys, I'm a bit puzzled today. I'm using just released Hector 0.7.0-29 (thank you, Nate!) and Cassandra 0.7.4 and getting the exception below, marked as (1) Exception. When I dig to Cassandra source code below, marked as (2) Cassandra source, I see that there's no check for LOCAL_QUORUM. I also see that (3) cassandra.thrift defines LOCAL_QUORUM as enum value 3 and in debugger, I see that LOCAL_QUORUM is a valid enum value. My question is, how is it possible to use LOCAL_QUORUM if Cassandra code throws exception when it sees it? Is it a bad merge or something? I know it worked before, from looking at https://issues.apache.org/jira/browse/CASSANDRA-2254 :-\ (1) Exception: 2011-04-19 14:57:33,550 [pool-2-thread-49] ERROR org.apache.cassandra.thrift.Cassandra$Processor - Internal error processing batch_mutate java.lang.UnsupportedOperationException: invalid consistency level: LOCAL_QUORUM at org.apache.cassandra.service.WriteResponseHandler.determineBlockFor(WriteResponseHandler.java:99) at org.apache.cassandra.service.WriteResponseHandler.(WriteResponseHandler.java:48) at org.apache.cassandra.service.WriteResponseHandler.create(WriteResponseHandler.java:61) at org.apache.cassandra.locator.AbstractReplicationStrategy.getWriteResponseHandler(AbstractReplicationStrategy.java:127) at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:115) at org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:415) at org.apache.cassandra.thrift.CassandraServer.batch_mutate(CassandraServer.java:388) at org.apache.cassandra.thrift.Cassandra$Processor$batch_mutate.process(Cassandra.java:3036) at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2555) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:206) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) (2) Cassandra source (line 99 is throw statement) protected int determineBlockFor(String table) { int blockFor = 0; switch (consistencyLevel) { case ONE: blockFor = 1; break; case ANY: blockFor = 1; break; case TWO: blockFor = 2; break; case THREE: blockFor = 3; break; case QUORUM: blockFor = (writeEndpoints.size() / 2) + 1; break; case ALL: blockFor = writeEndpoints.size(); break; default: throw new UnsupportedOperationException("invalid consistency level: " + consistencyLevel.toString()); } // at most one node per range can bootstrap at a time, and these will be added to the write until // bootstrap finishes (at which point we no longer need to write to the old ones). assert 1 <= blockFor && blockFor <= 2 * Table.open(table).getReplicationStrategy().getReplicationFactor() : String.format("invalid response count %d for replication factor %d", blockFor, Table.open(table).getReplicationStrategy().getReplicationFactor()); return blockFor; } (3) cassandra.thrift: enum ConsistencyLevel {
Re: pig + hadoop
Hey Aaron, I read it, and all of 3 env variables was exported. The results are same. Best, P 2011/4/20 aaron morton > Am guessing but here goes. Looks like the cassandra RPC port is not set, > did you follow these steps in contrib/pig/README.txt > > Finally, set the following as environment variables (uppercase, > underscored), or as Hadoop configuration variables (lowercase, dotted): > * PIG_RPC_PORT or cassandra.thrift.port : the port thrift is listening on > * PIG_INITIAL_ADDRESS or cassandra.thrift.address : initial address to > connect to > * PIG_PARTITIONER or cassandra.partitioner.class : cluster partitioner > > Hope that helps. > Aaron > > > On 20 Apr 2011, at 11:28, pob wrote: > > Hello, > > I did cluster configuration by > http://wiki.apache.org/cassandra/HadoopSupport. When I run > pig example-script.pig > -x local, everything is fine and i get correct results. > > Problem is occurring with -x mapreduce > > Im getting those errors :> > > > 2011-04-20 01:24:21,791 [main] ERROR org.apache.pig.tools.pigstats.PigStats > - ERROR: java.lang.NumberFormatException: null > 2011-04-20 01:24:21,792 [main] ERROR > org.apache.pig.tools.pigstats.PigStatsUtil - 1 map reduce job(s) failed! > 2011-04-20 01:24:21,793 [main] INFO org.apache.pig.tools.pigstats.PigStats > - Script Statistics: > > Input(s): > Failed to read data from "cassandra://Keyspace1/Standard1" > > Output(s): > Failed to produce result in " > hdfs://ip:54310/tmp/temp-1383865669/tmp-1895601791" > > Counters: > Total records written : 0 > Total bytes written : 0 > Spillable Memory Manager spill count : 0 > Total bags proactively spilled: 0 > Total records proactively spilled: 0 > > Job DAG: > job_201104200056_0005 -> null, > null-> null, > null > > > 2011-04-20 01:24:21,793 [main] INFO > > org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher > - Failed! > 2011-04-20 01:24:21,803 [main] ERROR org.apache.pig.tools.grunt.Grunt - > ERROR 1066: Unable to open iterator for alias topnames. Backend error : > java.lang.NumberFormatException: null > > > > > thats from jobtasks web management - error from task directly: > > java.lang.RuntimeException: java.lang.NumberFormatException: null > at > org.apache.cassandra.hadoop.ColumnFamilyRecordReader.initialize(ColumnFamilyRecordReader.java:123) > at > org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigRecordReader.initialize(PigRecordReader.java:176) > at > org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.initialize(MapTask.java:418) > at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:620) > at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305) > at org.apache.hadoop.mapred.Child.main(Child.java:170) > Caused by: java.lang.NumberFormatException: null > at java.lang.Integer.parseInt(Integer.java:417) > at java.lang.Integer.parseInt(Integer.java:499) > at > org.apache.cassandra.hadoop.ConfigHelper.getRpcPort(ConfigHelper.java:233) > at > org.apache.cassandra.hadoop.ColumnFamilyRecordReader.initialize(ColumnFamilyRecordReader.java:105) > ... 5 more > > > > Any suggestions where should be problem? > > Thanks, > > >
Re: pig + hadoop
ad2. it works with -x local , so there cant be issue with pig->DB(Cassandra). im using pig-0.8 from official site + hadoop-0.20.2 from offic. site. thx 2011/4/20 aaron morton > Am guessing but here goes. Looks like the cassandra RPC port is not set, > did you follow these steps in contrib/pig/README.txt > > Finally, set the following as environment variables (uppercase, > underscored), or as Hadoop configuration variables (lowercase, dotted): > * PIG_RPC_PORT or cassandra.thrift.port : the port thrift is listening on > * PIG_INITIAL_ADDRESS or cassandra.thrift.address : initial address to > connect to > * PIG_PARTITIONER or cassandra.partitioner.class : cluster partitioner > > Hope that helps. > Aaron > > > On 20 Apr 2011, at 11:28, pob wrote: > > Hello, > > I did cluster configuration by > http://wiki.apache.org/cassandra/HadoopSupport. When I run > pig example-script.pig > -x local, everything is fine and i get correct results. > > Problem is occurring with -x mapreduce > > Im getting those errors :> > > > 2011-04-20 01:24:21,791 [main] ERROR org.apache.pig.tools.pigstats.PigStats > - ERROR: java.lang.NumberFormatException: null > 2011-04-20 01:24:21,792 [main] ERROR > org.apache.pig.tools.pigstats.PigStatsUtil - 1 map reduce job(s) failed! > 2011-04-20 01:24:21,793 [main] INFO org.apache.pig.tools.pigstats.PigStats > - Script Statistics: > > Input(s): > Failed to read data from "cassandra://Keyspace1/Standard1" > > Output(s): > Failed to produce result in " > hdfs://ip:54310/tmp/temp-1383865669/tmp-1895601791" > > Counters: > Total records written : 0 > Total bytes written : 0 > Spillable Memory Manager spill count : 0 > Total bags proactively spilled: 0 > Total records proactively spilled: 0 > > Job DAG: > job_201104200056_0005 -> null, > null-> null, > null > > > 2011-04-20 01:24:21,793 [main] INFO > > org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher > - Failed! > 2011-04-20 01:24:21,803 [main] ERROR org.apache.pig.tools.grunt.Grunt - > ERROR 1066: Unable to open iterator for alias topnames. Backend error : > java.lang.NumberFormatException: null > > > > > thats from jobtasks web management - error from task directly: > > java.lang.RuntimeException: java.lang.NumberFormatException: null > at > org.apache.cassandra.hadoop.ColumnFamilyRecordReader.initialize(ColumnFamilyRecordReader.java:123) > at > org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigRecordReader.initialize(PigRecordReader.java:176) > at > org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.initialize(MapTask.java:418) > at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:620) > at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305) > at org.apache.hadoop.mapred.Child.main(Child.java:170) > Caused by: java.lang.NumberFormatException: null > at java.lang.Integer.parseInt(Integer.java:417) > at java.lang.Integer.parseInt(Integer.java:499) > at > org.apache.cassandra.hadoop.ConfigHelper.getRpcPort(ConfigHelper.java:233) > at > org.apache.cassandra.hadoop.ColumnFamilyRecordReader.initialize(ColumnFamilyRecordReader.java:105) > ... 5 more > > > > Any suggestions where should be problem? > > Thanks, > > >
Re: Cassandra 0.7.4 and LOCAL_QUORUM Consistency level
Ah, OK. Thank you Aaron, I'll try that. On Tue, Apr 19, 2011 at 6:39 PM, aaron morton wrote: > You need to be using NTS. > > When NetworkTopologySetting is used it overrides the > AbstractReplicationStrategy.getWriteResponseHandler() function in your stack > and returns a either a DataCentreWriteResponseHandler for LOCAL_QUORUM or > DatacenterSyncWriteResponseHandler for EACH_QUORUM . They are DC aware. > > Aaron > > > On 20 Apr 2011, at 13:25, William Oberman wrote: > >> Good point, should have read your message (and the code) more closely! >> >> Sent from my iPhone >> >> On Apr 19, 2011, at 9:16 PM, Oleg Tsvinev wrote: >> >>> I'm puzzled because code does not even check for LOCAL_QUORUM before >>> throwing exception. >>> Indeed I did not configure NetworkTopologyStrategy. Are you saying >>> that it works after configuring it? >>> >>> On Tue, Apr 19, 2011 at 6:04 PM, William Oberman >>> wrote: I had a similar error today when I tried using LOCAL_QUORUM without having a properly configured NetworkTopologyStrategy. QUORUM worked fine however. will On Tue, Apr 19, 2011 at 8:52 PM, Oleg Tsvinev wrote: > > Earlier I've posted the same message to a hector-users list. > > Guys, > > I'm a bit puzzled today. I'm using just released Hector 0.7.0-29 > (thank you, Nate!) and Cassandra 0.7.4 and getting the exception > below, marked as (1) Exception. When I dig to Cassandra source code > below, marked as (2) Cassandra source, I see that there's no check for > LOCAL_QUORUM. I also see that (3) cassandra.thrift defines > LOCAL_QUORUM as enum value 3 and in debugger, I see that LOCAL_QUORUM > is a valid enum value. > > My question is, how is it possible to use LOCAL_QUORUM if Cassandra > code throws exception when it sees it? Is it a bad merge or something? > I know it worked before, from looking at > https://issues.apache.org/jira/browse/CASSANDRA-2254 > > :-\ > > (1) Exception: > > 2011-04-19 14:57:33,550 [pool-2-thread-49] ERROR > org.apache.cassandra.thrift.Cassandra$Processor - Internal error > processing batch_mutate > java.lang.UnsupportedOperationException: invalid consistency level: > LOCAL_QUORUM > at > org.apache.cassandra.service.WriteResponseHandler.determineBlockFor(WriteResponseHandler.java:99) > at > org.apache.cassandra.service.WriteResponseHandler.(WriteResponseHandler.java:48) > at > org.apache.cassandra.service.WriteResponseHandler.create(WriteResponseHandler.java:61) > at > org.apache.cassandra.locator.AbstractReplicationStrategy.getWriteResponseHandler(AbstractReplicationStrategy.java:127) > at > org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:115) > at > org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:415) > at > org.apache.cassandra.thrift.CassandraServer.batch_mutate(CassandraServer.java:388) > at > org.apache.cassandra.thrift.Cassandra$Processor$batch_mutate.process(Cassandra.java:3036) > at > org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2555) > at > org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:206) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:662) > > (2) Cassandra source (line 99 is throw statement) > > protected int determineBlockFor(String table) > { > int blockFor = 0; > switch (consistencyLevel) > { > case ONE: > blockFor = 1; > break; > case ANY: > blockFor = 1; > break; > case TWO: > blockFor = 2; > break; > case THREE: > blockFor = 3; > break; > case QUORUM: > blockFor = (writeEndpoints.size() / 2) + 1; > break; > case ALL: > blockFor = writeEndpoints.size(); > break; > default: > throw new UnsupportedOperationException("invalid > consistency level: " + consistencyLevel.toString()); > } > // at most one node per range can bootstrap at a time, and > these will be added to the write until > // bootstrap finishes (at which point we no longer need to > write to the old ones). > assert 1 <= blockFor && blockFor <= 2 * > Table.open(table).getReplicationStrategy().getReplicationFactor() > : String.format("invalid response count %d for replication > factor %d", >
Re: Multi-DC Deployment
If you have RF=3 in both datacenters, it could be discussed if there is a point to use the built in replication in Cassandra at all vs. feeding the data to both datacenters and get 2 100% isolated cassandra instances that cannot replicate sstable corruptions between each others My point is really a bit more general though. For a lot services (especially Internet based ones) 100% accuracy in terms of results is not needed (or maybe even expected) While you want to serve a 100% correct result if you can (using quorum), it is still much better to serve a partial result than no result at all. Lets say you have 300 nodes in your ring, one document manages to trigger a bug in cassandra that brings down a node with all its replicas (3 nodes down) For many use cases, it would be much better to return the remaining 99% of the data coming from the 297 working nodes than having a service which returns nothing at all. I would however like the frontend to realize that this is an incomplete result so it is possible for it to react accordingly as well as be part of monitoring of the cassandra ring. Regards, Terje On Tue, Apr 19, 2011 at 6:06 PM, Adrian Cockcroft < adrian.cockcr...@gmail.com> wrote: > If you want to use local quorum for a distributed setup, it doesn't > make sense to have less than RF=3 local and remote. Three copies at > both ends will give you high availability. Only one copy of the data > is sent over the wide area link (with recent versions). > > There is no need to use mirrored or RAID5 disk in each node in this > case, since you are using RAIN (N for nodes) to protect your data. So > the extra disk space to hold three copies at each end shouldn't be a > big deal. Netflix is using striped internal disks on EC2 nodes for > this. > > Adrian > > On Mon, Apr 18, 2011 at 11:16 PM, Terje Marthinussen > wrote: > > Hum... > > Seems like it could be an idea in a case like this with a mode where > result > > is always returned (if possible), but where a flay saying if the > consistency > > level was met, or to what level it was met (number of nodes answering for > > instance).? > > Terje > > > > On Tue, Apr 19, 2011 at 1:13 AM, Jonathan Ellis > wrote: > >> > >> They will timeout until failure detector realizes the DC1 nodes are > >> down (~10 seconds). After that they will immediately return > >> UnavailableException until DC1 comes back up. > >> > >> On Mon, Apr 18, 2011 at 10:43 AM, Baskar Duraikannu > >> wrote: > >> > We are planning to deploy Cassandra on two data centers. Let us say > >> > that > >> > we went with three replicas with 2 being in one data center and last > >> > replica > >> > in 2nd Data center. > >> > > >> > What will happen to Quorum Reads and Writes when DC1 goes down (2 of 3 > >> > replicas are unreachable)? Will they timeout? > >> > > >> > > >> > Regards, > >> > Baskar > >> > >> > >> > >> -- > >> Jonathan Ellis > >> Project Chair, Apache Cassandra > >> co-founder of DataStax, the source for professional Cassandra support > >> http://www.datastax.com > > > > >
Re: pig + hadoop
Thats from jobtracker: 2011-04-20 03:36:39,519 INFO org.apache.hadoop.mapred.JobInProgress: Choosing rack-local task task_201104200331_0002_m_00 2011-04-20 03:36:42,521 INFO org.apache.hadoop.mapred.TaskInProgress: Error from attempt_201104200331_0002_m_00_3: java.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:417) at java.lang.Integer.parseInt(Integer.java:499) at org.apache.cassandra.hadoop.ConfigHelper.getRpcPort(ConfigHelper.java:250) at org.apache.cassandra.hadoop.pig.CassandraStorage.setConnectionInformation(Unknown Source) at org.apache.cassandra.hadoop.pig.CassandraStorage.setLocation(Unknown Source) at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigInputFormat.mergeSplitSpecificConf(PigInputFormat.java:133) at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigInputFormat.createRecordReader(PigInputFormat.java:111) at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:588) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305) at org.apache.hadoop.mapred.Child.main(Child.java:170) and tasktracker 2011-04-20 03:33:10,942 INFO org.apache.hadoop.mapred.TaskTracker: Using MemoryCalculatorPlugin : org.apache.hadoop.util.LinuxMemoryCalculatorPlugin@3c1fc1a6 2011-04-20 03:33:10,945 WARN org.apache.hadoop.mapred.TaskTracker: TaskTracker's totalMemoryAllottedForTasks is -1. TaskMemoryManager is disabled. 2011-04-20 03:33:10,946 INFO org.apache.hadoop.mapred.IndexCache: IndexCache created with max memory = 10485760 2011-04-20 03:33:11,069 INFO org.apache.hadoop.mapred.TaskTracker: LaunchTaskAction (registerTask): attempt_201104200331_0001_m_00_1 task's state:UNASSIGNED 2011-04-20 03:33:11,072 INFO org.apache.hadoop.mapred.TaskTracker: Trying to launch : attempt_201104200331_0001_m_00_1 2011-04-20 03:33:11,072 INFO org.apache.hadoop.mapred.TaskTracker: In TaskLauncher, current free slots : 2 and trying to launch attempt_201104200331_0001_m_00_1 2011-04-20 03:33:11,986 INFO org.apache.hadoop.mapred.JvmManager: In JvmRunner constructed JVM ID: jvm_201104200331_0001_m_-926908110 2011-04-20 03:33:11,986 INFO org.apache.hadoop.mapred.JvmManager: JVM Runner jvm_201104200331_0001_m_-926908110 spawned. 2011-04-20 03:33:12,400 INFO org.apache.hadoop.mapred.TaskTracker: JVM with ID: jvm_201104200331_0001_m_-926908110 given task: attempt_201104200331_0001_m_00_1 2011-04-20 03:33:12,895 INFO org.apache.hadoop.mapred.TaskTracker: attempt_201104200331_0001_m_00_1 0.0% 2011-04-20 03:33:12,918 INFO org.apache.hadoop.mapred.JvmManager: JVM : jvm_201104200331_0001_m_-926908110 exited. Number of tasks it ran: 0 2011-04-20 03:33:15,919 INFO org.apache.hadoop.mapred.TaskRunner: attempt_201104200331_0001_m_00_1 done; removing files. 2011-04-20 03:33:15,920 INFO org.apache.hadoop.mapred.TaskTracker: addFreeSlot : current free slots : 2 2011-04-20 03:33:38,090 INFO org.apache.hadoop.mapred.TaskTracker: Received 'KillJobAction' for job: job_201104200331_0001 2011-04-20 03:36:32,199 INFO org.apache.hadoop.mapred.TaskTracker: LaunchTaskAction (registerTask): attempt_201104200331_0002_m_00_2 task's state:UNASSIGNED 2011-04-20 03:36:32,199 INFO org.apache.hadoop.mapred.TaskTracker: Trying to launch : attempt_201104200331_0002_m_00_2 2011-04-20 03:36:32,199 INFO org.apache.hadoop.mapred.TaskTracker: In TaskLauncher, current free slots : 2 and trying to launch attempt_201104200331_0002_m_00_2 2011-04-20 03:36:32,813 INFO org.apache.hadoop.mapred.JvmManager: In JvmRunner constructed JVM ID: jvm_201104200331_0002_m_-134007035 2011-04-20 03:36:32,814 INFO org.apache.hadoop.mapred.JvmManager: JVM Runner jvm_201104200331_0002_m_-134007035 spawned. 2011-04-20 03:36:33,214 INFO org.apache.hadoop.mapred.TaskTracker: JVM with ID: jvm_201104200331_0002_m_-134007035 given task: attempt_201104200331_0002_m_00_2 2011-04-20 03:36:33,711 INFO org.apache.hadoop.mapred.TaskTracker: attempt_201104200331_0002_m_00_2 0.0% 2011-04-20 03:36:33,731 INFO org.apache.hadoop.mapred.JvmManager: JVM : jvm_201104200331_0002_m_-134007035 exited. Number of tasks it ran: 0 2011-04-20 03:36:36,732 INFO org.apache.hadoop.mapred.TaskRunner: attempt_201104200331_0002_m_00_2 done; removing files. 2011-04-20 03:36:36,733 INFO org.apache.hadoop.mapred.TaskTracker: addFreeSlot : current free slots : 2 2011-04-20 03:36:50,210 INFO org.apache.hadoop.mapred.TaskTracker: Received 'KillJobAction' for job: job_201104200331_0002 2011/4/20 pob > ad2. it works with -x local , so there cant be issue with > pig->DB(Cassandra). > > im using pig-0.8 from official site + hadoop-0.20.2 from offic. site. > > > thx > > > 2011/4/20 aaron morton > >> Am guessing but here goes. Looks like the cassandra RPC port is not set, >> did you follow these steps in contrib/pig/README.txt >> >> Finally, set the following as environment variables (uppercase, >> underscored), or as Hadoop configu
Re: Cassandra 0.7.4 and LOCAL_QUORUM Consistency level
It doesn't make a lot of sense in general to allow those w/ non-NTS, but it should be possible (e.g. if you've manually interleaved nodes with ONTS so you know how many replicas are in each DC). Patch attached to https://issues.apache.org/jira/browse/CASSANDRA-2516 On Tue, Apr 19, 2011 at 8:39 PM, aaron morton wrote: > You need to be using NTS. > > When NetworkTopologySetting is used it overrides the > AbstractReplicationStrategy.getWriteResponseHandler() function in your stack > and returns a either a DataCentreWriteResponseHandler for LOCAL_QUORUM or > DatacenterSyncWriteResponseHandler for EACH_QUORUM . They are DC aware. > > Aaron > > > On 20 Apr 2011, at 13:25, William Oberman wrote: > >> Good point, should have read your message (and the code) more closely! >> >> Sent from my iPhone >> >> On Apr 19, 2011, at 9:16 PM, Oleg Tsvinev wrote: >> >>> I'm puzzled because code does not even check for LOCAL_QUORUM before >>> throwing exception. >>> Indeed I did not configure NetworkTopologyStrategy. Are you saying >>> that it works after configuring it? >>> >>> On Tue, Apr 19, 2011 at 6:04 PM, William Oberman >>> wrote: I had a similar error today when I tried using LOCAL_QUORUM without having a properly configured NetworkTopologyStrategy. QUORUM worked fine however. will On Tue, Apr 19, 2011 at 8:52 PM, Oleg Tsvinev wrote: > > Earlier I've posted the same message to a hector-users list. > > Guys, > > I'm a bit puzzled today. I'm using just released Hector 0.7.0-29 > (thank you, Nate!) and Cassandra 0.7.4 and getting the exception > below, marked as (1) Exception. When I dig to Cassandra source code > below, marked as (2) Cassandra source, I see that there's no check for > LOCAL_QUORUM. I also see that (3) cassandra.thrift defines > LOCAL_QUORUM as enum value 3 and in debugger, I see that LOCAL_QUORUM > is a valid enum value. > > My question is, how is it possible to use LOCAL_QUORUM if Cassandra > code throws exception when it sees it? Is it a bad merge or something? > I know it worked before, from looking at > https://issues.apache.org/jira/browse/CASSANDRA-2254 > > :-\ > > (1) Exception: > > 2011-04-19 14:57:33,550 [pool-2-thread-49] ERROR > org.apache.cassandra.thrift.Cassandra$Processor - Internal error > processing batch_mutate > java.lang.UnsupportedOperationException: invalid consistency level: > LOCAL_QUORUM > at > org.apache.cassandra.service.WriteResponseHandler.determineBlockFor(WriteResponseHandler.java:99) > at > org.apache.cassandra.service.WriteResponseHandler.(WriteResponseHandler.java:48) > at > org.apache.cassandra.service.WriteResponseHandler.create(WriteResponseHandler.java:61) > at > org.apache.cassandra.locator.AbstractReplicationStrategy.getWriteResponseHandler(AbstractReplicationStrategy.java:127) > at > org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:115) > at > org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:415) > at > org.apache.cassandra.thrift.CassandraServer.batch_mutate(CassandraServer.java:388) > at > org.apache.cassandra.thrift.Cassandra$Processor$batch_mutate.process(Cassandra.java:3036) > at > org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2555) > at > org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:206) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:662) > > (2) Cassandra source (line 99 is throw statement) > > protected int determineBlockFor(String table) > { > int blockFor = 0; > switch (consistencyLevel) > { > case ONE: > blockFor = 1; > break; > case ANY: > blockFor = 1; > break; > case TWO: > blockFor = 2; > break; > case THREE: > blockFor = 3; > break; > case QUORUM: > blockFor = (writeEndpoints.size() / 2) + 1; > break; > case ALL: > blockFor = writeEndpoints.size(); > break; > default: > throw new UnsupportedOperationException("invalid > consistency level: " + consistencyLevel.toString()); > } > // at most one node per range can bootstrap at a time, and > these will be added to the write until > // bootstrap finishes (at which point we no longer need to > write to the old one
Re: pig + hadoop
and one more thing... 2011-04-20 04:09:23,412 INFO org.apache.hadoop.mapred.TaskTracker: org.apache.hadoop.util.DiskChecker$DiskErrorException: Could not find taskTracker/jobcache/job_201104200406_0001/attempt_201104200406_0001_m_02_0/output/file.out in any of the configured local directories 2011/4/20 pob > Thats from jobtracker: > > > 2011-04-20 03:36:39,519 INFO org.apache.hadoop.mapred.JobInProgress: > Choosing rack-local task task_201104200331_0002_m_00 > 2011-04-20 03:36:42,521 INFO org.apache.hadoop.mapred.TaskInProgress: Error > from attempt_201104200331_0002_m_00_3: java.lang.NumberFormatException: > null > at java.lang.Integer.parseInt(Integer.java:417) > at java.lang.Integer.parseInt(Integer.java:499) > at > org.apache.cassandra.hadoop.ConfigHelper.getRpcPort(ConfigHelper.java:250) > at > org.apache.cassandra.hadoop.pig.CassandraStorage.setConnectionInformation(Unknown > Source) > at > org.apache.cassandra.hadoop.pig.CassandraStorage.setLocation(Unknown Source) > at > org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigInputFormat.mergeSplitSpecificConf(PigInputFormat.java:133) > at > org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigInputFormat.createRecordReader(PigInputFormat.java:111) > at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:588) > at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305) > at org.apache.hadoop.mapred.Child.main(Child.java:170) > > > and tasktracker > > 2011-04-20 03:33:10,942 INFO org.apache.hadoop.mapred.TaskTracker: Using > MemoryCalculatorPlugin : > org.apache.hadoop.util.LinuxMemoryCalculatorPlugin@3c1fc1a6 > 2011-04-20 03:33:10,945 WARN org.apache.hadoop.mapred.TaskTracker: > TaskTracker's totalMemoryAllottedForTasks is -1. TaskMemoryManager is > disabled. > 2011-04-20 03:33:10,946 INFO org.apache.hadoop.mapred.IndexCache: > IndexCache created with max memory = 10485760 > 2011-04-20 03:33:11,069 INFO org.apache.hadoop.mapred.TaskTracker: > LaunchTaskAction (registerTask): attempt_201104200331_0001_m_00_1 task's > state:UNASSIGNED > 2011-04-20 03:33:11,072 INFO org.apache.hadoop.mapred.TaskTracker: Trying > to launch : attempt_201104200331_0001_m_00_1 > 2011-04-20 03:33:11,072 INFO org.apache.hadoop.mapred.TaskTracker: In > TaskLauncher, current free slots : 2 and trying to launch > attempt_201104200331_0001_m_00_1 > 2011-04-20 03:33:11,986 INFO org.apache.hadoop.mapred.JvmManager: In > JvmRunner constructed JVM ID: jvm_201104200331_0001_m_-926908110 > 2011-04-20 03:33:11,986 INFO org.apache.hadoop.mapred.JvmManager: JVM > Runner jvm_201104200331_0001_m_-926908110 spawned. > 2011-04-20 03:33:12,400 INFO org.apache.hadoop.mapred.TaskTracker: JVM with > ID: jvm_201104200331_0001_m_-926908110 given task: > attempt_201104200331_0001_m_00_1 > 2011-04-20 03:33:12,895 INFO org.apache.hadoop.mapred.TaskTracker: > attempt_201104200331_0001_m_00_1 0.0% > 2011-04-20 03:33:12,918 INFO org.apache.hadoop.mapred.JvmManager: JVM : > jvm_201104200331_0001_m_-926908110 exited. Number of tasks it ran: 0 > 2011-04-20 03:33:15,919 INFO org.apache.hadoop.mapred.TaskRunner: > attempt_201104200331_0001_m_00_1 done; removing files. > 2011-04-20 03:33:15,920 INFO org.apache.hadoop.mapred.TaskTracker: > addFreeSlot : current free slots : 2 > 2011-04-20 03:33:38,090 INFO org.apache.hadoop.mapred.TaskTracker: Received > 'KillJobAction' for job: job_201104200331_0001 > 2011-04-20 03:36:32,199 INFO org.apache.hadoop.mapred.TaskTracker: > LaunchTaskAction (registerTask): attempt_201104200331_0002_m_00_2 task's > state:UNASSIGNED > 2011-04-20 03:36:32,199 INFO org.apache.hadoop.mapred.TaskTracker: Trying > to launch : attempt_201104200331_0002_m_00_2 > 2011-04-20 03:36:32,199 INFO org.apache.hadoop.mapred.TaskTracker: In > TaskLauncher, current free slots : 2 and trying to launch > attempt_201104200331_0002_m_00_2 > 2011-04-20 03:36:32,813 INFO org.apache.hadoop.mapred.JvmManager: In > JvmRunner constructed JVM ID: jvm_201104200331_0002_m_-134007035 > 2011-04-20 03:36:32,814 INFO org.apache.hadoop.mapred.JvmManager: JVM > Runner jvm_201104200331_0002_m_-134007035 spawned. > 2011-04-20 03:36:33,214 INFO org.apache.hadoop.mapred.TaskTracker: JVM with > ID: jvm_201104200331_0002_m_-134007035 given task: > attempt_201104200331_0002_m_00_2 > 2011-04-20 03:36:33,711 INFO org.apache.hadoop.mapred.TaskTracker: > attempt_201104200331_0002_m_00_2 0.0% > 2011-04-20 03:36:33,731 INFO org.apache.hadoop.mapred.JvmManager: JVM : > jvm_201104200331_0002_m_-134007035 exited. Number of tasks it ran: 0 > 2011-04-20 03:36:36,732 INFO org.apache.hadoop.mapred.TaskRunner: > attempt_201104200331_0002_m_00_2 done; removing files. > 2011-04-20 03:36:36,733 INFO org.apache.hadoop.mapred.TaskTracker: > addFreeSlot : current free slots : 2 > 2011-04-20 03:36:50,210 INFO org.apache.hadoop.mapred.TaskTracker: Received > 'KillJobAction' for
Re: Cassandra 0.7.4 and LOCAL_QUORUM Consistency level
Makes it clear! Thank you Jonathan. On Tue, Apr 19, 2011 at 7:02 PM, Jonathan Ellis wrote: > It doesn't make a lot of sense in general to allow those w/ non-NTS, > but it should be possible (e.g. if you've manually interleaved nodes > with ONTS so you know how many replicas are in each DC). > > Patch attached to https://issues.apache.org/jira/browse/CASSANDRA-2516 > > On Tue, Apr 19, 2011 at 8:39 PM, aaron morton wrote: >> You need to be using NTS. >> >> When NetworkTopologySetting is used it overrides the >> AbstractReplicationStrategy.getWriteResponseHandler() function in your stack >> and returns a either a DataCentreWriteResponseHandler for LOCAL_QUORUM or >> DatacenterSyncWriteResponseHandler for EACH_QUORUM . They are DC aware. >> >> Aaron >> >> >> On 20 Apr 2011, at 13:25, William Oberman wrote: >> >>> Good point, should have read your message (and the code) more closely! >>> >>> Sent from my iPhone >>> >>> On Apr 19, 2011, at 9:16 PM, Oleg Tsvinev wrote: >>> I'm puzzled because code does not even check for LOCAL_QUORUM before throwing exception. Indeed I did not configure NetworkTopologyStrategy. Are you saying that it works after configuring it? On Tue, Apr 19, 2011 at 6:04 PM, William Oberman wrote: > I had a similar error today when I tried using LOCAL_QUORUM without > having a > properly configured NetworkTopologyStrategy. QUORUM worked fine however. > will > > On Tue, Apr 19, 2011 at 8:52 PM, Oleg Tsvinev > wrote: >> >> Earlier I've posted the same message to a hector-users list. >> >> Guys, >> >> I'm a bit puzzled today. I'm using just released Hector 0.7.0-29 >> (thank you, Nate!) and Cassandra 0.7.4 and getting the exception >> below, marked as (1) Exception. When I dig to Cassandra source code >> below, marked as (2) Cassandra source, I see that there's no check for >> LOCAL_QUORUM. I also see that (3) cassandra.thrift defines >> LOCAL_QUORUM as enum value 3 and in debugger, I see that LOCAL_QUORUM >> is a valid enum value. >> >> My question is, how is it possible to use LOCAL_QUORUM if Cassandra >> code throws exception when it sees it? Is it a bad merge or something? >> I know it worked before, from looking at >> https://issues.apache.org/jira/browse/CASSANDRA-2254 >> >> :-\ >> >> (1) Exception: >> >> 2011-04-19 14:57:33,550 [pool-2-thread-49] ERROR >> org.apache.cassandra.thrift.Cassandra$Processor - Internal error >> processing batch_mutate >> java.lang.UnsupportedOperationException: invalid consistency level: >> LOCAL_QUORUM >> at >> org.apache.cassandra.service.WriteResponseHandler.determineBlockFor(WriteResponseHandler.java:99) >> at >> org.apache.cassandra.service.WriteResponseHandler.(WriteResponseHandler.java:48) >> at >> org.apache.cassandra.service.WriteResponseHandler.create(WriteResponseHandler.java:61) >> at >> org.apache.cassandra.locator.AbstractReplicationStrategy.getWriteResponseHandler(AbstractReplicationStrategy.java:127) >> at >> org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:115) >> at >> org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:415) >> at >> org.apache.cassandra.thrift.CassandraServer.batch_mutate(CassandraServer.java:388) >> at >> org.apache.cassandra.thrift.Cassandra$Processor$batch_mutate.process(Cassandra.java:3036) >> at >> org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2555) >> at >> org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:206) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) >> at java.lang.Thread.run(Thread.java:662) >> >> (2) Cassandra source (line 99 is throw statement) >> >> protected int determineBlockFor(String table) >> { >> int blockFor = 0; >> switch (consistencyLevel) >> { >> case ONE: >> blockFor = 1; >> break; >> case ANY: >> blockFor = 1; >> break; >> case TWO: >> blockFor = 2; >> break; >> case THREE: >> blockFor = 3; >> break; >> case QUORUM: >> blockFor = (writeEndpoints.size() / 2) + 1; >> break; >> case ALL: >> blockFor = writeEndpoints.size(); >> break; >> default: >> throw new UnsupportedOperationException("invalid >> consistency level: " + consistencyLevel.toString()); >>
RE: pig + hadoop
Did you set PIG_RPC_PORT in your hadoop-env.sh? I was seeing this error for a while before I added that. -Jeffrey From: pob [mailto:peterob...@gmail.com] Sent: Tuesday, April 19, 2011 6:42 PM To: user@cassandra.apache.org Subject: Re: pig + hadoop Hey Aaron, I read it, and all of 3 env variables was exported. The results are same. Best, P 2011/4/20 aaron morton mailto:aa...@thelastpickle.com>> Am guessing but here goes. Looks like the cassandra RPC port is not set, did you follow these steps in contrib/pig/README.txt Finally, set the following as environment variables (uppercase, underscored), or as Hadoop configuration variables (lowercase, dotted): * PIG_RPC_PORT or cassandra.thrift.port : the port thrift is listening on * PIG_INITIAL_ADDRESS or cassandra.thrift.address : initial address to connect to * PIG_PARTITIONER or cassandra.partitioner.class : cluster partitioner Hope that helps. Aaron On 20 Apr 2011, at 11:28, pob wrote: Hello, I did cluster configuration by http://wiki.apache.org/cassandra/HadoopSupport. When I run pig example-script.pig -x local, everything is fine and i get correct results. Problem is occurring with -x mapreduce Im getting those errors :> 2011-04-20 01:24:21,791 [main] ERROR org.apache.pig.tools.pigstats.PigStats - ERROR: java.lang.NumberFormatException: null 2011-04-20 01:24:21,792 [main] ERROR org.apache.pig.tools.pigstats.PigStatsUtil - 1 map reduce job(s) failed! 2011-04-20 01:24:21,793 [main] INFO org.apache.pig.tools.pigstats.PigStats - Script Statistics: Input(s): Failed to read data from "cassandra://Keyspace1/Standard1" Output(s): Failed to produce result in "hdfs://ip:54310/tmp/temp-1383865669/tmp-1895601791" Counters: Total records written : 0 Total bytes written : 0 Spillable Memory Manager spill count : 0 Total bags proactively spilled: 0 Total records proactively spilled: 0 Job DAG: job_201104200056_0005 -> null, null-> null, null 2011-04-20 01:24:21,793 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - Failed! 2011-04-20 01:24:21,803 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1066: Unable to open iterator for alias topnames. Backend error : java.lang.NumberFormatException: null thats from jobtasks web management - error from task directly: java.lang.RuntimeException: java.lang.NumberFormatException: null at org.apache.cassandra.hadoop.ColumnFamilyRecordReader.initialize(ColumnFamilyRecordReader.java:123) at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigRecordReader.initialize(PigRecordReader.java:176) at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.initialize(MapTask.java:418) at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:620) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305) at org.apache.hadoop.mapred.Child.main(Child.java:170) Caused by: java.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:417) at java.lang.Integer.parseInt(Integer.java:499) at org.apache.cassandra.hadoop.ConfigHelper.getRpcPort(ConfigHelper.java:233) at org.apache.cassandra.hadoop.ColumnFamilyRecordReader.initialize(ColumnFamilyRecordReader.java:105) ... 5 more Any suggestions where should be problem? Thanks,
Re: pig + hadoop
oh yeah - that's what's going on. what I do is on the machine that I run the pig script from, I set the PIG_CONF variable to my HADOOP_HOME/conf directory and in my mapred-site.xml file found there, I set the three variables. I don't use environment variables when I run against a cluster. On Apr 19, 2011, at 9:54 PM, Jeffrey Wang wrote: > Did you set PIG_RPC_PORT in your hadoop-env.sh? I was seeing this error for a > while before I added that. > > -Jeffrey > > From: pob [mailto:peterob...@gmail.com] > Sent: Tuesday, April 19, 2011 6:42 PM > To: user@cassandra.apache.org > Subject: Re: pig + hadoop > > Hey Aaron, > > I read it, and all of 3 env variables was exported. The results are same. > > Best, > P > > 2011/4/20 aaron morton > Am guessing but here goes. Looks like the cassandra RPC port is not set, did > you follow these steps in contrib/pig/README.txt > > Finally, set the following as environment variables (uppercase, > underscored), or as Hadoop configuration variables (lowercase, dotted): > * PIG_RPC_PORT or cassandra.thrift.port : the port thrift is listening on > * PIG_INITIAL_ADDRESS or cassandra.thrift.address : initial address to > connect to > * PIG_PARTITIONER or cassandra.partitioner.class : cluster partitioner > > Hope that helps. > Aaron > > > On 20 Apr 2011, at 11:28, pob wrote: > > > Hello, > > I did cluster configuration by > http://wiki.apache.org/cassandra/HadoopSupport. When I run pig > example-script.pig > -x local, everything is fine and i get correct results. > > Problem is occurring with -x mapreduce > > Im getting those errors :> > > > 2011-04-20 01:24:21,791 [main] ERROR org.apache.pig.tools.pigstats.PigStats - > ERROR: java.lang.NumberFormatException: null > 2011-04-20 01:24:21,792 [main] ERROR > org.apache.pig.tools.pigstats.PigStatsUtil - 1 map reduce job(s) failed! > 2011-04-20 01:24:21,793 [main] INFO org.apache.pig.tools.pigstats.PigStats - > Script Statistics: > > Input(s): > Failed to read data from "cassandra://Keyspace1/Standard1" > > Output(s): > Failed to produce result in > "hdfs://ip:54310/tmp/temp-1383865669/tmp-1895601791" > > Counters: > Total records written : 0 > Total bytes written : 0 > Spillable Memory Manager spill count : 0 > Total bags proactively spilled: 0 > Total records proactively spilled: 0 > > Job DAG: > job_201104200056_0005 -> null, > null-> null, > null > > > 2011-04-20 01:24:21,793 [main] INFO > org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher > - Failed! > 2011-04-20 01:24:21,803 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR > 1066: Unable to open iterator for alias topnames. Backend error : > java.lang.NumberFormatException: null > > > > > thats from jobtasks web management - error from task directly: > > java.lang.RuntimeException: java.lang.NumberFormatException: null > at > org.apache.cassandra.hadoop.ColumnFamilyRecordReader.initialize(ColumnFamilyRecordReader.java:123) > at > org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigRecordReader.initialize(PigRecordReader.java:176) > at > org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.initialize(MapTask.java:418) > at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:620) > at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305) > at org.apache.hadoop.mapred.Child.main(Child.java:170) > Caused by: java.lang.NumberFormatException: null > at java.lang.Integer.parseInt(Integer.java:417) > at java.lang.Integer.parseInt(Integer.java:499) > at org.apache.cassandra.hadoop.ConfigHelper.getRpcPort(ConfigHelper.java:233) > at > org.apache.cassandra.hadoop.ColumnFamilyRecordReader.initialize(ColumnFamilyRecordReader.java:105) > ... 5 more > > > > Any suggestions where should be problem? > > Thanks, > > >
Re: pig + hadoop
Just as an example: cassandra.thrift.address 10.12.34.56 cassandra.thrift.port 9160 cassandra.partitioner.class org.apache.cassandra.dht.RandomPartitioner On Apr 19, 2011, at 10:28 PM, Jeremy Hanna wrote: > oh yeah - that's what's going on. what I do is on the machine that I run the > pig script from, I set the PIG_CONF variable to my HADOOP_HOME/conf directory > and in my mapred-site.xml file found there, I set the three variables. > > I don't use environment variables when I run against a cluster. > > On Apr 19, 2011, at 9:54 PM, Jeffrey Wang wrote: > >> Did you set PIG_RPC_PORT in your hadoop-env.sh? I was seeing this error for >> a while before I added that. >> >> -Jeffrey >> >> From: pob [mailto:peterob...@gmail.com] >> Sent: Tuesday, April 19, 2011 6:42 PM >> To: user@cassandra.apache.org >> Subject: Re: pig + hadoop >> >> Hey Aaron, >> >> I read it, and all of 3 env variables was exported. The results are same. >> >> Best, >> P >> >> 2011/4/20 aaron morton >> Am guessing but here goes. Looks like the cassandra RPC port is not set, did >> you follow these steps in contrib/pig/README.txt >> >> Finally, set the following as environment variables (uppercase, >> underscored), or as Hadoop configuration variables (lowercase, dotted): >> * PIG_RPC_PORT or cassandra.thrift.port : the port thrift is listening on >> * PIG_INITIAL_ADDRESS or cassandra.thrift.address : initial address to >> connect to >> * PIG_PARTITIONER or cassandra.partitioner.class : cluster partitioner >> >> Hope that helps. >> Aaron >> >> >> On 20 Apr 2011, at 11:28, pob wrote: >> >> >> Hello, >> >> I did cluster configuration by >> http://wiki.apache.org/cassandra/HadoopSupport. When I run pig >> example-script.pig >> -x local, everything is fine and i get correct results. >> >> Problem is occurring with -x mapreduce >> >> Im getting those errors :> >> >> >> 2011-04-20 01:24:21,791 [main] ERROR org.apache.pig.tools.pigstats.PigStats >> - ERROR: java.lang.NumberFormatException: null >> 2011-04-20 01:24:21,792 [main] ERROR >> org.apache.pig.tools.pigstats.PigStatsUtil - 1 map reduce job(s) failed! >> 2011-04-20 01:24:21,793 [main] INFO org.apache.pig.tools.pigstats.PigStats >> - Script Statistics: >> >> Input(s): >> Failed to read data from "cassandra://Keyspace1/Standard1" >> >> Output(s): >> Failed to produce result in >> "hdfs://ip:54310/tmp/temp-1383865669/tmp-1895601791" >> >> Counters: >> Total records written : 0 >> Total bytes written : 0 >> Spillable Memory Manager spill count : 0 >> Total bags proactively spilled: 0 >> Total records proactively spilled: 0 >> >> Job DAG: >> job_201104200056_0005 -> null, >> null-> null, >> null >> >> >> 2011-04-20 01:24:21,793 [main] INFO >> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher >> - Failed! >> 2011-04-20 01:24:21,803 [main] ERROR org.apache.pig.tools.grunt.Grunt - >> ERROR 1066: Unable to open iterator for alias topnames. Backend error : >> java.lang.NumberFormatException: null >> >> >> >> >> thats from jobtasks web management - error from task directly: >> >> java.lang.RuntimeException: java.lang.NumberFormatException: null >> at >> org.apache.cassandra.hadoop.ColumnFamilyRecordReader.initialize(ColumnFamilyRecordReader.java:123) >> at >> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigRecordReader.initialize(PigRecordReader.java:176) >> at >> org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.initialize(MapTask.java:418) >> at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:620) >> at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305) >> at org.apache.hadoop.mapred.Child.main(Child.java:170) >> Caused by: java.lang.NumberFormatException: null >> at java.lang.Integer.parseInt(Integer.java:417) >> at java.lang.Integer.parseInt(Integer.java:499) >> at org.apache.cassandra.hadoop.ConfigHelper.getRpcPort(ConfigHelper.java:233) >> at >> org.apache.cassandra.hadoop.ColumnFamilyRecordReader.initialize(ColumnFamilyRecordReader.java:105) >> ... 5 more >> >> >> >> Any suggestions where should be problem? >> >> Thanks, >> >> >> >