Thanks a lot Ron. It helps -- Madhav Sharan
On Sun, Jul 24, 2016 at 2:19 PM, Ron Gonzalez <[email protected]> wrote: > 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 Sharan > > > On 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, > Ron > > On 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 > <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_smadha_pooled-5Ftime-5Fseries_blob_master_src_main_java_gov_nasa_jpl_memex_pooledtimeseries_PoT.java-23L441&d=DQMFAg&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=DhBa2eLkbd4gAFB01lkNgg&m=9cu9u3AmZ3FP8PejFB3CInJW4mTPFq1H-B3USMRuP8E&s=Mr2L2gdpcCZNngViWbS0XOGfcb8oP98lDKJLzJoyMXE&e=> > > [1] TMP file solution - > https://github.com/smadha/pooled_time_series/blob/master/src/main/java/gov/nasa/jpl/memex/pooledtimeseries/OpticalTimeSeries.java#L66 > <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_smadha_pooled-5Ftime-5Fseries_blob_master_src_main_java_gov_nasa_jpl_memex_pooledtimeseries_OpticalTimeSeries.java-23L66&d=DQMFAg&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=DhBa2eLkbd4gAFB01lkNgg&m=9cu9u3AmZ3FP8PejFB3CInJW4mTPFq1H-B3USMRuP8E&s=Xas8nIDCouC0_Qx2RiQDDV9okicT_KWd2ZPV6gTEWzg&e=> > > -- > Madhav Sharan > > > > >
