Coder Social home page Coder Social logo

Comments (12)

tdanford avatar tdanford commented on August 21, 2024

Michael, can you give a bit more detail on what would satisfy this issue (for you)? Is this a documentation-only issue? Or do we actually need to create a separate repo somewhere with an example of building a plugin who's code is not part of the core 'adam' repo?

from adam.

heuermh avatar heuermh commented on August 21, 2024

I can work on an example for this.

from adam.

tdanford avatar tdanford commented on August 21, 2024

That'd be great! We also have a very simple example in adam-cli/src/test/scala, I wasn't sure if that's the kind of example you were thinking of or if you wanted something more specific.

from adam.

heuermh avatar heuermh commented on August 21, 2024

Thanks, I've seen that example, but it doesn't really satisfy a true plugin scenario, since Take10Plugin is built as part of adam-core and as such is already on the classpath for adam-cli. The example for this issue is necessary to prove out the build can work.

from adam.

tdanford avatar tdanford commented on August 21, 2024

I'll leave it up to you Michael :-)

On Mon, Mar 3, 2014 at 1:31 PM, Michael L Heuer [email protected]:

Thanks, I've seen that example, but it doesn't really satisfy a true
plugin scenario, since Take10Plugin is built as part of adam-core and as
such is already on the classpath for adam-cli. The example for this issue
is necessary to prove out the build can work.


Reply to this email directly or view it on GitHubhttps://github.com//issues/131#issuecomment-36541672
.

from adam.

heuermh avatar heuermh commented on August 21, 2024

ok, this builds, passes tests, and creates adam-plugins-0.6.1-SNAPSHOT.jar, but I'm not sure how to run it with adam-cli.

https://github.com/heuermh/adam/tree/plugin-example

Would it just require a shell script that adds adam-plugins-0.6.1-SNAPSHOT.jar to the classpath and then calls Main in adam-0.6.1-SNAPSHOT.jar?

Here's the required documentation part. :)

from adam.

heuermh avatar heuermh commented on August 21, 2024

Something with command line parameters is not working right:

$ java -classpath "target/adam-plugins-0.6.1-SNAPSHOT.jar:../adam-cli/target/adam-0.6.1-SNAPSHOT.jar" edu.berkeley.cs.amplab.adam.cli.AdamMain plugin ../adam-core/src/test/resources/reads12.sam 
0   1   249250621
1   2   243199373
$ java -classpath "target/adam-plugins-0.6.1-SNAPSHOT.jar:../adam-cli/target/adam-0.6.1-SNAPSHOT.jar" edu.berkeley.cs.amplab.adam.cli.AdamMain plugin edu.berkeley.cs.amplab.plugins.external.ExternalTake10Plugin 
Exception in thread "main" org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist: file:/Users/mheuer/working/adam/adam-plugins/edu.berkeley.cs.amplab.plugins.external.ExternalTake10Plugin
    at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.listStatus(FileInputFormat.java:285)
    at parquet.hadoop.ParquetInputFormat.listStatus(ParquetInputFormat.java:291)
    at parquet.hadoop.ParquetInputFormat.getFooters(ParquetInputFormat.java:339)
    at parquet.hadoop.ParquetInputFormat.getSplits(ParquetInputFormat.java:246)
    at org.apache.spark.rdd.NewHadoopRDD.getPartitions(NewHadoopRDD.scala:66)
    at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:201)
    at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:199)
    at scala.Option.getOrElse(Option.scala:108)
    at org.apache.spark.rdd.RDD.partitions(RDD.scala:199)
    at org.apache.spark.rdd.MappedRDD.getPartitions(MappedRDD.scala:26)
    at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:201)
    at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:199)
    at scala.Option.getOrElse(Option.scala:108)
    at org.apache.spark.rdd.RDD.partitions(RDD.scala:199)
    at org.apache.spark.rdd.RDD.distinct(RDD.scala:266)
    at edu.berkeley.cs.amplab.adam.rdd.AdamContext.adamDictionaryLoad(AdamContext.scala:240)
    at edu.berkeley.cs.amplab.adam.cli.ListDict.run(ListDict.scala:48)
    at edu.berkeley.cs.amplab.adam.cli.AdamSparkCommand$class.run(AdamCommand.scala:48)
    at edu.berkeley.cs.amplab.adam.cli.ListDict.run(ListDict.scala:41)
    at edu.berkeley.cs.amplab.adam.cli.AdamMain$.main(AdamMain.scala:65)
    at edu.berkeley.cs.amplab.adam.cli.AdamMain.main(AdamMain.scala)
$ java -classpath "target/adam-plugins-0.6.1-SNAPSHOT.jar:../adam-cli/target/adam-0.6.1-SNAPSHOT.jar" edu.berkeley.cs.amplab.adam.cli.AdamMain plugin edu.berkeley.cs.amplab.plugins.external.ExternalTake10Plugin ../adam-core/src/test/resources/reads12.sam 
Too many arguments: ../adam-core/src/test/resources/reads12.sam
 INPUT                                                           : The ADAM sequence dictionary to print
 -h (-help, --help, -?)                                          : Print help
 -parquet_block_size N                                           : Parquet block size (default = 128mb)
 -parquet_compression_codec [UNCOMPRESSED | SNAPPY | GZIP | LZO] : Parquet compression codec
 -parquet_disable_dictionary                                     : Disable dictionary encoding
 -parquet_page_size N                                            : Parquet page size (default = 1mb)
 -spark_env KEY=VALUE                                            : Add Spark environment variable
 -spark_home PATH                                                : Spark home
 -spark_jar JAR                                                  : Add Spark jar
 -spark_master VAL                                               : Spark Master (default = "local[#cores]")

from adam.

heuermh avatar heuermh commented on August 21, 2024

Created new issue #164 for the problem above

from adam.

heuermh avatar heuermh commented on August 21, 2024

I've also created an separate repo external adam-plugins module here

https://github.com/heuermh/adam-plugins

It does not use adam-parent as its parent pom.

from adam.

tdanford avatar tdanford commented on August 21, 2024

@heuermh #164, referenced above, is closed -- and your repo seems like a reasonable plugin example. Shall we close this issue too?

from adam.

heuermh avatar heuermh commented on August 21, 2024

Yes, thanks.

from adam.

fnothaft avatar fnothaft commented on August 21, 2024

Thanks @heuermh! Closing.

from adam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.