You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/12/02 04:38:37 UTC

[GitHub] [hive] dengzhhu653 commented on pull request #2808: HIVE-25729: ThriftUnionObjectInspector should be notified when fully …

dengzhhu653 commented on pull request #2808:
URL: https://github.com/apache/hive/pull/2808#issuecomment-984286215


   > Sorry @dengzhhu653 , was on vacation. Can you add some details on why this change is necessary? thanks.
   
   Thank you for the feedback. [HIVE-11586](https://issues.apache.org/jira/browse/HIVE-11586) has solved the problem that a uninitialized instance of ReflectionStructObjectInspector may be returned in case of multi threads trying to get it, npe would be thrown if we refer to some fields of the inspector. In order to make true that the ReflectionStructObjectInspector is fully inited, [others may wait for up to 3 seconds](https://github.com/apache/hive/blob/master/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorFactory.java#L106-L121).  The [ThriftStructObjectInspector](https://github.com/apache/hive/blob/7b3ecf617a6d46f48a3b6f77e0339fd4ad95a420/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ReflectionStructObjectInspector.java#L165-L178) will notify the monitor on finishing initialization, but [ThriftUnionObjectInspector](https://github.com/apache/hive/blob/master/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ThriftUnionObjectIn
 spector.java#L95-L104) misses to do this in his own overriden `init` method.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org