| 1510 | } |
| 1511 | |
| 1512 | Status Start() override { |
| 1513 | // ARROW-3236: The initial position -1 needs to be updated to the stream's |
| 1514 | // current position otherwise an incorrect amount of padding will be |
| 1515 | // written to new files. |
| 1516 | RETURN_NOT_OK(UpdatePosition()); |
| 1517 | |
| 1518 | // It is only necessary to align to 8-byte boundary at the start of the file |
| 1519 | RETURN_NOT_OK(Write(kArrowMagicBytes.data(), kArrowMagicBytes.size())); |
| 1520 | RETURN_NOT_OK(Align()); |
| 1521 | |
| 1522 | return Status::OK(); |
| 1523 | } |
| 1524 | |
| 1525 | Status Close() override { |
| 1526 | // Write 0 EOS message for compatibility with sequential readers |