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

NoSuchMethodError when running with test data and test config #39

Open
colindean opened this issue Apr 7, 2020 · 2 comments
Open

NoSuchMethodError when running with test data and test config #39

colindean opened this issue Apr 7, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@colindean
Copy link
Collaborator

$ spark-submit --master "local[*]" $(ls -t target/scala-2.11/data-validator-assembly-*.jar | head -n 1) --config local_validators.yaml --jsonReport target/testreport.json --htmlReport target/testreport.html
20/04/07 18:04:33 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
20/04/07 18:04:34 INFO Main$: Logging configured!
20/04/07 18:04:34 INFO Main$: Data Validator
20/04/07 18:04:34 INFO ConfigParser$: Parsing `local_validators.yaml`
20/04/07 18:04:34 INFO ConfigParser$: Attempting to load `local_validators.yaml` from file system
20/04/07 18:04:35 INFO ValidatorConfig: substituteVariables()
20/04/07 18:04:35 INFO Substitutable$class: Substituting filename var: ${WORKDIR}/test.json with `/Users/z003xc4/Source/OSS/target_data-validator/test.json`
20/04/07 18:04:35 INFO Main$: Checking Cli Outputs htmlReport: Some(target/testreport.html) jsonReport: Some(target/testreport.json)
20/04/07 18:04:35 INFO Main$: filename: Some(target/testreport.html) append: false
20/04/07 18:04:35 INFO Main$: CheckFile Some(target/testreport.html)
20/04/07 18:04:35 INFO Main$: Checking file 'target/testreport.html append: false failed: false
20/04/07 18:04:35 INFO Main$: filename: Some(target/testreport.json) append: true
20/04/07 18:04:35 INFO Main$: CheckFile Some(target/testreport.json)
20/04/07 18:04:35 INFO Main$: Checking file 'target/testreport.json append: true failed: false
20/04/07 18:04:35 INFO ValidatorOrcFile: Reading orc file: testData.orc
20/04/07 18:04:36 INFO Main$: Running sparkChecks
20/04/07 18:04:36 INFO ValidatorConfig: Running Quick Checks...
20/04/07 18:04:36 INFO ValidatorOrcFile: Reading orc file: testData.orc
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.spark.sql.catalyst.expressions.Alias$.apply$default$4(Lorg/apache/spark/sql/catalyst/expressions/Expression;Ljava/lang/String;)Lscala/Option;
        at com.target.data_validator.ValidatorTable.createCountSelect(ValidatorTable.scala:33)
        at com.target.data_validator.ValidatorTable.quickChecks(ValidatorTable.scala:87)
        at com.target.data_validator.ValidatorConfig$$anonfun$quickChecks$1.apply(ValidatorConfig.scala:51)
        at com.target.data_validator.ValidatorConfig$$anonfun$quickChecks$1.apply(ValidatorConfig.scala:51)
        at scala.collection.immutable.List.map(List.scala:284)
        at com.target.data_validator.ValidatorConfig.quickChecks(ValidatorConfig.scala:51)
        at com.target.data_validator.Main$.runSparkChecks(Main.scala:80)
        at com.target.data_validator.Main$$anonfun$2.apply(Main.scala:106)
        at com.target.data_validator.Main$$anonfun$2.apply(Main.scala:100)
        at scala.Option.map(Option.scala:146)
        at com.target.data_validator.Main$.runChecks(Main.scala:99)
        at com.target.data_validator.Main$.loadConfigRun(Main.scala:27)
        at com.target.data_validator.Main$.main(Main.scala:170)
        at com.target.data_validator.Main.main(Main.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
        at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:845)
        at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:161)
        at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:184)
        at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:86)
        at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:920)
        at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:929)
        at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)

local_validators.yaml:

---
numKeyCols: 2
numErrorsToReport: 5
detailedErrors: true
vars:
- name: WORKDIR
  env: PWD
tables:
- orcFile: testData.orc
  checks:
  - type: rowCount
    minNumRows: 1000
    #  - type: nullCheck
    #    column: nullCol
outputs:
- filename: ${WORKDIR}/test.json
  • Spark version 2.4.4
  • Scala version 2.11.12
@colindean
Copy link
Collaborator Author

colindean commented Apr 7, 2020

I speculated that it was a Spark 2.3-2.4 incompatibility, but when I compiled DV against Spark 2.4.4, I still get the same error. Nevermind, I was mindlessly doing sbt package instead of sbt assembly and so my assembly jar wasn't getting updated 😅

@colindean
Copy link
Collaborator Author

The state here is that DV 0.11.0 compiled against Spark 2.3.1 won't run on Spark 2.4.4.

@colindean colindean added the bug Something isn't working label Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant