You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Yiping Han <yh...@yahoo-inc.com> on 2010/01/22 10:50:38 UTC
How to timeout HFDS commands
Hi all,
I'm using org.apache.hadoop.fs.FileSystem in my code for some HDFS
operations. I would like to timeout and abort the operation if it takes too
long (for example, copyFromLocal of a huge file). What is the best way to do
this?
Thanks~
--Yiping
Re: How to timeout HFDS commands
Posted by Yiping Han <yh...@yahoo-inc.com>.
Yeah, ok, that's the way we know. I just want to see if there's any other
way to do it. :-)
Thanks~
On 1/22/10 6:40 PM, "Jeff Zhang" <zj...@gmail.com> wrote:
> Then you can put the HDFS operation in one thread, and kill the thread if
> you want to it timeout
>
>
>
> On Fri, Jan 22, 2010 at 6:37 PM, Yiping Han <yh...@yahoo-inc.com> wrote:
>
>> No, I mean in java program.
>>
>> Thanks~
>> -- Yiping
>>
>>
>> On 1/22/10 6:32 PM, "Jeff Zhang" <zj...@gmail.com> wrote:
>>
>>> Try Ctrl+C
>>>
>>>
>>> On Fri, Jan 22, 2010 at 5:50 PM, Yiping Han <yh...@yahoo-inc.com> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I'm using org.apache.hadoop.fs.FileSystem in my code for some HDFS
>>>> operations. I would like to timeout and abort the operation if it takes
>> too
>>>> long (for example, copyFromLocal of a huge file). What is the best way
>> to
>>>> do
>>>> this?
>>>>
>>>>
>>>> Thanks~
>>>> --Yiping
>>>>
>>>>
>>>
>>
>> ----------------------
>> Yiping Han
>> yhan@yahoo-inc.com
>> US phone: +1(408)349-4403
>> Beijing phone: +86(10)8215-9357
>>
>>
>
----------------------
Yiping Han
yhan@yahoo-inc.com
US phone: +1(408)349-4403
Beijing phone: +86(10)8215-9357
Re: How to timeout HFDS commands
Posted by Jeff Zhang <zj...@gmail.com>.
Then you can put the HDFS operation in one thread, and kill the thread if
you want to it timeout
On Fri, Jan 22, 2010 at 6:37 PM, Yiping Han <yh...@yahoo-inc.com> wrote:
> No, I mean in java program.
>
> Thanks~
> -- Yiping
>
>
> On 1/22/10 6:32 PM, "Jeff Zhang" <zj...@gmail.com> wrote:
>
> > Try Ctrl+C
> >
> >
> > On Fri, Jan 22, 2010 at 5:50 PM, Yiping Han <yh...@yahoo-inc.com> wrote:
> >
> >> Hi all,
> >>
> >> I'm using org.apache.hadoop.fs.FileSystem in my code for some HDFS
> >> operations. I would like to timeout and abort the operation if it takes
> too
> >> long (for example, copyFromLocal of a huge file). What is the best way
> to
> >> do
> >> this?
> >>
> >>
> >> Thanks~
> >> --Yiping
> >>
> >>
> >
>
> ----------------------
> Yiping Han
> yhan@yahoo-inc.com
> US phone: +1(408)349-4403
> Beijing phone: +86(10)8215-9357
>
>
--
Best Regards
Jeff Zhang
Re: How to timeout HFDS commands
Posted by Yiping Han <yh...@yahoo-inc.com>.
No, I mean in java program.
Thanks~
-- Yiping
On 1/22/10 6:32 PM, "Jeff Zhang" <zj...@gmail.com> wrote:
> Try Ctrl+C
>
>
> On Fri, Jan 22, 2010 at 5:50 PM, Yiping Han <yh...@yahoo-inc.com> wrote:
>
>> Hi all,
>>
>> I'm using org.apache.hadoop.fs.FileSystem in my code for some HDFS
>> operations. I would like to timeout and abort the operation if it takes too
>> long (for example, copyFromLocal of a huge file). What is the best way to
>> do
>> this?
>>
>>
>> Thanks~
>> --Yiping
>>
>>
>
----------------------
Yiping Han
yhan@yahoo-inc.com
US phone: +1(408)349-4403
Beijing phone: +86(10)8215-9357
Re: How to timeout HFDS commands
Posted by Jeff Zhang <zj...@gmail.com>.
Try Ctrl+C
On Fri, Jan 22, 2010 at 5:50 PM, Yiping Han <yh...@yahoo-inc.com> wrote:
> Hi all,
>
> I'm using org.apache.hadoop.fs.FileSystem in my code for some HDFS
> operations. I would like to timeout and abort the operation if it takes too
> long (for example, copyFromLocal of a huge file). What is the best way to
> do
> this?
>
>
> Thanks~
> --Yiping
>
>
--
Best Regards
Jeff Zhang