Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 27F1310AFC for ; Tue, 21 Jan 2014 22:59:08 +0000 (UTC) Received: (qmail 19399 invoked by uid 500); 21 Jan 2014 22:59:01 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 19312 invoked by uid 500); 21 Jan 2014 22:59:00 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 19305 invoked by uid 99); 21 Jan 2014 22:59:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jan 2014 22:59:00 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of oleg.zhurakousky@gmail.com designates 74.125.82.177 as permitted sender) Received: from [74.125.82.177] (HELO mail-we0-f177.google.com) (74.125.82.177) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jan 2014 22:58:55 +0000 Received: by mail-we0-f177.google.com with SMTP id x55so8387674wes.8 for ; Tue, 21 Jan 2014 14:58:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=vOwUqv+4eUC5EUbYf/be/0QGXBfhGp7RrDWUoMq8SfA=; b=wGXbnlPMPQMd686ZcQ8GD5tJQVHSy3YyaSt1s2CLdc2L//UlDo5Fb6hWGWKzUgn5wX K/mxjs+f0uK5W96OJ5gfPeY918QFCCoXgTfaY2iFfzPt/yWyZpQQu9zLfFu10oJdRm+b Qwnpd7zGQQfgSH2qR//KFymC0mYyPYL0PxU3YVJpgKVKG7NHsqSgnE/YbTBZhCRzl8PG e9cTfO1z6ApBQ/2DcaZxftuSsH0zmd76Wi3JX45wMVa4WWb5ElaQWPynfmbZiClm/nMJ tpA7uTNY1/25ZD5ZRQr6QWVPG6ToCtbkmPYgdCbSgdRaq2d6Q4VTscsBYu6PT2V+fze8 hOOQ== MIME-Version: 1.0 X-Received: by 10.180.24.134 with SMTP id u6mr16554550wif.53.1390345114192; Tue, 21 Jan 2014 14:58:34 -0800 (PST) Received: by 10.180.73.83 with HTTP; Tue, 21 Jan 2014 14:58:34 -0800 (PST) In-Reply-To: References: <52DE4DB2.5000008@gmail.com> Date: Tue, 21 Jan 2014 17:58:34 -0500 Message-ID: Subject: Re: Shutdown hook for FileSystems From: Oleg Zhurakousky To: user@hadoop.apache.org Content-Type: multipart/alternative; boundary=f46d0444e81fa5925a04f082f241 X-Virus-Checked: Checked by ClamAV on apache.org --f46d0444e81fa5925a04f082f241 Content-Type: text/plain; charset=ISO-8859-1 No, all I do is have my own shutdown hook in the main which closes the FSDataOutputStream. Before I did that it would throw an ugly exception when I hit Ctrl+C, telling me that the stream is already closed, because of this shutdown hook (bad design on the hadoop part), so removing it keeps it open until the client's shutdown hook will close it at due time. So now it shuts down gracefully and under complete control of the client. On Tue, Jan 21, 2014 at 12:30 PM, Jay Vyas wrote: > what is happening when you remove the shutdown hook ? is that supposed > to trigger an exception - > --f46d0444e81fa5925a04f082f241 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
No, all I do is have my own shutdown hook in the main whic= h closes the FSDataOutputStream. Before I did that it would throw an ugly e= xception when I hit Ctrl+C, telling me that the stream is already closed, b= ecause of this shutdown hook (bad design on the hadoop part), so removing i= t keeps it open until the client's shutdown hook will close it at due t= ime. So now it shuts down gracefully and under complete control of the clie= nt.=A0


On Tue, Jan 2= 1, 2014 at 12:30 PM, Jay Vyas <jayunit100@gmail.com> wrot= e:
what is happening when you = remove the shutdown hook ?=A0=A0=A0 is that supposed to=A0 trigger an excep= tion -

--f46d0444e81fa5925a04f082f241--