You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2015/08/01 04:24:04 UTC

[jira] [Commented] (SPARK-9517) BytesToBytesMap should encode data the same way as UnsafeExternalSorter

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

Apache Spark commented on SPARK-9517:
-------------------------------------

User 'rxin' has created a pull request for this issue:
https://github.com/apache/spark/pull/7845

> BytesToBytesMap should encode data the same way as UnsafeExternalSorter
> -----------------------------------------------------------------------
>
>                 Key: SPARK-9517
>                 URL: https://issues.apache.org/jira/browse/SPARK-9517
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>            Reporter: Reynold Xin
>            Assignee: Reynold Xin
>
> BytesToBytesMap current encodes key/value data in the following format:
> {code}
> 8B key length, key data, 8B value length, value data
> {code}
> UnsafeExternalSorter, on the other hand, encodes data this way:
> {code}
> 4B record length, data
> {code}
> As a result, we cannot pass records encoded by BytesToBytesMap directly into UnsafeExternalSorter for sorting. However, if we rearrange data slightly, we can then pass the key/value records directly into UnsafeExternalSorter:
> {code}
> 4B key+value length, 4B key length, key data, value data
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org