Skip to content

read sequence file from HDFS #101

Description

@pzhanggit

Hi @dfdx, thank you for showing me how to add new functions to Spark.jl in issue #98. Now I am trying to add "sequenceFile" following the same steps but could not get it working. Here is the code snippet.

"Create RDD from a sequence file"
function sequence_file(sc::SparkContext, path::AbstractString)
    jrdd = jcall(sc.jsc, "sequenceFile", JJavaPairRDD, (JString,), path)
    return JavaPairRDD(jrdd)
end

I got an error message saying

Exception in thread "main" java.lang.NoSuchMethodError: sequenceFile
ERROR: LoadError: JavaCall.JavaCallError("Error calling Java: java.lang.NoSuchMethodError: sequenceFile")
Stacktrace:
[1] geterror(allow::Bool)
@ JavaCall ~/.julia/packages/JavaCall/tjlYt/src/core.jl:418
[2] jcall(obj::JavaCall.JavaObject{Symbol("org.apache.spark.api.java.JavaSparkContext")}, method::String, rettype::Type, argtypes::Tuple{DataType}, args::String)
@ JavaCall ~/.julia/packages/JavaCall/tjlYt/src/core.jl:244
[3] sequence_file(sc::SparkContext, path::String)
@ Spark ~/.julia/packages/Spark/7NlAt/src/context.jl:87
...

Any suggestions on how to make it work? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions