From 8bfe42da4f7d85cb5d93bf4b1e989ccad1861d83 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 7 Jun 2018 20:51:50 -0700 Subject: [PATCH] Updated Directories and Files (markdown) --- Directories-and-Files.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Directories-and-Files.md b/Directories-and-Files.md index 254f473..fe11c6b 100644 --- a/Directories-and-Files.md +++ b/Directories-and-Files.md @@ -52,7 +52,7 @@ For reads: 2. Client Read File Chunks => Weed Volume Servers For writes: -1. Client write to Filer +1. Client stream files to Filer 2. Filer uploads data to Weed Volume Servers, and break the large files into chunks. 3. Filer writes the metadata and chunk information into Filer database. @@ -64,6 +64,10 @@ For file listing under a particular directory, the listing is just a simple scan For adding one file, the parent directories will be recursively created if not exists. And then the file entry will be created. +For file renaming, it is just O(1) operations, with deleting the old metadata and inserting the new metadata, without changing the actual file content on volume servers. + +For directory renaming, it will be O(N) operations, with N as the number of files and folders underneath the to-be-renamed directory. This is because each of them will need to adjust the metadata. But still there are no change for the actual file content on volume servers. + ### Comparing Storage Options Here is a comparison of different filer store options. @@ -76,7 +80,7 @@ Here is a comparison of different filer store options. ### Extending Storage Options -For any new storage option, please check the FilerStore interface. It should be fairly straight forward to implement. Welcome to contribute back. +For any new storage option, please implement the FilerStore interface. It should be fairly straight forward to implement. Welcome to contribute back. ### Use Cases