Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visibility from Java, jrdd has private access in AvroGenomicRDD #1538

Closed
heuermh opened this issue May 18, 2017 · 4 comments
Closed

Visibility from Java, jrdd has private access in AvroGenomicRDD #1538

heuermh opened this issue May 18, 2017 · 4 comments
Milestone

Comments

@heuermh
Copy link
Member

@heuermh heuermh commented May 18, 2017

SparkConf conf = new SparkConf()...
SparkContext sc = new SparkContext(conf);
JavaADAMContext jac = new JavaADAMContext(new ADAMContext(sc));
AlignmentRecordRDD alignments = jac.loadAlignments(args[0]);
JavaRDD<AlignmentRecord> rdd = alignments.jrdd;

I thought this worked before; perhaps we made a visibility change in GenomicRDD that prevents access from outside the org.bdgenomics.adam.rdd package

[ERROR] /adam-examples/src/main/java/com/github/heuermh/adam/examples/JavaCountAlignments.java:55: error: jrdd has private access in AvroGenomicRDD
[ERROR]         JavaRDD<AlignmentRecord> rdd = alignments.jrdd;
[ERROR]                                                  ^
[ERROR] 1 error
@fnothaft
Copy link
Member

@fnothaft fnothaft commented May 18, 2017

It doesn't show as private, but it is a lazy val, which I'm guessing is the issue.

@heuermh
Copy link
Member Author

@heuermh heuermh commented May 18, 2017

Same happens with rrd, which isn't lazy

@fnothaft
Copy link
Member

@fnothaft fnothaft commented May 18, 2017

Add a paren:

fnothaft$ javap -cp adam-core/target/adam-core_2.10-0.23.0-SNAPSHOT.jar 

org.bdgenomics.adam.rdd.GenomicRDD
public interface org.bdgenomics.adam.rdd.GenomicRDD<T, U extends org.bdgenomics.adam.rdd.GenomicRDD<T, U>> {
  public abstract org.apache.spark.rdd.RDD<T> rdd();
  public abstract org.bdgenomics.adam.models.SequenceDictionary sequences();
  public abstract org.apache.spark.api.java.JavaRDD<T> jrdd();
@heuermh
Copy link
Member Author

@heuermh heuermh commented May 18, 2017

Ah right, thanks

@heuermh heuermh closed this May 18, 2017
@heuermh heuermh modified the milestone: 0.23.0 Jul 22, 2017
@heuermh heuermh added this to Completed in Release 0.23.0 Jan 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.