[jira] [Commented] (CASSANDRA-5622) Update CqlRecordWriter to conform to RecordWriter API

2013-06-17 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13685591#comment-13685591
 ] 

Jonathan Ellis commented on CASSANDRA-5622:
---

How is that coming, Alex?  Would like to ship this in 1.2.6.

 Update CqlRecordWriter to conform to RecordWriter API
 -

 Key: CASSANDRA-5622
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5622
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.6
Reporter: Jonathan Ellis
Assignee: Alex Liu
 Fix For: 1.2.6

 Attachments: 5622-1-1.2-branch.txt, 5622-1-trunk.txt


 {{RecordWriterK, V}} is supposed to write values V that can be uniquely 
 identified by keys K.
 Currently CqlRW requires the user to give it all the bind variables for a 
 complete statement in V, and effectively ignores K.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5622) Update CqlRecordWriter to conform to RecordWriter API

2013-06-17 Thread Alex Liu (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13685647#comment-13685647
 ] 

Alex Liu commented on CASSANDRA-5622:
-

I was busy with other project, I will get it done today.

 Update CqlRecordWriter to conform to RecordWriter API
 -

 Key: CASSANDRA-5622
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5622
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.6
Reporter: Jonathan Ellis
Assignee: Alex Liu
 Fix For: 1.2.6

 Attachments: 5622-1-1.2-branch.txt, 5622-1-trunk.txt


 {{RecordWriterK, V}} is supposed to write values V that can be uniquely 
 identified by keys K.
 Currently CqlRW requires the user to give it all the bind variables for a 
 complete statement in V, and effectively ignores K.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5622) Update CqlRecordWriter to conform to RecordWriter API

2013-06-17 Thread Alex Liu (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13685781#comment-13685781
 ] 

Alex Liu commented on CASSANDRA-5622:
-

[~jbellis] I attach the version 2 patches which throws 
{code}
   IOException(INSERT statement is depreciated and not supported, please use 
UPDATE/DELETE statement.); 
{code}
if the INSERT type query is used for writter.

 Update CqlRecordWriter to conform to RecordWriter API
 -

 Key: CASSANDRA-5622
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5622
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.6
Reporter: Jonathan Ellis
Assignee: Alex Liu
 Fix For: 1.2.6

 Attachments: 5622-1-1.2-branch.txt, 5622-1-trunk.txt, 
 5622-2-1.2-branch.txt, 5622-2-trunk-branch.txt


 {{RecordWriterK, V}} is supposed to write values V that can be uniquely 
 identified by keys K.
 Currently CqlRW requires the user to give it all the bind variables for a 
 complete statement in V, and effectively ignores K.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5622) Update CqlRecordWriter to conform to RecordWriter API

2013-06-17 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13685957#comment-13685957
 ] 

Jonathan Ellis commented on CASSANDRA-5622:
---

Pushed a bunch of changes to https://github.com/jbellis/cassandra/commits/5622.

 Update CqlRecordWriter to conform to RecordWriter API
 -

 Key: CASSANDRA-5622
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5622
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.6
Reporter: Jonathan Ellis
Assignee: Alex Liu
 Fix For: 1.2.6

 Attachments: 5622-1-1.2-branch.txt, 5622-1-trunk.txt, 
 5622-2-1.2-branch.txt, 5622-2-trunk-branch.txt


 {{RecordWriterK, V}} is supposed to write values V that can be uniquely 
 identified by keys K.
 Currently CqlRW requires the user to give it all the bind variables for a 
 complete statement in V, and effectively ignores K.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5622) Update CqlRecordWriter to conform to RecordWriter API

2013-06-17 Thread Alex Liu (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13686020#comment-13686020
 ] 

Alex Liu commented on CASSANDRA-5622:
-

+1 for the changes, [~jbellis] I can create the final patch.

 Update CqlRecordWriter to conform to RecordWriter API
 -

 Key: CASSANDRA-5622
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5622
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.6
Reporter: Jonathan Ellis
Assignee: Alex Liu
 Fix For: 1.2.6

 Attachments: 5622-1-1.2-branch.txt, 5622-1-trunk.txt, 
 5622-2-1.2-branch.txt, 5622-2-trunk-branch.txt


 {{RecordWriterK, V}} is supposed to write values V that can be uniquely 
 identified by keys K.
 Currently CqlRW requires the user to give it all the bind variables for a 
 complete statement in V, and effectively ignores K.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5622) Update CqlRecordWriter to conform to RecordWriter API

