message: Add NewRandomAccessFile
diff: @@ -322,6 +322,23 @@ void Cleanup(TF_Filesystem* filesystem) {
  delete libhdfs;
  }
  +void NewRandomAccessFile(const TF_Filesystem* filesystem, const char* path,
  + TF_RandomAccessFile* file, TF_Status* status) {
  + auto libhdfs = static_cast<LibHDFS*>(filesystem->plugin_filesystem);
  + auto fs = Connect(libhdfs, path, status);
  + if (TF_GetCode(status) != TF_OK) return;
  +
  + std::string scheme, namenode, hdfs_path;
  + ParseHadoopPath(path, &scheme, &namenode, &hdfs_path);
  +
  + auto handle = libhdfs->hdfsOpenFile(fs, hdfs_path.c_str(), O_RDONLY, 0, 0, 0);
  + if (handle == nullptr) return TF_SetStatusFromIOError(status, errno, path);
  +
  + file->plugin_file =
  + new tf_random_access_file::HDFSFile(path, hdfs_path, fs, libhdfs, handle);
  + TF_SetStatus(status, TF_OK, "");
  +}
  +
  // TODO(vnvo2409): Implement later
  } // namespace tf_hadoop_filesystem
  