Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5E5B1200B4C for ; Fri, 22 Jul 2016 10:17:29 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5CF35160A77; Fri, 22 Jul 2016 08:17:29 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A4A02160A5A for ; Fri, 22 Jul 2016 10:17:28 +0200 (CEST) Received: (qmail 98491 invoked by uid 500); 22 Jul 2016 08:17:27 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 98480 invoked by uid 99); 22 Jul 2016 08:17:27 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jul 2016 08:17:27 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 75D12185806 for ; Fri, 22 Jul 2016 08:17:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.298 X-Spam-Level: * X-Spam-Status: No, score=1.298 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id pzjNkrcWswNv for ; Fri, 22 Jul 2016 08:17:18 +0000 (UTC) Received: from cn01-BJB-obe.outbound.protection.partner.outlook.cn (mail-bjbop0214.outbound.protection.partner.outlook.cn [42.159.33.214]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 6382B5FBB5 for ; Fri, 22 Jul 2016 08:13:09 +0000 (UTC) Received: from SHAPR01MB159.CHNPR01.prod.partner.outlook.cn (10.41.246.145) by SHAPR01MB157.CHNPR01.prod.partner.outlook.cn (10.41.246.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.544.10; Fri, 22 Jul 2016 08:12:48 +0000 Received: from SHAPR01MB159.CHNPR01.prod.partner.outlook.cn ([10.41.246.145]) by SHAPR01MB159.CHNPR01.prod.partner.outlook.cn ([10.41.246.145]) with mapi id 15.01.0544.010; Fri, 22 Jul 2016 08:12:48 +0000 From: "Ma, Sheng-Chen (Aven)" To: "user@hbase.apache.org" Subject: how to Dynamic load of Coprocessors Thread-Topic: how to Dynamic load of Coprocessors Thread-Index: AdHj71SQcgnH+05bTjucvliq2QJjUQ== Date: Fri, 22 Jul 2016 08:12:48 +0000 Message-ID: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shengchen.ma@esgyn.cn; x-originating-ip: [140.207.169.42] x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SHAPR01MB157; x-exchange-antispam-report-cfa: BCL:0;PCL:0;RULEID:;SRVR:SHAPR01MB157;BCL:0;PCL:0;RULEID:;SRVR:SHAPR01MB157; x-forefront-prvs: 0011612A55 x-forefront-antispam-report: =?us-ascii?Q?SFV:NSPM;SFS:(10009020)(6009001)(7916002)(329002)(328002)(18?= =?us-ascii?Q?9002)(199002)(53754006)(51856002)(19300405004)(77096005)(498?= =?us-ascii?Q?66002)(189998001)(5002640100001)(65816002)(63696004)(5976600?= =?us-ascii?Q?2)(47976003)(56776002)(47736002)(54316003)(8936002)(19580395?= =?us-ascii?Q?003)(56816005)(15975445007)(1730700003)(86362001)(50986002)(?= =?us-ascii?Q?90146001)(81156014)(3660700001)(8676002)(2351001)(229853001)?= =?us-ascii?Q?(66066001)(53806002)(450100001)(69226001)(9686002)(54356002)?= =?us-ascii?Q?(47446003)(81612004)(16236675004)(19625215002)(106356001)(76?= =?us-ascii?Q?786001)(81816001)(105586002)(98676001)(74876001)(87266001)(5?= =?us-ascii?Q?86003)(93136001)(94316002)(74366001)(81686001)(76176001)(250?= =?us-ascii?Q?1003)(76796001)(74706001)(3280700002)(101416001)(2900100001)?= =?us-ascii?Q?(6116002)(97336001)(790700001)(102836003)(97186001)(68736007?= =?us-ascii?Q?)(107886002)(110136002)(3846002)(74482002)(10400500002)(9541?= =?us-ascii?Q?6001)(7846002)(97736004)(93516002)(33656002)(92566002)(87936?= =?us-ascii?Q?001)(11100500001)(94946001)(7736002)(5003600100003)(7696003)?= =?us-ascii?Q?;DIR:OUT;SFP:1101;SCL:1;SRVR:SHAPR01MB157;H:SHAPR01MB159.CHN?= =?us-ascii?Q?PR01.prod.partner.outlook.cn;FPR:;SPF:None;PTR:InfoNoRecords?= =?us-ascii?Q?;MX:1;LANG:en;?= received-spf: None (protection.outlook.com: esgyn.cn does not designate permitted sender hosts) Content-Type: multipart/alternative; boundary="_000_SHAPR01MB1594E76DCE247927C2773AFEA0A0SHAPR01MB159CHNPR0_" MIME-Version: 1.0 X-OriginatorOrg: esgyn.cn X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jul 2016 08:12:48.4004 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8bf80453-2b55-4b23-a365-dc866d5806aa X-MS-Exchange-Transport-CrossTenantHeadersStamped: SHAPR01MB157 archived-at: Fri, 22 Jul 2016 08:17:29 -0000 --_000_SHAPR01MB1594E76DCE247927C2773AFEA0A0SHAPR01MB159CHNPR0_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi all: I want to dynamic add coprocessor in order to not restart hbase. Following is my code: Path path =3D new Path("/coprocessor_jars"); FileSystem fs =3D FileSystem.get(conf); FileStatus[] status =3D fs.listStatus(path); Path[] listedPaths =3D FileUtil.stat2Paths(status); for (Path p : listedPaths) { if(p.getName().contains("test.jar")){ hdfsPath =3D p; } } HBaseAdmin hadmin =3D new HBaseAdmin(conf); HTableDescriptor tableDesc =3D hadmin.getTableDescriptor("testTbl".= getBytes()); tableDesc.addCoprocessor("org.apache.hadoop.hbase.coprocessor.trans= actional.TestRegionEndpoint", hdfsPath, Coprocessor.PRIORITY_USER, null); // tableDesc.removeCoprocessor("org.apache.hadoop.hbase.coprocessor= .transactional.TrxRegionEndpoint"); for (Entry entry : = tableDesc.getValues().entrySet()) { System.out.println(Bytes.toString(entry.getKey().get()) + " =3D= " + Bytes.toString(entry.getValue().get())); } hadmin.disableTable("testTbl".getBytes()); hadmin.modifyTable("testTbl", tableDesc); hadmin.enableTable("testTbl"); the syso print : coprocessor$1 =3D hdfs://192.168.0.17:17400/coprocessor_ja= rs/test.jar|org.apache.hadoop.hbase.coprocessor.transactional.TestRegionEnd= point|1073741823| and the remote side return Exception: org.apache.hadoop.hbase.DoNotRetryIOException: org.apache.hadoop.hbase.DoNo= tRetryIOException: Class org.apache.hadoop.hbase.coprocessor.transactional.= TestRegionEndpoint cannot be loaded Set hbase.table.sanity.checks to false = at conf or table descriptor if you want to bypass sanity checks I use hbase 1.2 and the test.jar is not under hbase/lib, I just put the tes= t.jar in hdfs. If I add test.jar to hbase/lib but not restart hbase, the upon code still t= hrow same exception. If I add test.jar to hbase/lib and restart hbase, the upon code will exec s= uccessful. But my requirement is not restart hbase. Is there someone can give me a favor. Thanks --_000_SHAPR01MB1594E76DCE247927C2773AFEA0A0SHAPR01MB159CHNPR0_--