Read HDFS File path using Java nio

Viewed 54

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

0 Answers
Related