hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hive QA (JIRA)" <>
Subject [jira] [Commented] (HIVE-15908) OperationLog's LogFile writer should have autoFlush turned on
Date Tue, 14 Feb 2017 10:39:42 GMT


Hive QA commented on HIVE-15908:

Here are the results of testing the latest attachment:

{color:red}ERROR:{color} -1 due to no test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 3 failed/errored test(s), 10238 tests executed
*Failed tests:*
TestDerbyConnector - did not produce a TEST-*.xml file (likely timed out) (batchId=235)
org.apache.hadoop.hive.cli.TestPerfCliDriver.testCliDriver[query14] (batchId=223)

Test results:
Console output:
Test logs:

Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 3 tests failed

This message is automatically generated.

ATTACHMENT ID: 12852513 - PreCommit-HIVE-Build

> OperationLog's LogFile writer should have autoFlush turned on
> -------------------------------------------------------------
>                 Key: HIVE-15908
>                 URL:
>             Project: Hive
>          Issue Type: Improvement
>          Components: HiveServer2
>    Affects Versions: 0.13.0
>            Reporter: Harsh J
>            Assignee: Harsh J
>            Priority: Minor
>         Attachments: HIVE-15908.000.patch
> The HS2 offers an API to fetch Operation Log results from the maintained OperationLog
file. The reader used inside class OperationLog$LogFile class reads line-by-line on its input
stream, for any lines available from the OS's file input perspective.
> The writer inside the same class uses PrintStream to write to the file in parallel. However,
the PrintStream constructor used sets PrintStream's {{autoFlush}} feature in an OFF state.
This causes the BufferedWriter used by PrintStream to accumulate 8k worth of bytes in memory
as the buffer before flushing the writes to disk, causing a slowness in the logs streamed
back to the client. Every line must be ideally flushed entirely as-its-written, for a smoother
> I suggest changing the line inside {{OperationLog$LogFile}} that appears as below:
> {code}
> out = new PrintStream(new FileOutputStream(file));
> {code}
> Into:
> {code}
> out = new PrintStream(new FileOutputStream(file), true);
> {code}
> This will cause it to use the described autoFlush feature of PrintStream and make for
a better reader-log-results-streaming experience:,%20boolean)

This message was sent by Atlassian JIRA

View raw message