摘要 |
An approach is provided for implementing a virtual file system using a key-value-based storage interface. A key-value directory framework determines one or more files stored in at least one stream-based file store. The key-value directory framework causes, at least in part, a grouping of the one or more files into at least one key-value directory. The key-value directory includes, at least in part, one or more key-value pairs of a distributed key-value store. The key-value directory framework also causes, at least in part, a storage of (a) at least one identifier of the one or more files, the at least one key-value directory, or a combination thereof as one or more keys of the one or more key-value pairs; (b) block-based access information associated with the one or more files as one or more values of the key-value pairs; and (c) a locking mechanism to facilitate coordination of threads across multiple hosts. |