I wouldn't bother with a daemon process. It's more to monitor. I'd
recommend cron or oozie if you want to change the host the code runs
on.

-Joey

On Fri, Sep 16, 2011 at 1:30 AM, Stuti Awasthi <[email protected]> wrote:
> Hi Jean,
>
> I can cron it but I wanted to do something similar as we run other Hadoop 
> daemons as Namenode, datanode etc. Wondering if we can get this working 
> programmatically.
> Any suggestions
>
> Thanks
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of Jean-Daniel 
> Cryans
> Sent: Friday, September 16, 2011 4:27 AM
> To: [email protected]
> Subject: Re: Issues in Scheduling CopyTable from java.
>
> 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.
>>
>> ----------------------------------------------------------------------
>> -------------------------------------------------
>>
>



-- 
Joseph Echeverria
Cloudera, Inc.
443.305.9434

Reply via email to