I am trying to read some hadoop files using nio. My question is how can I pass a FileSystem to FileChannel. The reason I want to use that is because, according to this post, nio is faster.
Asked
Active
Viewed 730 times
0
-
It's only even potentially faster *if* you can use it, and as you can't use it in assocation with a Hadoop `FileSystem`, it isn't faster at all. – user207421 Mar 21 '16 at 03:29
-
That's why I am asking if anyone has a solution, then I can test if it's really faster. – moon Mar 21 '16 at 06:30
1 Answers
0
For this, you don't need to pass filesystem in FileChannel. You can extend FileChannel
to accept the given filesystem. You can go through this repo to read more about it. You can see in this given file how FileChannel is extended.

abby37
- 597
- 6
- 21