In a manner of speaking. I would imagine that you would like to take advantage of resource management that comes with yarn. If you're planning to make this a product that your customers can submit jobs to do some image processing, then you're better off creating a yarn application master that would handle taking files from Hdfs, localize then process as a local process.
If not and more of a one-time effort, then it's as simple as:
hadoop fs -copyToLocal hdfspath localpath
You can then do whatever you want to do with this local file.
Thanks,
Ron
On Jul 24, 2016 12:28 PM, Madhav Sharan <[email protected]> wrote:
Hi Ron, Thanks for replying.Unfortunately I could not find a VideoCapture method accepting stream input.I will look into second option. Will it be similar to copying file from hdfs to a tmp directory and then using tmp file?--Madhav SharanOn Sun, Jul 24, 2016 at 12:08 PM, Ron's Yahoo! <[email protected]> wrote:You can create a stream for an HDFS file and have OpenCV read from the stream.Other option is to create a yarn job and you can resource localize the HDFS file so you can run OpenCV just like any other application.Thanks,RonOn Jul 24, 2016, at 12:03 PM, Madhav Sharan <[email protected]> wrote:Hi hadoop users,I need some help in reading video files from HDFS. I am processing videos using OpenCV and opencv is not able to read video file from hdfs. I tried prefixing path with "hdfs://" but it still does not works. Is there a way we can directly read from HDFS using opencv?[0] Video capture code - https://github.com/smadha/pooled_time_series/blob/master/src/main/java/gov/nasa/jpl/memex/pooledtimeseries/PoT.java#L441[1] TMP file solution - https://github.com/smadha/pooled_time_series/blob/master/src/main/java/gov/nasa/jpl/memex/pooledtimeseries/OpticalTimeSeries.java#L66--Madhav Sharan
