{"action":"opened","issue":{"url":"https://api.github.com/repos/xusleep/Linkage/issues/47","labels_url":"https://api.github.com/repos/xusleep/Linkage/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/xusleep/Linkage/issues/47/comments","events_url":"https://api.github.com/repos/xusleep/Linkage/issues/47/events","html_url":"https://github.com/xusleep/Linkage/issues/47","id":56782364,"number":47,"title":"小文件处理可用方案（云存储可用方案）","user":{"login":"xusleep","id":7782965,"avatar_url":"https://avatars.githubusercontent.com/u/7782965?v=3","gravatar_id":"","url":"https://api.github.com/users/xusleep","html_url":"https://github.com/xusleep","followers_url":"https://api.github.com/users/xusleep/followers","following_url":"https://api.github.com/users/xusleep/following{/other_user}","gists_url":"https://api.github.com/users/xusleep/gists{/gist_id}","starred_url":"https://api.github.com/users/xusleep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xusleep/subscriptions","organizations_url":"https://api.github.com/users/xusleep/orgs","repos_url":"https://api.github.com/users/xusleep/repos","events_url":"https://api.github.com/users/xusleep/events{/privacy}","received_events_url":"https://api.github.com/users/xusleep/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-06T08:04:29Z","updated_at":"2015-02-06T08:04:29Z","closed_at":null,"body":"一般的小文件存储做法是对小文件做合并，比如一次性申请一个固定的大文件，然后同步的将多个小文件持续的写入到大文件里，这样做是为了是多个小文件的随机写转换为流式的顺序写，因为随机写会有很多的磁盘寻道时间和旋转时间，导致性能会有瓶颈。小文件合并的做法需要做大量的索引，文件操作会更复杂一些，在第一期将不会对小文件做合并，而是直接对文件系统写入，为了解决随机读写导致的磁盘瓶颈，提升吞吐量，解决方式是单个datanode挂载多个磁盘，后期将会实现小文件合并策略，具体的存储方式对业务系统是透明的，后面切换了存储策略，业务系统不需要修改。"}}