hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ferdinand Xu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-10173) ThreadLocal synchronized initialvalue() is irrelevant in JDK7
Date Wed, 01 Apr 2015 06:58:53 GMT

     [ https://issues.apache.org/jira/browse/HIVE-10173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ferdinand Xu updated HIVE-10173:
--------------------------------
    Attachment: HIVE-10173.patch

> ThreadLocal synchronized initialvalue() is irrelevant in JDK7
> -------------------------------------------------------------
>
>                 Key: HIVE-10173
>                 URL: https://issues.apache.org/jira/browse/HIVE-10173
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 1.2.0
>            Reporter: Gopal V
>            Assignee: Ferdinand Xu
>            Priority: Minor
>         Attachments: HIVE-10173.patch
>
>
> The threadlocals need not synchronize the calls to initialvalue(), since that is effectively
going to be called once per-thread in JDK7.
> The anti-pattern lives on due to a very old JDK bug - https://bugs.openjdk.java.net/browse/JDK-6550283
> {code}
> $ git grep --name-only -c "protected.*synchronized.*initialValue"
> common/src/java/org/apache/hadoop/hive/conf/LoopingByteArrayInputStream.java
> contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesInput.java
> contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesOutput.java
> contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesRecordInput.java
> contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesRecordOutput.java
> contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesWritableInput.java
> contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesWritableOutput.java
> metastore/src/java/org/apache/hadoop/hive/metastore/Deadline.java
> metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
> ql/src/java/org/apache/hadoop/hive/ql/exec/TaskFactory.java
> ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
> ql/src/java/org/apache/hadoop/hive/ql/io/IOContext.java
> ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
> ql/src/java/org/apache/hadoop/hive/ql/session/OperationLog.java
> serde/src/java/org/apache/hadoop/hive/serde2/io/TimestampWritable.java
> serde/src/test/org/apache/hadoop/hive/serde2/io/TestTimestampWritable.java
> service/src/java/org/apache/hive/service/auth/TSetIpAddressProcessor.java
> service/src/java/org/apache/hive/service/cli/session/SessionManager.java
> shims/common/src/main/java/org/apache/hadoop/hive/thrift/HadoopThriftAuthBridge.java
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message