Running interrelated methods continously using java
Posted
by
snehalata
on Stack Overflow
See other posts from Stack Overflow
or by snehalata
Published on 2012-11-23T10:58:26Z
Indexed on
2012/11/23
10:59 UTC
Read the original article
Hit count: 125
java
|scheduled-tasks
I have written application which downloads data from a website every 10 mins and writes to a file.Then these files are merged into one file and then R program is run on this merged file to perform sentiment analysis and result is stored in hbase.
I want the process of merging files,running R and then storing to HBase to run continuosly on the downloaded data.
For running R,we are running R script from java program.We have used Runtime.getRuntime().exec() method to run R program but it doesn't wait for R program to complete and method in the next line starts executing.Using p.waitFor() did not help .
What approach should I use to do merge then run R and finally store results in Hbase?Should I use timer class??
© Stack Overflow or respective owner