[
https://issues.apache.org/jira/browse/HCATALOG-627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13651880#comment-13651880
]
Hudson commented on HCATALOG-627:
---------------------------------
Integrated in Hive-trunk-h0.21 #2091 (See
[https://builds.apache.org/job/Hive-trunk-h0.21/2091/])
HCATALOG-627 - Adding thread-safety to NotificationListener. (amalakar via
mithun) (Revision 1480128)
Result = FAILURE
mithun : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1480128
Files :
*
/hive/trunk/hcatalog/server-extensions/src/main/java/org/apache/hcatalog/listener/NotificationListener.java
> NotificationListener is not thread safe
> ---------------------------------------
>
> Key: HCATALOG-627
> URL: https://issues.apache.org/jira/browse/HCATALOG-627
> Project: HCatalog
> Issue Type: Bug
> Affects Versions: 0.4, 0.5, 0.6
> Reporter: Arup Malakar
> Assignee: Arup Malakar
> Fix For: hive-0.11
>
> Attachments: HCATALOG-627-branch-0.5-0.patch,
> HCATALOG-627-branch-0.5-1.patch, HCATALOG-627-branch-0.5-2.patch,
> HCATALOG-627-branch-0.5-3.patch, HCATALOG-627-trunk-0.patch,
> HCATALOG-627-trunk-1.patch, HCATALOG-627-trunk-2.patch,
> HCATALOG-627-trunk-3.patch
>
>
> From the code in
> [HiveMetaStore|http://svn.apache.org/repos/asf/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java]
> it appears that only one instance of the provided listener is created which
> then gets used by the thread pool. But the methods in the
> NotificationListnener in HCatalog is not threadsafe. For example according to
> JMS api documentation a Connection object can be shared among threads, but
> the [Session|http://docs.oracle.com/javaee/1.4/api/javax/jms/Session.html]
> [1] object should be specific to a thread.
> | A Session object is a single-threaded context for producing and consuming
> messages. Although it may allocate provider resources outside the Java
> virtual machine (JVM), it is considered a lightweight JMS object.
> But NotificationListener has only one session object which gets shared among
> threads. While testing I have observed cases where messages were getting
> drooped, using a ThreadLocal Session solved the problem for me. But I am
> interested in knowing if anyone else has seen dropped messages.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira