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 BD5D9200CB4 for ; Tue, 27 Jun 2017 15:12:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id BBD9A160BE9; Tue, 27 Jun 2017 13:12:23 +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 0E272160BDC for ; Tue, 27 Jun 2017 15:12:22 +0200 (CEST) Received: (qmail 71089 invoked by uid 500); 27 Jun 2017 13:12:21 -0000 Mailing-List: contact dev-help@arrow.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@arrow.apache.org Delivered-To: mailing list dev@arrow.apache.org Received: (qmail 71078 invoked by uid 99); 27 Jun 2017 13:12:21 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jun 2017 13:12:21 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 4922EC00A9 for ; Tue, 27 Jun 2017 13:12:21 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1 X-Spam-Level: * X-Spam-Status: No, score=1 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 7l-ab6JJPNRC for ; Tue, 27 Jun 2017 13:12:17 +0000 (UTC) Received: from newmail.ccri.com (50-205-35-98-static.hfc.comcastbusiness.net [50.205.35.98]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 30A175F3FF for ; Tue, 27 Jun 2017 13:12:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by newmail.ccri.com (Postfix) with ESMTP id 50805B3FA426 for ; Tue, 27 Jun 2017 09:12:09 -0400 (EDT) X-Virus-Scanned: amavisd-new at ccri.com Received: from newmail.ccri.com ([127.0.0.1]) by localhost (newmail.ccri.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id tg3rurfbuk2S for ; Tue, 27 Jun 2017 09:12:09 -0400 (EDT) Received: from [192.168.200.2] (unknown [192.168.200.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by newmail.ccri.com (Postfix) with ESMTPSA id 2A188B204CB7 for ; Tue, 27 Jun 2017 09:12:09 -0400 (EDT) Subject: Re: [Java] Best Practice to use/manage Allocator To: dev@arrow.apache.org References: From: Emilio Lahr-Vivaz Message-ID: Date: Tue, 27 Jun 2017 09:12:08 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US archived-at: Tue, 27 Jun 2017 13:12:23 -0000 I'm also curious. For reference, I've been using a global RootAllocator instance shared among all my classes. For unit tests, I've been creating one per test to ensure that things are being closed correctly. Thanks, Emilio On 06/27/2017 08:15 AM, Li Jin wrote: > Still wondering if anyone can give some guidance? > > On Thu, Jun 22, 2017 at 10:19 AM, Li Jin wrote: > >> Hello, >> >> I am writing some code that interacts with the Arrow Java library in >> Apache Spark and trying to understand the best way to use/manage buffer >> allocators. I am wondering: >> >> (1) Is buffer allocator thread safe? >> (2) Should I create a root allocator (maybe one per jvm?) to allocate all >> memory? >> >> Thanks, >> Li >>