Return-Path: X-Original-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 70AFA9D30 for ; Wed, 8 Feb 2012 15:06:40 +0000 (UTC) Received: (qmail 14543 invoked by uid 500); 8 Feb 2012 15:06:40 -0000 Delivered-To: apmail-hadoop-hdfs-dev-archive@hadoop.apache.org Received: (qmail 14430 invoked by uid 500); 8 Feb 2012 15:06:39 -0000 Mailing-List: contact hdfs-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-dev@hadoop.apache.org Delivered-To: mailing list hdfs-dev@hadoop.apache.org Received: (qmail 14422 invoked by uid 99); 8 Feb 2012 15:06:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Feb 2012 15:06:39 +0000 X-ASF-Spam-Status: No, hits=-1.6 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [192.6.10.60] (HELO tobor.hpl.hp.com) (192.6.10.60) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Feb 2012 15:06:29 +0000 Received: from localhost (localhost [127.0.0.1]) by tobor.hpl.hp.com (Postfix) with ESMTP id DDB76B7CDA for ; Wed, 8 Feb 2012 15:06:07 +0000 (GMT) X-Virus-Scanned: amavisd-new at hplb.hpl.hp.com Received: from tobor.hpl.hp.com ([127.0.0.1]) by localhost (tobor.hpl.hp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id qFUpBRa8GQ8G for ; Wed, 8 Feb 2012 15:06:07 +0000 (GMT) Received: from 0-imap-br1.hpl.hp.com (0-imap-br1.hpl.hp.com [16.25.144.60]) by tobor.hpl.hp.com (Postfix) with ESMTP id 1E134B7CD8 for ; Wed, 8 Feb 2012 15:06:06 +0000 (GMT) Received: from [16.25.175.86] (wildhaus.hpl.hp.com [16.25.175.86]) by 0-imap-br1.hpl.hp.com (8.14.1/8.13.4) with ESMTP id q18F668e005746 for ; Wed, 8 Feb 2012 15:06:06 GMT Message-ID: <4F328F5E.7090006@apache.org> Date: Wed, 08 Feb 2012 15:06:06 +0000 From: Steve Loughran User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Thunderbird/3.1.16 MIME-Version: 1.0 To: hdfs-dev@hadoop.apache.org Subject: Re: [PROPOSAL] Hadoop OSGi compliant and Apache Karaf features References: <4F3285F1.2000704@nanthrax.net> In-Reply-To: <4F3285F1.2000704@nanthrax.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org On 08/02/12 14:25, Jean-Baptiste Onofr� wrote: > Hi folks, > > I'm working right now to turn Hadoop as an OSGi compliant set of modules. > > I've more or less achieved the first step: > - turn all Hadoop modules (common, annotations, hdfs, mapreduce, etc) as > OSGi bundle > - provide a Karaf features descriptor to easily deploy it into Apache > Karaf OSGi container > > I will upload the patches on the different Jira related to that. > > The second step that I propose is to introduce blueprint descriptor in > order to expose some Hadoop features as OSGi services. > It won't affect the "non-OSGi" users but give lot of fun and interest > for OSGi users ;) > Zookeeper would be nice too, as you could bring up a very small cluster As I mentioned in one of the JIRA comments -there are a lot of calls to System.exit() in Hadoop when it isn't happy, you need a security manager to catch them and turn them into exceptions -and no, the code doesn't expect exceptions everywhere. -There are a lot of assumptions that every service (namenode, datanode, etc) is running in its own VM, with its own singletons. They will all need their own classloaders, which implies separate OSGi bundles for each public service. YARN is even more interesting, as it works by deploying the application master (such as the MR engine) on request, picking a suitable node and executing the entry point with a classpath (somehow) set up. If you are going to work with trunk you will need to address this, the simplest tactic being "don't try and run YARN-based services under OSGi, just the YARN Resource Manager and Node Managers itself"; A more advanced options "support OSGi-based YARN services specially", would also be good if it could start both Application Masters and their container applications themselves (Task Trackers &c), and aided the execution of things like actual tasks within the OSGi container (for speed). If you are looking a production use of this stuff, you'll need to worry about loading of the native libraries too. Otherwise this becomes more restricted to experimental-small-machine setups.