You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tez.apache.org by "Jonathan Eagles (JIRA)" <ji...@apache.org> on 2018/05/16 18:05:00 UTC

[jira] [Updated] (TEZ-3937) Empty partition BitSet to byte[] conversion creates one extra byte in rounding error

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

Jonathan Eagles updated TEZ-3937:
---------------------------------
    Description: Byte array length calculation is defined as (bitset.length / 8) + 1 which has off by one errors on byte boundaries. For example, BitSet of length 0 is converted to a byte array of length 1. This was introduced as part of TEZ-972 since BitSet.toByteArray and valueOf were not supported as Tez supported Java 6 at the time and API was introduced in Java 7.

> Empty partition BitSet to byte[] conversion creates one extra byte in rounding error
> ------------------------------------------------------------------------------------
>
>                 Key: TEZ-3937
>                 URL: https://issues.apache.org/jira/browse/TEZ-3937
>             Project: Apache Tez
>          Issue Type: Bug
>            Reporter: Jonathan Eagles
>            Assignee: Jonathan Eagles
>            Priority: Major
>
> Byte array length calculation is defined as (bitset.length / 8) + 1 which has off by one errors on byte boundaries. For example, BitSet of length 0 is converted to a byte array of length 1. This was introduced as part of TEZ-972 since BitSet.toByteArray and valueOf were not supported as Tez supported Java 6 at the time and API was introduced in Java 7.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)