Return-Path: X-Original-To: apmail-drill-dev-archive@www.apache.org Delivered-To: apmail-drill-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 55AB2182D3 for ; Tue, 30 Jun 2015 19:06:58 +0000 (UTC) Received: (qmail 2089 invoked by uid 500); 30 Jun 2015 19:06:58 -0000 Delivered-To: apmail-drill-dev-archive@drill.apache.org Received: (qmail 2037 invoked by uid 500); 30 Jun 2015 19:06:58 -0000 Mailing-List: contact dev-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list dev@drill.apache.org Received: (qmail 2020 invoked by uid 99); 30 Jun 2015 19:06:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jun 2015 19:06:57 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=HTML_IMAGE_ONLY_20,HTML_MESSAGE,HTML_SHORT_LINK_IMG_3,RCVD_IN_DNSWL_LOW,SPF_PASS,T_REMOTE_IMAGE X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of adeneche@maprtech.com designates 209.85.160.177 as permitted sender) Received: from [209.85.160.177] (HELO mail-yk0-f177.google.com) (209.85.160.177) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jun 2015 19:04:43 +0000 Received: by ykdy1 with SMTP id y1so18045915ykd.2 for ; Tue, 30 Jun 2015 12:06:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maprtech.com; s=google; h=mime-version:date:message-id:subject:from:to:content-type; bh=+834ph70VzPtmYXyCveG5A23liMEgHOys2fnAq1WKEs=; b=O51ZsvD5JbZVj6vCP9pyUIuj3QXEZktmqTVtA3DD0N9HoPNVhufBiJh0oGjLJsLGZc z3RXOeZix9SvrP0sZ/DaV0OonLlDnm0xqIzC6UmRPEn4DBCkVQOVzrkVrl4oacbJnrZ6 p/36DqZBx/8GAEVmxDE9sT7pkVLew5nMAuz7s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=+834ph70VzPtmYXyCveG5A23liMEgHOys2fnAq1WKEs=; b=BmCn5WJkcfb6KTEBRWE4yxBWZQ4ak9CnbuxJjSV+wGpVh0eCOdfujo5AeEinBbz7Kx N/Kh9VAIReWjDcmqRUONOV4ig1uzKEnqr7IZXRLdpJx/yHHn85N7rNReM+oA5Z5D910J Eft82/sfEligMX4PEViwFTY4/+ITyb6reaFgv09UNofrsQFBPLs+roLyEuP6Gis7WlXs QWXo2UaKDdOJJ2srEnvL2lfQPgr9k9gkgSJ/P1qvttBZ9Dj59JdpEOhxPL1e5RkSQUol jj8t8GZSn2SKQxW72pOfwAQZKwmnLmGPrYcfwX3YJKGPxktnaGG8NcjUnWG5QalbGJcX imGw== X-Gm-Message-State: ALoCoQm8hYUOhQstwd6aGWGjnGBwA/iF17AQgesrIVIaPQuNBZ+y3CTeKBbAYOjzkiovSqdkCvpq MIME-Version: 1.0 X-Received: by 10.170.159.85 with SMTP id a82mr27501043ykd.58.1435691191073; Tue, 30 Jun 2015 12:06:31 -0700 (PDT) Received: by 10.129.95.136 with HTTP; Tue, 30 Jun 2015 12:06:31 -0700 (PDT) Date: Tue, 30 Jun 2015 12:06:31 -0700 Message-ID: Subject: [DISCUSSION] should BufferAllocator.buffer() throw an OutOfMemoryException ? From: Abdel Hakim Deneche To: "dev@drill.apache.org" Content-Type: multipart/alternative; boundary=001a113a724273b3c60519c0e7ca X-Virus-Checked: Checked by ClamAV on apache.org --001a113a724273b3c60519c0e7ca Content-Type: text/plain; charset=UTF-8 our current implementations of BufferAllocator.buffer(int, int) returns null when it cannot allocate the buffer. But looking through the code, there are many places that don't check if the allocated buffer is null before trying to access it which will throw a NullPointerException. ValueVectors' allocateNewSafe() seem to be the only place that handle the null in a specific manner. Should we update the allocators' implementation to throw an OutOfMemoryRuntimeException instead of returning null ? this has the added benefit of displaying a proper out of memory error message to the user. Thanks! -- Abdelhakim Deneche Software Engineer Now Available - Free Hadoop On-Demand Training --001a113a724273b3c60519c0e7ca--