[
https://issues.apache.org/jira/browse/KYLIN-2429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shaofeng SHI resolved KYLIN-2429.
---------------------------------
Resolution: Fixed
> Variable initialized should be declared volatile in
> SparkCubingByLayer#execute()
> --------------------------------------------------------------------------------
>
> Key: KYLIN-2429
> URL: https://issues.apache.org/jira/browse/KYLIN-2429
> Project: Kylin
> Issue Type: Bug
> Affects Versions: v2.0.0
> Reporter: Ted Yu
> Assignee: Shaofeng SHI
> Fix For: v2.0.0
>
>
> {code}
> final JavaPairRDD<ByteArray, Object[]> encodedBaseRDD =
> intermediateTable.javaRDD().mapToPair(new PairFunction<Row, ByteArray,
> Object[]>() {
> transient boolean initialized = false;
> ...
> public Tuple2<ByteArray, Object[]> call(Row row) throws Exception
> {
> if (initialized == false) {
> synchronized (SparkCubingByLayer.class) {
> if (initialized == false) {
> {code}
> For double checked locking to work, initialized needs to be volatile.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)