[
https://issues.apache.org/jira/browse/HBASE-16179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16388101#comment-16388101
]
Imran Rashid commented on HBASE-16179:
--------------------------------------
haven't actually tested anything, but I think you probably just need to rename
"conf" so it doesn't conflict with the method in RDD. "_conf" might work ...
but you might get some error about it conflicting with NewHadoopRDD, so maybe
even "__conf".
Though more likely, it doesn't need to be a `val` at all -- the `val` makes it
a member of the class in addition to just an argument to the constructor
(though there is some weird scala magic which can also auto-promote a
constructor argument to a member). Really I don't think you should need
{{@transient}} at all, since those constructor arguments shouldn't become
member variables ... but you may need to to use {{javap}} to confirm this. If
you really need to stick an {{@transient}} on there, I think there is a
description here:
https://stackoverflow.com/a/3769796/1442961
though annoyingly its changed from scala 2.11 to 2.12
here are the 2.12 docs
http://www.scala-lang.org/api/2.12.4/scala/annotation/meta/index.html
but again, I think the best thing to do is (1) don't make it a member variable
at all or (2) give it a unique name as a {{@transient private val}}.
> Fix compilation errors when building hbase-spark against Spark 2.0
> ------------------------------------------------------------------
>
> Key: HBASE-16179
> URL: https://issues.apache.org/jira/browse/HBASE-16179
> Project: HBase
> Issue Type: Bug
> Components: spark
> Reporter: Ted Yu
> Assignee: Ted Yu
> Priority: Critical
> Labels: build
> Fix For: 3.0.0
>
> Attachments: 16179.v0.txt, 16179.v1.txt, 16179.v1.txt, 16179.v10.txt,
> 16179.v11.txt, 16179.v12.txt, 16179.v12.txt, 16179.v12.txt, 16179.v13.txt,
> 16179.v15.txt, 16179.v16.txt, 16179.v18.txt, 16179.v19.txt, 16179.v19.txt,
> 16179.v20.txt, 16179.v22.txt, 16179.v23.txt, 16179.v24.txt, 16179.v25.txt,
> 16179.v26.txt, 16179.v27.txt, 16179.v28.txt, 16179.v28.txt, 16179.v29.txt,
> 16179.v30.txt, 16179.v31.txt, 16179.v32.txt, 16179.v33.txt, 16179.v34.txt,
> 16179.v4.txt, 16179.v5.txt, 16179.v7.txt, 16179.v8.txt, 16179.v9.txt,
> HBASE-16179.v29.patch
>
>
> I tried building hbase-spark module against Spark-2.0 snapshot and got the
> following compilation errors:
> http://pastebin.com/bg3w247a
> Some Spark classes such as DataTypeParser and Logging are no longer
> accessible to downstream projects.
> hbase-spark module should not depend on such classes.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)