hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashutosh Chauhan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-7228) StreamPrinter should be joined to calling thread
Date Fri, 13 Jun 2014 15:49:02 GMT

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

Ashutosh Chauhan updated HIVE-7228:
-----------------------------------

    Assignee: Pankit Thapar

> StreamPrinter should be joined to calling thread 
> -------------------------------------------------
>
>                 Key: HIVE-7228
>                 URL: https://issues.apache.org/jira/browse/HIVE-7228
>             Project: Hive
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 0.13.0
>            Reporter: Pankit Thapar
>            Assignee: Pankit Thapar
>            Priority: Minor
>         Attachments: HIVE-7228.patch
>
>
> ISSUE:
> StreamPrinter class is used for connecting an input stream (connected to output) of a
process with the output stream of a Session (CliSessionState/SessionState class)
> It acts as a pipe between the two and transfers data from input stream to the output
stream. THE TRANSFER OPERATION RUNS IN A SEPARATE THREAD. 
> From some of the current usages of this class, I noticed that the calling threads do
not wait for the transfer operation to be completed. That is, the calling thread does not
join the SteamPrinter threads.
> The calling thread would move forward thinking that the respective output stream already
has the data needed. But, it is not always the right assumption since, it might happen that
> the StreamPrinter thread did not finish execution by the time it was expected by the
calling thread.
> FIX:
> To ensure that calling thread waits for the StreamPrinter threads to complete, StreamPrinter
threads are joined to calling thread.
> Please note , without the fix, TestCliDriverMethods#testRun failed sometimes (like 1
in 30 times). This test would not fail with this fix.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message