We’ve discussed how GFS carries out file operations, and we have seen the two of them (create and read files) in the previous lesson. In this lesson, we will look into what kind of write operations GFS supports and the workflow of these operations.

Writing data to the file

Data can be written at a random position in the file or appended to the file in case of sequential writes. GFS offers two operations–a random write and an append operation. In a random write operation, the client provides the offset at which the data should be written. In an append operation, the data is written at the end of the file at the GFS chosen offset.

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.