hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Lowe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-1984) LeveldbTimelineStore does not handle db exceptions properly
Date Fri, 25 Apr 2014 16:02:15 GMT

    [ https://issues.apache.org/jira/browse/YARN-1984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13981185#comment-13981185
] 

Jason Lowe commented on YARN-1984:
----------------------------------

Ran across this while working with leveldb as part of MAPREDUCE-5652 and YARN-1336.  There
are two DBExceptions, NativeDB.DBException and leveldb.DBException.  The former is derived
from  IOException raised by the low level JNI code, while the latter is derived from RuntimeException
and is thrown by the JniDB wrapper code.  To make matters worse, DBIterator throws _raw_ RuntimeException
rather than the runtime DBException from its methods, so database errors can leak up the stack
even if code is expecting the runtime DBException.

The timeline store should be handling the runtime exceptions and treat them like I/O errors,
at least to keep it from tearing down the deletion thread (if not other cases).

We may want to create a wrapper utility class for DBIterator in YARN as a workaround so interacting
with the database only requires handling of leveldb.DBException rather than also trying to
wrestle with the raw RuntimeExceptions from the iterator.  See the DBIterator wrapper class
in https://issues.apache.org/jira/secure/attachment/12641927/MAPREDUCE-5652-v8.patch as a
rough example.

> LeveldbTimelineStore does not handle db exceptions properly
> -----------------------------------------------------------
>
>                 Key: YARN-1984
>                 URL: https://issues.apache.org/jira/browse/YARN-1984
>             Project: Hadoop YARN
>          Issue Type: Bug
>    Affects Versions: 2.4.0
>            Reporter: Jason Lowe
>
> The org.iq80.leveldb.DB and DBIterator methods throw runtime exceptions rather than IOException
which can easily leak up the stack and kill threads (e.g.: the deletion thread).



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message