[infinispan-dev] Grid Filesystem

Marko Lukša marko.luksa at gmail.com
Tue Jan 3 08:55:46 EST 2012


Hey guys.

Aleš Justin and I will be using infinispan's grid file system for Capedwarf.

I have fixed a few issues in GFS. Before I issue a pull request, I need 
to know if you guys prefer a single commit for all of them or separate 
commits. What about jira issues - separate or one single jira issue?

Here's a list of my commits:

- Implement appending to files (up to now, the append parameter was ignored)
- Implement GridFile.getParent() and getParentFile()
- Implement GridFile.lastModified()
- Prevent writing to and reading from directories
- Fix bugs related to non-default chunk size
- Leak when overwriting existing file with shorter content length 
(excess file chunks are never removed from cache)
- Leak when calling GridFile.delete() (removes only file metadata, but 
not the actual file contents)
- GridFile.createNewFile() does not honor the contract of 
File.createNewFile()
- GridFile.list() does not honor contract of File.list() and also has a 
few bugs (it doesn't handle file separators correctly)
- GridFilesystem.getFile(File, String) creates File with illegal path 
(on windows, the created file begins with "C:\...")
- mkdir() fails on "/dir", but works on "dir"
- the root dir is not handled properly
- add javadoc to GridFilesystem


There are also a few other things. Before I fix them, I would like you 
to confirm my thinking is correct:

- GFS.getFile("/hello.txt") should point to the same file as 
GFS.getFile("hello.txt"), but it currently does not. GFS treats these 
two as two distinct files.
- GridFilesystem.remove() shouldn't be public, because the proper way to 
remove files is through GridFile.delete(). By calling 
GridFilesystem.remove(), only the file's contents are removed, but the 
metadata is not).
- GridFile.setLength() should throw an exception instead of printing to 
System.err



ML



More information about the infinispan-dev mailing list