drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abdel Hakim Deneche <adene...@maprtech.com>
Subject [DISCUSSION] should BufferAllocator.buffer() throw an OutOfMemoryException ?
Date Tue, 30 Jun 2015 19:06:31 GMT
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

  <http://www.mapr.com/>


Now Available - Free Hadoop On-Demand Training
<http://www.mapr.com/training?utm_source=Email&utm_medium=Signature&utm_campaign=Free%20available>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message