syndicate-storage / syndicate

Internet-scale software-defined storage system
Apache License 2.0
56 stars 10 forks source link

exposing local cache path through xattr #132

Closed iychoi closed 8 years ago

iychoi commented 8 years ago

Previously, you exposed cache availability through xattr. This was useful for loadbalancing at Hadoop. Now, I need more than that. Can we expose local cache path (or parent directory of cache block files) through xattr? I found there's a function opening a cached block file (https://github.com/jcnelson/syndicate/blob/master/UG/fs/read.cpp#L374) in the source code level. But more generally, if we can get the shortcut to the cache block file, Hadoop can directly read it instead of sending the data through local socket.

iychoi commented 8 years ago

This was done previously if I remember correctly. Local cache path is exposed through xattr with a key "user.syndicate_cached_file_path".