You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by melode11 <gi...@git.apache.org> on 2016/11/25 10:55:12 UTC

[GitHub] hive pull request #118: fix stripe size smaller than expected

GitHub user melode11 opened a pull request:

    https://github.com/apache/hive/pull/118

    fix stripe size smaller than expected

    I saw there's a Jira item: https://issues.apache.org/jira/browse/HIVE-13232 moved the compressed = null out of if block. But that is not seem to be a complete fix. To calculate the right value, we cannot use all bytes that a reserved, but should use bytes are filled. Thus I change the capacity() to position().
    ```java  
    public void flush() throws IOException {
        spill();
        if (compressed != null && compressed.position() != 0) {
          compressed.flip();
          receiver.output(compressed);
    //Should move compress = null out of if block, (already been moved out in 2.1.0 code)
    //otherwise its capacity will count for all following stripes even it is not used by them.
          compressed = null;
    }
        uncompressedBytes = 0;
        compressedBytes = 0;
        overflow = null;
        current = null;
      }
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/melode11/hive master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/hive/pull/118.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #118
    
----
commit 5490d08733166c4a1ea5f6a50a3e74897bdbd011
Author: Yuxing Yao <yu...@microsoft.com>
Date:   2016-11-25T10:33:11Z

    fix stripe size smaller than expected

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---