2013-06-13 Thread Alex Liu (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13682765#comment-13682765
 ] 

Alex Liu commented on CASSANDRA-5622:
-

I will disable INSERT query, only allow UPDATE or DELETE statement.

 Update CqlRecordWriter to conform to RecordWriter API
 -

 Key: CASSANDRA-5622
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5622
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.6
Reporter: Jonathan Ellis
Assignee: Alex Liu
 Fix For: 1.2.6

 Attachments: 5622-1-1.2-branch.txt, 5622-1-trunk.txt


 {{RecordWriterK, V}} is supposed to write values V that can be uniquely 
 identified by keys K.
 Currently CqlRW requires the user to give it all the bind variables for a 
 complete statement in V, and effectively ignores K.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5622) Update CqlRecordWriter to conform to RecordWriter API

2013-06-12 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13681697#comment-13681697
 ] 

Jonathan Ellis commented on CASSANDRA-5622:
---

Is it worth supporting INSERT at all since it's semantically identical to 
UPDATE?  I think I'd rather just support UPDATE only and avoid the confusion of 
two different ways of working.

 Update CqlRecordWriter to conform to RecordWriter API
 -

 Key: CASSANDRA-5622
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5622
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.6
Reporter: Jonathan Ellis
Assignee: Alex Liu
 Fix For: 1.2.6

 Attachments: 5622-1-1.2-branch.txt, 5622-1-trunk.txt


 {{RecordWriterK, V}} is supposed to write values V that can be uniquely 
 identified by keys K.
 Currently CqlRW requires the user to give it all the bind variables for a 
 complete statement in V, and effectively ignores K.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5622) Update CqlRecordWriter to conform to RecordWriter API

2013-06-06 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13677593#comment-13677593
 ] 

Jonathan Ellis commented on CASSANDRA-5622:
---

Two solutions suggest themselves:
# Embrace ignoring of K and just pass new Object()
# Treat K as designed and accept responsibility for generating appropriate bind 
variables

I'm not a huge fan of #1 since it forces the user to do more work to generate 
bind variables for the PK values.  I'd rather automate that.

Let me give an example of what I mean in #2.  Suppose we have word counts as 
follows:
{code}
CREATE TABLE word_counts (
  file_name text,
  counted_at timestamp,
  word text,
  count int,
  PRIMARY KEY ((file_name, counted_at), word)
);
{code}

Then the user would configuer CQL such as UPDATE word_counts SET count = ?.  
CqlRW would inspect the table definition and realize it needs to add  WHERE 
file_name = ? AND counted_at = ? AND word = ?.

Then when it gets a MapString, BB as K, it combines those with the ListBB 
variables.  It knows the ordering of the pk columns since it generated it 
itself.

One downside: this doesn't lend itself to INSERT statements, since that does 
not separate SET/WHERE the way UPDATE does.  This is a limitation I can live 
with.

 Update CqlRecordWriter to conform to RecordWriter API
 -

 Key: CASSANDRA-5622
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5622
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.6
Reporter: Jonathan Ellis
Assignee: Alex Liu
 Fix For: 1.2.6


 {{RecordWriterK, V}} is supposed to write values V that can be uniquely 
 identified by keys K.
 Currently CqlRW requires the user to give it all the bind variables for a 
 complete statement in V, and effectively ignores K.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5622) Update CqlRecordWriter to conform to RecordWriter API

2013-06-06 Thread Alex Liu (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13677687#comment-13677687
 ] 

Alex Liu commented on CASSANDRA-5622:
-

Agreed, #2 is more concise and easy to use.

 Update CqlRecordWriter to conform to RecordWriter API
 -

 Key: CASSANDRA-5622
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5622
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.6
Reporter: Jonathan Ellis
Assignee: Alex Liu
 Fix For: 1.2.6


 {{RecordWriterK, V}} is supposed to write values V that can be uniquely 
 identified by keys K.
 Currently CqlRW requires the user to give it all the bind variables for a 
 complete statement in V, and effectively ignores K.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira