Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raptor exception during rollback #4604

Closed
electrum opened this issue Feb 22, 2016 · 2 comments
Closed

Raptor exception during rollback #4604

electrum opened this issue Feb 22, 2016 · 2 comments
Labels

Comments

@electrum
Copy link
Contributor

2016-02-21T11:33:58.635-0800    ERROR   20160221_192849_19922_hcaf5.1.235-0-29308       com.facebook.presto.operator.Driver     Error closing operator 1 for task 20160221_192849_19922_hcaf5.1.235
java.lang.RuntimeException: Exception during rollback
        at com.facebook.presto.raptor.RaptorPageSink.abort(RaptorPageSink.java:138)
        at com.facebook.presto.operator.TableWriterOperator.close(TableWriterOperator.java:227)
        at com.facebook.presto.operator.Driver.destroyIfNecessary(Driver.java:451)
        at com.facebook.presto.operator.Driver.access$400(Driver.java:61)
        at com.facebook.presto.operator.Driver$DriverLockResult.close(Driver.java:619)
        at com.facebook.presto.operator.Driver.processFor(Driver.java:314)
        at com.facebook.presto.execution.SqlTaskExecution$DriverSplitRunner.processFor(SqlTaskExecution.java:575)
        at com.facebook.presto.execution.TaskExecutor$PrioritizedSplitRunner.process(TaskExecutor.java:505)
        at com.facebook.presto.execution.TaskExecutor$Runner.run(TaskExecutor.java:640)
        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)
        Suppressed: com.facebook.presto.spi.PrestoException: Failed to close writer
                at com.facebook.presto.raptor.storage.OrcFileWriter.close(OrcFileWriter.java:160)
                at com.facebook.presto.raptor.storage.OrcStorageManager$OrcStoragePageSink.rollback(OrcStorageManager.java:565)
                at com.facebook.presto.raptor.RaptorPageSink.abort(RaptorPageSink.java:141)
                ... 11 more
        Caused by: java.io.IOException: Stream Closed
                at java.io.FileOutputStream.writeBytes(Native Method)
                at java.io.FileOutputStream.write(FileOutputStream.java:326)
                at com.facebook.presto.raptor.util.SyncingFileSystem$LocalFileOutputStream.write(SyncingFileSystem.java:90)
                at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
                at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
                at java.io.FilterOutputStream.close(FilterOutputStream.java:158)
                at org.apache.hadoop.fs.FSDataOutputStream$PositionCache.close(FSDataOutputStream.java:72)
                at org.apache.hadoop.fs.FSDataOutputStream.close(FSDataOutputStream.java:106)
                at org.apache.hadoop.hive.ql.io.orc.WriterImpl.close(WriterImpl.java:2429)
                at org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat$OrcRecordWriter.close(OrcOutputFormat.java:106)
                at com.facebook.presto.raptor.storage.OrcFileWriter.close(OrcFileWriter.java:157)
                ... 13 more
@electrum
Copy link
Contributor Author

This might be a problem with RecordWriter.close() not being idempotent, and OrcFileWriter.close() should be idempotent and thus it could theoretically be called multiple times, but in practice it seems to only be called once.

@electrum
Copy link
Contributor Author

The OrcFileWriter can be closed multiple times in OrcStoragePageSink: once in flush() then once again in rollback() (if something in flush() throws during/after closing but before setting writer to null).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant