Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CCD8B795A for ; Sat, 3 Dec 2011 06:00:49 +0000 (UTC) Received: (qmail 9457 invoked by uid 500); 3 Dec 2011 06:00:49 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 9308 invoked by uid 500); 3 Dec 2011 06:00:49 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 9181 invoked by uid 99); 3 Dec 2011 06:00:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Dec 2011 06:00:46 +0000 X-ASF-Spam-Status: No, hits=-1.2 required=5.0 tests=FRT_ADOBE2,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of adragomi@adobe.com designates 64.18.1.181 as permitted sender) Received: from [64.18.1.181] (HELO exprod6og101.obsmtp.com) (64.18.1.181) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Dec 2011 06:00:36 +0000 Received: from outbound-smtp-1.corp.adobe.com ([192.150.11.134]) by exprod6ob101.postini.com ([64.18.5.12]) with SMTP ID DSNKTtm67mPTAa12kASwNOPbyjzqRn0By/6/@postini.com; Fri, 02 Dec 2011 22:00:15 PST Received: from inner-relay-1.corp.adobe.com ([153.32.1.51]) by outbound-smtp-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id pB35wU8G023724 for ; Fri, 2 Dec 2011 21:58:30 -0800 (PST) Received: from nahub01.corp.adobe.com (nahub01.corp.adobe.com [10.8.189.97]) by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id pB360CL7026904 for ; Fri, 2 Dec 2011 22:00:13 -0800 (PST) Received: from eurcas01.eur.adobe.com (10.128.4.27) by nahub01.corp.adobe.com (10.8.189.97) with Microsoft SMTP Server (TLS) id 8.3.192.1; Fri, 2 Dec 2011 22:00:12 -0800 Received: from eurmbx01.eur.adobe.com ([10.128.4.32]) by eurcas01.eur.adobe.com ([10.128.4.27]) with mapi; Sat, 3 Dec 2011 06:00:10 +0000 From: Andrei Dragomir To: "dev@hbase.apache.org" Date: Sat, 3 Dec 2011 06:00:06 +0000 Subject: Re: Coprocessors dynamic jar loading and coprocessorExec Thread-Topic: Coprocessors dynamic jar loading and coprocessorExec Thread-Index: AcyxgNDvNdB+l33jTOiEzYnaDK8C6g== Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.13.0.110805 acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Yup, 0.92. However, I don't think it is linked to setting it from the shell, or programmatically from java code (new HtableDescriptor....). I am using a dynamically loaded coprocessor though, from HDFS. The problem seems to be that the coprocessor protocol that I am using is not available in the RPC server when deserializing the call. It does get loaded in the RegionCoprocessorHost, and I fixed it by making a small patch that passes the coprocessor full class name as String, and let it be resolved in the Region exec call. Thanks,=20 Andrei.=20 On 12/2/11 8:42 PM, "Ted Yu" wrote: >Andrei: >Setting a table coprocessor from the shell is a new feature. >Are you using 0.92 ? > >You are welcome to create a JIRA and publish your patch. >On Fri, Dec 2, 2011 at 5:06 PM, Andrei Dragomir >wrote: > >> I'm running into a bit of an issue with table coprocessors loaded >> dynamically. >> >> I'm setting a table coprocessor from the shell (dynamic loading), >> everything works fine. The coprocessor is not a RegionObserver / >> WALObserver, it just has a custom method. >> >> I see in the logs the coprocessor class being loaded correctly, it is >> displayed in the web interface, everything seems to be fine. >> >> When I try to call the custom method, the call throws an error. I >>tracked >> it down to o.a.h.h.client.coprocessor.Exec, which tries to "eagerly" >> deserialize the call. The problem is that in the context where the Exec >> call is running, there is no coprocessor protocol class loaded (it's >> dynamic, not from the configuration), so the call to get the class >>fails: >> >> protocol =3D=20 >>(Class)conf.getClassByName(protocolName); >> >> I'm just trying to understand whether this is by design, or if it's a >> missing feature. >> I have a patch that passes the coprocessor class as String, and the >>actual >> instantiation is done in the HRegion instance, where we actually have >>the >> coprocessor class. I can create an issue and attach it. >> >> Thanks, >> Andrei. >> >>