Return-Path: X-Original-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-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 50F9310442 for ; Thu, 26 Sep 2013 14:51:53 +0000 (UTC) Received: (qmail 52173 invoked by uid 500); 26 Sep 2013 14:51:20 -0000 Delivered-To: apmail-hadoop-hdfs-user-archive@hadoop.apache.org Received: (qmail 51950 invoked by uid 500); 26 Sep 2013 14:51:16 -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 51858 invoked by uid 99); 26 Sep 2013 14:51:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Sep 2013 14:51:15 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jayunit100@gmail.com designates 209.85.215.48 as permitted sender) Received: from [209.85.215.48] (HELO mail-la0-f48.google.com) (209.85.215.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Sep 2013 14:51:08 +0000 Received: by mail-la0-f48.google.com with SMTP id er20so1040961lab.35 for ; Thu, 26 Sep 2013 07:50:48 -0700 (PDT) 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=ZFXjhx2WWLWdz7OevD6S7tR9vWa31T5kSeWHPyU9xYU=; b=KVRZugbWI12mykGxGi/ZnMasdXJUi+/6to9imD7BU4an3XrnDYFkOyKWF1pTzbF3DD /BAtF7dZy/GtW2zklvPfXiSa3jwT6alRu181o2DKDMeCtw8d9RoRBjQa1VY7tkFn4W7U O0alsOyTeI1ZxQexYodRYMHwod3UF6DjocUdiyUcweP+UQJvsKLdFI9PFCuf1FtLNKXO 8TZewX7ImZQS1CuqtB0QluuYC8rywHVd4+lMd7qznPPrjJju9HHjTYCjOkxBRBVIuZqF b03QbKWNQ1dveqZF3Sl7F2XiBLhiTJEFrldU/wc6zmYkWaWCD7OqohHQkjg3qrqgFlHL YYMQ== MIME-Version: 1.0 X-Received: by 10.152.28.7 with SMTP id x7mr1035200lag.26.1380207048332; Thu, 26 Sep 2013 07:50:48 -0700 (PDT) Received: by 10.112.126.231 with HTTP; Thu, 26 Sep 2013 07:50:48 -0700 (PDT) In-Reply-To: References: Date: Thu, 26 Sep 2013 10:50:48 -0400 Message-ID: Subject: Re: Extending DFSInputStream class From: Jay Vyas To: "common-user@hadoop.apache.org" Content-Type: multipart/alternative; boundary=089e0160bf70d51b1d04e74a7e39 X-Virus-Checked: Checked by ClamAV on apache.org --089e0160bf70d51b1d04e74a7e39 Content-Type: text/plain; charset=ISO-8859-1 The way we have gotten around this in the past is extending and then copying the private code and creating a brand new implementation. On Thu, Sep 26, 2013 at 10:50 AM, Jay Vyas wrote: > This is actually somewhat common in some of the hadoop core classes : > Private constructors and inner classes. I think in the long term jiras > should be opened for these to make them public and pluggable with public > parameterized constructors wherever possible, so that modularizations can > be provided. > > > On Thu, Sep 26, 2013 at 10:46 AM, Rob Blah wrote: > >> Hi >> >> I would like to wrap DFSInputStream by extension. However it seems that >> the DFSInputStream constructor is package private. Is there anyway to >> achieve my goal? Also just out of curiosity why you have made this class >> inaccessible for developers, or am I missing something? >> >> regards >> tmp >> > > > > -- > Jay Vyas > http://jayunit100.blogspot.com > -- Jay Vyas http://jayunit100.blogspot.com --089e0160bf70d51b1d04e74a7e39 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
The way we have gotten around this in the past is extendin= g and then copying the private code and creating a brand new implementation= .


On= Thu, Sep 26, 2013 at 10:50 AM, Jay Vyas <jayunit100@gmail.com><= /span> wrote:
This is actually somewhat c= ommon in some of the hadoop core classes : Private constructors and inner c= lasses. I think in the long term jiras should be opened for these to make t= hem public and pluggable with public parameterized constructors wherever po= ssible, so that modularizations can be provided.


On Thu, Sep 26, 2013 at 10:46 AM, Rob Blah <tmp5330@gmail= .com> wrote:
Hi

I would like to wrap DFSInputStream by extension. However it seems that= the DFSInputStream constructor is package private. Is there anyway to achi= eve my goal? Also just out of curiosity why you have made this class inacce= ssible for developers, or am I missing something?

regards
tmp



--
Jay Vyas
http://jayunit100.blogspot.com



--
Jay Vyas
http://jayunit100.blogspo= t.com
--089e0160bf70d51b1d04e74a7e39--