'Read HDFS File path using Java nio
I have a third party Api whih has two overloaded methods. One accepts Java nio Path and another String value path.
I have to read path of a file from Hdfs (hdfs://abc/xyz/123.jks). Problem is for #2 though it accepts String value as path but it's inline function only treat that String path as class path (getClassLoader().getResourceAsStream()) . Is there any way to set hadoop path as class path?
For #1 nio path does not support hdfs path reading . Is there any way for to achive this way?
Kindly help
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
