You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Andrew Kyle Purtell (Jira)" <ji...@apache.org> on 2022/06/16 16:41:00 UTC

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

     [ https://issues.apache.org/jira/browse/HBASE-8078?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Kyle Purtell resolved HBASE-8078.
----------------------------------------
    Resolution: Not A Problem

> 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
>            Priority: Major
>
> 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 was sent by Atlassian Jira
(v8.20.7#820007)