[ 
https://issues.apache.org/jira/browse/ASTERIXDB-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15882004#comment-15882004
 ] 

ASF subversion and git services commented on ASTERIXDB-1791:
------------------------------------------------------------

Commit 34f2384ea66a4b62627cb5a3ff3544b6d4558469 in asterixdb's branch 
refs/heads/master from [~buyingyi]
[ https://git-wip-us.apache.org/repos/asf?p=asterixdb.git;h=34f2384 ]

ASTERIXDB-1791, ASTERIXDB-1796: fix failure handling in runtime operators.

This change includes the following parts:
- Fix the implementation of fail() and close() in several runtime operators
  to avoid file handle leak and job hang;
- Add an erase method to RunFileWriter which closes files before deleting
  them in order release the holding disk space;
- Call RunFileWriter.close() and RunFileReader.close() in "finally" blocks.
- Fix RunFileReader to not truncate files to be deleted - it is not the root
  cause of un-released disk space - open deleted files are the root cuase;
- Check file handle leaks in LangExecutionUtil.tearDown().

Change-Id: I203168171e6dac16b57d2eda960823e3810e22a3
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1513
Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <ti...@apache.org>


> HyracksDataException: Premature file in Join operator
> -----------------------------------------------------
>
>                 Key: ASTERIXDB-1791
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1791
>             Project: Apache AsterixDB
>          Issue Type: Bug
>            Reporter: Yingyi Bu
>            Assignee: Yingyi Bu
>
> Configuration:
> 2 NC
> 1 GB RAM each
> TPC-H dataset with SF=2
> Query (TPC-H Q18):
> {noformat}
> USE tpch;
> SET `compiler.joinmemory` "8MB"
> SET `compiler.groupmemory` "8MB"
> SET `compiler.sortmemory` "8MB"
> WITH tmp AS
> (
>     SELECT l_orderkey, SUM(l_quantity) t_sum_quantity
>     FROM  LineItem
>     GROUP BY l_orderkey
> )
> SELECT c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice,
>        SUM(l.l_quantity) sum_quantity
> FROM  LineItem l
> JOIN  tmp t ON t.l_orderkey = l.l_orderkey
> JOIN  Orders o ON o.o_orderkey = t.l_orderkey
> JOIN  Customer c ON c.c_custkey = o.o_custkey
> WHERE t.t_sum_quantity > 30
> GROUP BY c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice
> ORDER BY o.o_totalprice DESC, o.o_orderdate
> LIMIT 100
> ;
> {noformat}
> Error:
> {noformat}
> Premature end of file
>         at 
> org.apache.hyracks.control.cc.job.JobRun.waitForCompletion(JobRun.java:223)
>         at 
> org.apache.hyracks.control.cc.work.WaitForJobCompletionWork$1.run(WaitForJobCompletionWork.java:50)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.hyracks.api.exceptions.HyracksDataException: Premature 
> end of file
>         at 
> org.apache.hyracks.api.exceptions.HyracksDataException.create(HyracksDataException.java:41)
>         at 
> org.apache.hyracks.control.common.utils.ExceptionUtils.setNodeIds(ExceptionUtils.java:62)
>         at org.apache.hyracks.control.nc.Task.run(Task.java:330)
>         ... 3 more
> Caused by: org.apache.hyracks.api.exceptions.HyracksDataException: Premature 
> end of file
>         at 
> org.apache.hyracks.dataflow.common.io.RunFileReader.nextFrame(RunFileReader.java:66)
>         at 
> org.apache.hyracks.dataflow.std.join.OptimizedHybridHashJoinOperatorDescriptor$ProbeAndJoinActivityNode$1.applyInMemHashJoin(OptimizedHybridHashJoinOperatorDescriptor.java:672)
>         at 
> org.apache.hyracks.dataflow.std.join.OptimizedHybridHashJoinOperatorDescriptor$ProbeAndJoinActivityNode$1.joinPartitionPair(OptimizedHybridHashJoinOperatorDescriptor.java:503)
>         at 
> org.apache.hyracks.dataflow.std.join.OptimizedHybridHashJoinOperatorDescriptor$ProbeAndJoinActivityNode$1.close(OptimizedHybridHashJoinOperatorDescriptor.java:435)
>         at 
> org.apache.hyracks.dataflow.std.join.OptimizedHybridHashJoinOperatorDescriptor$ProbeAndJoinActivityNode$1.close(OptimizedHybridHashJoinOperatorDescriptor.java:439)
>         at org.apache.hyracks.control.nc.Task.pushFrames(Task.java:367)
>         at org.apache.hyracks.control.nc.Task.run(Task.java:308)
>         ... 3 more
> Feb 13, 2017 4:05:33 PM 
> org.apache.asterix.api.http.server.QueryServiceServlet handleRequest
> SEVERE: Job failed on account of:
> Premature end of file
> org.apache.hyracks.api.exceptions.HyracksException: Job failed on account of:
> Premature end of file
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to