[jira] [Commented] (HBASE-8078) REST for Multi-put Using JSON Ordering

2013-06-28 Thread Chip Salzenberg (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-8078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13695278#comment-13695278
 ] 

Chip Salzenberg commented on HBASE-8078:


This bug also manifests in that the $ entry for cells must be last.

 REST for Multi-put Using JSON Ordering
 --

 Key: HBASE-8078
 URL: https://issues.apache.org/jira/browse/HBASE-8078
 Project: HBase
  Issue Type: Bug
  Components: REST
Reporter: Jesse Anderson

 This issue only happens when doing a Multi-put using the REST interface and 
 with the JSON data format.
 The bug is that the key entry must come before the Cell entry.  The key 
 entry order shouldn't matter.  If it doesn't come first, the REST interface 
 won't find the key and will use the URL's key over and over.  For example, if 
 the row key in the URL is fakekey, then every cell would be added to the 
 same row despite the key being in the JSON.
 Here is the workaround in Python:
   cell = OrderedDict([
   (key, rowKeyEncoded),
   (Cell, 
   [
   { column : messagecolumnencoded, $ : line },
   { column : usernamecolumnencoded, $ : 
 usernameEncoded },
   { column : linenumbercolumnencoded, $ : 
 lineNumberEncoded },
   ])
   ])

--
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] (HBASE-8078) REST for Multi-put Using JSON Ordering

2013-06-28 Thread Chip Salzenberg (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-8078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13695332#comment-13695332
 ] 

Chip Salzenberg commented on HBASE-8078:


Further explanation: 
http://jersey.576304.n2.nabble.com/Jersey-JAXB-incorrectly-consumes-JSON-if-elements-are-not-particularly-ordered-td4784190.html

 REST for Multi-put Using JSON Ordering
 --

 Key: HBASE-8078
 URL: https://issues.apache.org/jira/browse/HBASE-8078
 Project: HBase
  Issue Type: Bug
  Components: REST
Reporter: Jesse Anderson

 This issue only happens when doing a Multi-put using the REST interface and 
 with the JSON data format.
 The bug is that the key entry must come before the Cell entry.  The key 
 entry order shouldn't matter.  If it doesn't come first, the REST interface 
 won't find the key and will use the URL's key over and over.  For example, if 
 the row key in the URL is fakekey, then every cell would be added to the 
 same row despite the key being in the JSON.
 Here is the workaround in Python:
   cell = OrderedDict([
   (key, rowKeyEncoded),
   (Cell, 
   [
   { column : messagecolumnencoded, $ : line },
   { column : usernamecolumnencoded, $ : 
 usernameEncoded },
   { column : linenumbercolumnencoded, $ : 
 lineNumberEncoded },
   ])
   ])

--
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] (HBASE-8078) REST for Multi-put Using JSON Ordering

2013-03-12 Thread Andrew Purtell (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-8078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13600412#comment-13600412
 ] 

Andrew Purtell commented on HBASE-8078:
---

Let me double check but I think this is a known problem. We use the Jersey JAXB 
bindings for JSON support: 
http://jersey.java.net/nonav/documentation/latest/json.html#json.jaxb.approach.section
 . These introduce some ordering requirements, that IIRC can change from 
version to version (of Jersey).

The grand fix for JSON ordering issues is likely to be a move away from the 
JAXB bindings to a full JSON processor like Jackson. 

 REST for Multi-put Using JSON Ordering
 --

 Key: HBASE-8078
 URL: https://issues.apache.org/jira/browse/HBASE-8078
 Project: HBase
  Issue Type: Bug
  Components: REST
Reporter: Jesse Anderson

 This issue only happens when doing a Multi-put using the REST interface and 
 with the JSON data format.
 The bug is that the key entry must come before the Cell entry.  The key 
 entry order shouldn't matter.  If it doesn't come first, the REST interface 
 won't find the key and will use the URL's key over and over.  For example, if 
 the row key in the URL is fakekey, then every cell would be added to the 
 same row despite the key being in the JSON.
 Here is the workaround in Python:
   cell = OrderedDict([
   (key, rowKeyEncoded),
   (Cell, 
   [
   { column : messagecolumnencoded, $ : line },
   { column : usernamecolumnencoded, $ : 
 usernameEncoded },
   { column : linenumbercolumnencoded, $ : 
 lineNumberEncoded },
   ])
   ])

--
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