[ 
https://issues.apache.org/jira/browse/CASSANDRA-6543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13861314#comment-13861314
 ] 

Sylvain Lebresne commented on CASSANDRA-6543:
---------------------------------------------

This is indeed not the correct place for Java driver issues 
(https://datastax-oss.atlassian.net/browse/JAVA is), but for the sake of saving 
everyone's time, this is not a bug, just a misuse of the .array() method of 
ByteBuffer. Please see [this 
thread|https://groups.google.com/a/lists.datastax.com/forum/#!searchin/java-driver-user/blob$20ByteBuffer/java-driver-user/4_KegVX0teo/2OOZ8YOwtBcJ]
 for more details.

> CASSANDRA 2.0 : java driver : blobs not retrieving correctly
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-6543
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6543
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>            Reporter: Constance Eustace
>
> Might be wrong place but didn't find where the bugs should go and saw some 
> java-driver ones in here...
> Simple retrieval of data from a blob CQL3 column, tried getBytes() and 
> getBytes() unsafe, neither seemed to matter.
> getBytes(col).array() 
> Anyway, the input is 1760 bytes, and checked in cqlsh and the data looks 
> correctly inserted. 
> Retrieval buffer is consistently 1863 bytes... ResultSet column definitions 
> indicate it is of type blob, well, and getBytes shouldn't work. 
> bytebuffer.getCapacity is 1863 bytes. The first four values are definitely 
> different for the retrieved BB than the one sent to storage.
> Is there a mode or something? Maybe some assumed UTF8 decode is occurring? 
> Compression? The blob I'm storing has already been compressed via java's zip 
> support, so a rezip would probably make it larger?
> Here is the blob value in cqlsh, I'll try to get the post-retrieval array:  
> 1f8b0800000000000000eddccb6e1a7718c6e1bdaf6294d8533a424e1b9b538d58446a6c832155058dd820d9725d4ec6c487aa24cabd1716bd032a7dfff18330f2c28b27fa2dde4598efe0ddbbe5d3edddf57cb978babecd968bf9d3edf5f26eb1bc7eba5dccefd60fd74f777f67ade6f6fdf3e949a3d5fcb391655f5acddad77ab3517bcc8b4a7e944f8a3fb2615e7c1ebf2dc695cfc561b7fbd36c9e55b2eeaf95d145ab59e4e3c9b0dea8d56ba72727b57fde9fbeff7a523bfd3dafb76ef21f8be9b8a8acfebaf80e02020202525ac841180908080808486921c60604040404c4d88080808080a40f31362020202020c60604040404247d88b10101010101f9ffc7e687cb229bad5fa6dd2cfb74b9a964ebe9c33a9bbe3c37ebadfc6832392a1e1bf561d6da343e8ecee73783ab5effb8fae1bed3ee5cf4aee6d3d5e2b8daedf656c7f7d541f57e55bd1f54078be5fc62b11c2c672fc3ec316b6c3f36a3f3c1aadd5ff5dbf7d5edcff6f3b8dfeef43bfffdd2ee6c7fe9b5579d6cb59c2f7ad34d5119e79546b3951793ca64fb71941f1e4d0edfeefecd95e1f9f8f9f16336db7c98cf96a3cbf1e568341e6e5e9eb387d9bad19c76cfcebebdf9edcd5537fba5973df4ae16edb365f561ddbfb8fcb41a1479d6b86bd5b77fb67ec966f3c54d162744f41207af2745f012420821841042082184104208218410420821841042082184104208218410420821841031431ca4fdbfd671bead17470202020202525a88b1010101010131362020202020e9438c0d0808080888b10101010101491f626c40404040408c0d0808080848fa10cf03440911bd842b76514a0821841042082184104208218410420821841042082184104208218410420821841042c40ce18addfebe4110070302020202525a88b1010101010131362020202020e9438c0d0808080888b10101010101491f626c40404040408c0d0808080848fa108f04440911bd844376514a0821841042082184104208218410420821841042082184104208218410420821841042c40ce190dd1e0fd9eddeafbec8ee15a60a08080808486921c60604040404c4d88080808080a40f31362020202020c60604040404247d88b1010101010131362020202020e9433c1b112544f4122efa45292184104208218410420821841042082184104208218410420821841042082184104208113344eaf7e3e2b408230101010101292dc4d88080808080181b1010101090f421c60604040404c4d88080808080a40f31362020202020c60604040404247d88e701a284885ec215bb28258410420821841042082184104208218410420821841042082184104208218410420821628670c56e7fdf2088830101010101292dc4d88080808080181b1010101090f421c60604040404c4d88080808080a40f31362020202020c60604040404247d884702a284885ec221bb28258410420821841042082184104208218410420821841042082184104208218410420821628670c86e8f87ec76ef575f64f70a530504040404a4b410630302020202626c4040404040d287181b1010101010630302020202923ec4d88080808080181b1010101090f4219e8d8812227a0917fda2941042082184104208218410420821841042082184104208218410420821841042082184881922f5fb71715a849180808080809416626c40404040408c0d0808080848fa10630302020202626c4040404040d287181b1010101010630302020202923ec4f3005142442fe18a5d941242082184104208218410420821841042082184104208218410420821841042082184103143b862b7bf6f10c4c180808080809416626c40404040408c0d0808080848fa10630302020202626c4040404040d287181b1010101010630302020202923ec423015142442fe1905d9412420821841042082184104208218410420821841042082184104208218410420821841031433864b7c74376bbf7ab2fb27b85a90202020202525a88b1010101010131362020202020e9438c0d0808080888b10101010101491f626c40404040408c0d0808080848fa10cf46440911bd848b7e514a0821841042082184104208218410420821841042082184104208218410420821841042c40c91fafdb8382dc24840404040404a0b31362020202020c60604040404247d88b1010101010131362020202020e9438c0d0808080888b10101010101491fe279802821a29770c52e4a09218410420821841042082184104208218410420821841042082184104208218410428898215cb1dbdf3708e26040404040404a0b31362020202020c60604040404247d88b1010101010131362020202020e9438c0d0808080888b10101010101491fe291802821a29770c82e4a09218410420821841042082184104208218410420821841042082184104208218410428898211cb2dbe321bbddfbd517d9befe0555ff7bbe84b50300
> quick and dirty stackover flow byte[] -> hexstring of post retrieval array 
> is: 
> 820000080000073F0000000200000001000000020013696E7465726E616C5F7375626D697373696F6E0004626C6F62000474797065000D0008626C6F626461746100030000000100000004475A4950000006F41F8B0800000000000000EDDCCB6E1A7718C6E1BDAF6294D8533A424E1B9B538D58446A6C832155058DD820D9725D4EC6C487AA24CABD1716BD032A7DFFF18330F2C28B27FA2DDE4598EFE0DDBBE5D3EDDDF57CB978BABECD968BF9D3EDF5F26EB1BC7EBA5DCCEFD60FD74F777F67ADE6F6FDF3E949A3D5FCB391655F5ACDDAD77AB3517BCC8B4A7E944F8A3FB2615E7C1EBF2DC695CFC561B7FBD36C9E55B2EEAF95D145AB59E4E3C9B0DEA8D56BA72727B57FDE9FBEFF7A523BFD3DAFB76EF21F8BE9B8A8ACFEBAF80E02020202525AC841180908080808486921C60604040404C4D88080808080A40F31362020202020C60604040404247D88B10101010101F9FFC7E687CB229BAD5FA6DD2CFB74B9A964EBE9C33A9BBE3C37EBADFC6832392A1E1BF561D6DA343E8ECEE73783AB5EFFB8FAE1BED3EE5CF4AEE6D3D5E2B8DAEDF656C7F7D541F57E55BD1F54078BE5FC62B11C2C672FC3EC316B6C3F36A3F3C1AADD5FF5DBF7D5EDCFF6F3B8DFEEF43BFFFDD2EE6C7FE9B5579D6CB59C2F7AD34D5119E79546B3951793CA64FB71941F1E4D0EDFEEFECD95E1F9F8F9F16336DB7C98CF96A3CBF1E568341E6E5E9EB387D9BAD19C76CFCEBEBDF9EDCD5537FBA5973DF4AE16EDB365F561DDBFB8FCB41A1479D6B86BD5B77FB67EC966F3C54D162744F41207AF2745F012420821841042082184104208218410420821841042082184104208218410420821841031431CA4FDBFD671BEAD17470202020202525A88B1010101010131362020202020E9438C0D0808080888B10101010101491F626C40404040408C0D0808080848FA10CF03440911BD842B76514A0821841042082184104208218410420821841042082184104208218410420821841042C40CE18ADDFEBE4110070302020202525A88B1010101010131362020202020E9438C0D0808080888B10101010101491F626C40404040408C0D0808080848FA108F04440911BD844376514A0821841042082184104208218410420821841042082184104208218410420821841042C40CE190DD1E0FD9EDDEAFBEC8EE15A60A08080808486921C60604040404C4D88080808080A40F31362020202020C60604040404247D88B1010101010131362020202020E9433C1B112544F4122EFA45292184104208218410420821841042082184104208218410420821841042082184104208113344EAF7E3E2B408230101010101292DC4D88080808080181B1010101090F421C60604040404C4D88080808080A40F31362020202020C60604040404247D88E701A284885EC215BB28258410420821841042082184104208218410420821841042082184104208218410420821628670C56E7FDF2088830101010101292DC4D88080808080181B1010101090F421C60604040404C4D88080808080A40F31362020202020C60604040404247D884702A284885EC221BB28258410420821841042082184104208218410420821841042082184104208218410420821628670C86E8F87EC76EF575F64F70A530504040404A4B410630302020202626C4040404040D287181B1010101010630302020202923EC4D88080808080181B1010101090F4219E8D8812227A0917FDA2941042082184104208218410420821841042082184104208218410420821841042082184881922F5FB71715A849180808080809416626C40404040408C0D0808080848FA10630302020202626C4040404040D287181B1010101010630302020202923EC4F3005142442FE18A5D941242082184104208218410420821841042082184104208218410420821841042082184103143B862B7BF6F10C4C180808080809416626C40404040408C0D0808080848FA10630302020202626C4040404040D287181B1010101010630302020202923EC423015142442FE1905D9412420821841042082184104208218410420821841042082184104208218410420821841031433864B7C74376BBF7AB2FB27B85A90202020202525A88B1010101010131362020202020E9438C0D0808080888B10101010101491F626C40404040408C0D0808080848FA10CF46440911BD848B7E514A0821841042082184104208218410420821841042082184104208218410420821841042C40C91FAFDB8382DC24840404040404A0B31362020202020C60604040404247D88B1010101010131362020202020E9438C0D0808080888B10101010101491FE279802821A29770C52E4A09218410420821841042082184104208218410420821841042082184104208218410428898215CB1DBDF3708E26040404040404A0B31362020202020C60604040404247D88B1010101010131362020202020E9438C0D0808080888B10101010101491FE291802821A29770C82E4A09218410420821841042082184104208218410420821841042082184104208218410428898211CB2DBE321BBDDFBD517D9BEFE0555FF7BBE84B50300



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to