-
1. file length and configuring metadata
manik Jan 7, 2011 7:11 AM (in response to kate88)GridFile.Metadata meta = metadata.get(fileName);
meta.getLength();
But the result is not good for me becouse method getLength() doesn't return real file size but CHUNK_SIZE*chunkCount..
Is it possible to get real file length from metadata?
You should use GridFile.length(), which overrides the JDK's File.length(). Internally, this uses metadata stored about the actual file length.
And question 2:
Is it possible to configure metada and add some extra information to it?
What arbitrary info do you wish to store here? Is it something generically useful that we have missed?
-
2. file length and configuring metadata
kate88 Jan 7, 2011 8:22 AM (in response to manik)Thanks Manik!
So I am making some kind of filesystem based on infinispan and I need to store some extra information which would be useful only in my system. Is it possible to store some extra information in metadata?
-
3. file length and configuring metadata
manik Jan 7, 2011 10:15 AM (in response to kate88)So I am making some kind of filesystem based on infinispan and I need to store some extra information which would be useful only in my system. Is it possible to store some extra information in metadata?
Nope. Perhaps just use an additional file for this metadata?
-
4. file length and configuring metadata
kate88 Jan 7, 2011 1:57 PM (in response to kate88)so is it possible to replicate only one file while other are distributed?
-
5. file length and configuring metadata
manik Jan 10, 2011 6:57 AM (in response to kate88)Nope. You'd need to use separate caches for this.