Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 334A1DF18 for ; Fri, 24 Aug 2012 22:27:58 +0000 (UTC) Received: (qmail 85111 invoked by uid 500); 24 Aug 2012 22:27:56 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 85066 invoked by uid 500); 24 Aug 2012 22:27:56 -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 85054 invoked by uid 99); 24 Aug 2012 22:27:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Aug 2012 22:27:56 +0000 X-ASF-Spam-Status: No, hits=-0.5 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tombrown52@gmail.com designates 209.85.220.169 as permitted sender) Received: from [209.85.220.169] (HELO mail-vc0-f169.google.com) (209.85.220.169) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Aug 2012 22:27:49 +0000 Received: by vcbfl10 with SMTP id fl10so3308934vcb.14 for ; Fri, 24 Aug 2012 15:27:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=rTK6DS5J6HtrGc3z8liXP/Q9ePRW+dYFg40icLV8zQc=; b=MJQ2KVXQDFsFx/4MJnKM1m4IHkw3IngY5DEZzeEcD5ZFSZ/djUaqUUQUAV85R7F6IS uDcRUPcu5eveNdnkJCSY3G4gmhsGSS4LYGqarUb+EOsDHwoPyRUxZpdh0Phbz5ssjlXt pIAEemCthyUi660t7/KZsI97C0/DLHzhMtfcXj3wZsPkObwHih9uPtK39FLYUTZjDGTS yAaLgnpU/W4H+obyCfy/5XXPKDpUzDB7yDZCjo7ilTmqiQtPP5k0+qmEB1+R8zNOIvTr 2wJUF7f9uQLBMgAtxRGprRgSA/MrEUu47sFtLlKYOeb0blXC362y2Zkw6m1XuZqozq6m s0Dg== MIME-Version: 1.0 Received: by 10.52.36.34 with SMTP id n2mr5047155vdj.105.1345847248952; Fri, 24 Aug 2012 15:27:28 -0700 (PDT) Received: by 10.52.181.98 with HTTP; Fri, 24 Aug 2012 15:27:28 -0700 (PDT) Date: Fri, 24 Aug 2012 16:27:28 -0600 Message-ID: Subject: Coprocessor runs longer than timeout, and thread safety From: Tom Brown To: user@hbase.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org I have a custom co-processor endpoint that handles aggregation of various statistics for each region (the stats from all regions are then merged together for the final result). Sometimes the amount of data to aggregate is very large, and it takes longer than the exec timeout to completely aggregate the region. Under this scenario, the client then compounds the problem by initiating up to 10 retries. I haven't been able to find any supported APIs for getting around this, so I intend to modify my co-processor to stop itself after N seconds and include in its result the row key where it should resume. I can repeatedly invoke HTable.coprocessorExec until all of the regions report that they've finished their aggregations, but each subsequent call to HTable.coprocessorExec will hit all regions, even if they've completed their work. The only way I can see to efficiently invoke my co-processor on only the servers with work remaining is to write my own code to manage the co-processor proxy objects. I haven't found any documentation that details the thread-safety of each proxy instance, or information about which thread pool is used. Can anyone shed some light on this strategy? Perhaps you've encountered the same issue; How did you solve it? Thanks in advance! --Tom