Why not just cron it?

J-D

On Wed, Sep 14, 2011 at 11:08 PM, Stuti Awasthi <[email protected]> wrote:
> Hi Friends,
> I wanted to write a scheduler which will take backup of Hbase tables by 
> timestamp using CopyTable utility. I created a thread which will get 
> timestamp range required and call CopyTable.main(arg). Then I keep this 
> thread on sleep for 10 mins. I wanted this to be executed after every 10 mins 
> but actually after calling CopyTable first time, it executed MR job and then 
> exit. The process is not going back to the calling thread and wait for 10 
> mins and then again execute CopyTable.
>
> Code Structure :
>
> Run()
> {
> While(true){
> Get starttimestamp()
> Get endtimestamp()
> CopyTable.main(arg)
> Thread.sleep(10*60*1000)
>
> }
>
> }
>
> Please help me in running this as daemon process which will execute in every 
> 10 mins.
>
> Thanks & Regards
>
>
> ________________________________
> ::DISCLAIMER::
> -----------------------------------------------------------------------------------------------------------------------
>
> The contents of this e-mail and any attachment(s) are confidential and 
> intended for the named recipient(s) only.
> It shall not attach any liability on the originator or HCL or its affiliates. 
> Any views or opinions presented in
> this email are solely those of the author and may not necessarily reflect the 
> opinions of HCL or its affiliates.
> Any form of reproduction, dissemination, copying, disclosure, modification, 
> distribution and / or publication of
> this message without the prior written consent of the author of this e-mail 
> is strictly prohibited. If you have
> received this email in error please delete it and notify the sender 
> immediately. Before opening any mail and
> attachments please check them for viruses and defect.
>
> -----------------------------------------------------------------------------------------------------------------------
>

Reply via email to