You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "David Mollitor (Jira)" <ji...@apache.org> on 2020/04/01 21:58:00 UTC

[jira] [Updated] (HIVE-23096) Review Code Path for getResults

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

David Mollitor updated HIVE-23096:
----------------------------------
    Fix Version/s: 4.0.0
       Resolution: Fixed
           Status: Resolved  (was: Patch Available)

Pushed to master.  Thanks [~ngangam] for the review!

> Review Code Path for getResults
> -------------------------------
>
>                 Key: HIVE-23096
>                 URL: https://issues.apache.org/jira/browse/HIVE-23096
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Minor
>             Fix For: 4.0.0
>
>         Attachments: HIVE-23096.1.patch
>
>
> * Log when a buffer returned to a client is completely full.  This can be helpful for identifying misconfigured clients that have a fetchSize that is too small
> * See below code snippet
> * Rows are loaded into an ArrayList called "convey."  This ArrayList is instantiated with the default size (10) and is expanded on-demand as it is filled.  I changed it so that this ArrayList's size is set once, on the first call to fetch, so that it doesn't have to "grow" and waste cycles and memory with GC thrashing for that.
> * Some minor cleanup
> {code:java|Driver.java}
>  try {
>         ss = Utilities.readColumn(driverContext.getResStream(), bos);
>         if (bos.getLength() > 0) {
>           // use JDK StandardCharsets
>           row = new String(bos.getData(), 0, bos.getLength(), "UTF-8");
>         } else if (ss == Utilities.StreamStatus.TERMINATED) {
>           // Do not create a new string for this.  Just use a hard-coded empty string.  JDK: "Note that use of this constructor is unnecessary since Strings are immutable."
>           row = new String();
>         }
>         ...
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)