question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NumberFormatException when using --historyServer

See original GitHub issue

History server is running Spark 2.1.0. Presumably it needs to be parsing the number as a Long rather than an Int.

> sbt "run --historyServer https://sparkhistory.bigred.target.com -r"
[info] Loading global plugins from /Users/z001qdp/.sbt/0.13/plugins
[info] Loading project definition from /Users/z001qdp/projects/sparklint/project
[info] Set current project to sparklint-spark201 (in build file:/Users/z001qdp/projects/sparklint/)
[info] Running com.groupon.sparklint.SparklintServer --historyServer https://sparkhistory.bigred.target.com -r
{"level": "INFO ", "timestamp": "2017-05-23 09:25:59,932", "classname": "com.groupon.sparklint.common.CliSparklintConfig", "body": Parsing args: --historyServer https://sparkhistory.bigred.target.com -r}
{"level": "INFO ", "timestamp": "2017-05-23 09:25:59,955", "classname": "com.groupon.sparklint.common.CliSparklintConfig", "body": Parsed into: historyServer, runImmediately}
[error] (run-main-0) java.lang.NumberFormatException: For input string: "1495547575289"
java.lang.NumberFormatException: For input string: "1495547575289"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:583)
	at java.lang.Integer.parseInt(Integer.java:615)
	at jawn.support.json4s.Parser$$anon$1.jint(Parser.scala:15)
	at jawn.support.json4s.Parser$$anon$1.jint(Parser.scala:10)
	at jawn.Parser.parseNum(Parser.scala:188)
	at jawn.Parser.rparse(Parser.scala:392)
	at jawn.AsyncParser.churn(AsyncParser.scala:213)
	at jawn.AsyncParser.finish(AsyncParser.scala:98)
	at jawnstreamz.package$$anonfun$parseJson$1$$anonfun$apply$2.apply(package.scala:31)
	at jawnstreamz.package$$anonfun$parseJson$1$$anonfun$apply$2.apply(package.scala:31)
	at scalaz.stream.Process$$anonfun$onComplete$1.apply(Process.scala:338)
	at scalaz.stream.Process$$anonfun$onComplete$1.apply(Process.scala:338)
	at scalaz.stream.Process$$anonfun$2$$anonfun$apply$12$$anonfun$apply$13.apply(Process.scala:115)
	at scalaz.stream.Process$$anonfun$2$$anonfun$apply$12$$anonfun$apply$13.apply(Process.scala:115)
	at scalaz.stream.Util$.Try(Util.scala:38)
	at scalaz.stream.Process$$anonfun$2$$anonfun$apply$12.apply(Process.scala:115)
	at scalaz.stream.Process$$anonfun$2$$anonfun$apply$12.apply(Process.scala:115)
	at scalaz.Trampoline$$anonfun$delay$1.apply(Free.scala:262)
	at scalaz.Trampoline$$anonfun$delay$1.apply(Free.scala:262)
	at scalaz.Free$$anonfun$run$1.apply(Free.scala:187)
	at scalaz.Free$$anonfun$run$1.apply(Free.scala:187)
	at scalaz.Free.go2$1(Free.scala:134)
	at scalaz.Free.go(Free.scala:137)
	at scalaz.Free.run(Free.scala:187)
	at scalaz.stream.Process$$anonfun$go$1$1.apply(Process.scala:84)
	at scalaz.stream.Process$$anonfun$go$1$1.apply(Process.scala:84)
	at scalaz.stream.Util$.Try(Util.scala:38)
	at scalaz.stream.Process$class.go$1(Process.scala:84)
	at scalaz.stream.Process$class.step(Process.scala:97)
	at scalaz.stream.Process$Append.step(Process.scala:641)
	at scalaz.stream.Process$$anonfun$suspendStep$1.apply(Process.scala:106)
	at scalaz.stream.Process$$anonfun$suspendStep$1.apply(Process.scala:105)
	at scalaz.stream.Process$$anonfun$2$$anonfun$apply$12$$anonfun$apply$13.apply(Process.scala:115)
	at scalaz.stream.Process$$anonfun$2$$anonfun$apply$12$$anonfun$apply$13.apply(Process.scala:115)
	at scalaz.stream.Util$.Try(Util.scala:38)
	at scalaz.stream.Process$$anonfun$2$$anonfun$apply$12.apply(Process.scala:115)
	at scalaz.stream.Process$$anonfun$2$$anonfun$apply$12.apply(Process.scala:115)
	at scalaz.Trampoline$$anonfun$delay$1.apply(Free.scala:262)
	at scalaz.Trampoline$$anonfun$delay$1.apply(Free.scala:262)
	at scalaz.std.FunctionInstances$$anon$1$$anonfun$map$1.apply(Function.scala:56)
	at scalaz.Free$$anonfun$run$1.apply(Free.scala:187)
	at scalaz.Free$$anonfun$run$1.apply(Free.scala:187)
	at scalaz.Free.go2$1(Free.scala:134)
	at scalaz.Free.go(Free.scala:137)
	at scalaz.Free.run(Free.scala:187)
	at scalaz.stream.Process$$anonfun$go$1$1.apply(Process.scala:84)
	at scalaz.stream.Process$$anonfun$go$1$1.apply(Process.scala:84)
	at scalaz.stream.Util$.Try(Util.scala:38)
	at scalaz.stream.Process$class.go$1(Process.scala:84)
	at scalaz.stream.Process$class.step(Process.scala:97)
	at scalaz.stream.Process$Append.step(Process.scala:641)
	at scalaz.stream.Process$$anonfun$pipe$1.apply(Process.scala:143)
	at scalaz.stream.Process$$anonfun$pipe$1.apply(Process.scala:139)
	at scalaz.stream.Process$$anonfun$flatMap$1.apply(Process.scala:46)
	at scalaz.stream.Process$$anonfun$flatMap$1.apply(Process.scala:46)
	at scalaz.stream.Util$.Try(Util.scala:38)
	at scalaz.stream.Process$class.flatMap(Process.scala:46)
	at scalaz.stream.Process$Emit.flatMap(Process.scala:592)
	at scalaz.stream.Process$$anonfun$flatMap$4.apply(Process.scala:48)
	at scalaz.stream.Process$$anonfun$flatMap$4.apply(Process.scala:48)
	at scalaz.Free$$anonfun$map$1.apply(Free.scala:53)
	at scalaz.Free$$anonfun$map$1.apply(Free.scala:53)
	at scalaz.Free.scalaz$Free$$fastFlatMap(Free.scala:72)
	at scalaz.Free$$anonfun$scalaz$Free$$fastFlatMap$1.apply(Free.scala:73)
	at scalaz.Free$$anonfun$scalaz$Free$$fastFlatMap$1.apply(Free.scala:73)
	at scalaz.std.FunctionInstances$$anon$1$$anonfun$map$1.apply(Function.scala:56)
	at scalaz.Free$$anonfun$run$1.apply(Free.scala:187)
	at scalaz.Free$$anonfun$run$1.apply(Free.scala:187)
	at scalaz.Free.go2$1(Free.scala:134)
	at scalaz.Free.go(Free.scala:137)
	at scalaz.Free.run(Free.scala:187)
	at scalaz.stream.Process$$anonfun$go$1$1.apply(Process.scala:84)
	at scalaz.stream.Process$$anonfun$go$1$1.apply(Process.scala:84)
	at scalaz.stream.Util$.Try(Util.scala:38)
	at scalaz.stream.Process$class.go$1(Process.scala:84)
	at scalaz.stream.Process$class.step(Process.scala:97)
	at scalaz.stream.Process$Append.step(Process.scala:641)
	at scalaz.stream.Process$class.go$3(Process.scala:482)
	at scalaz.stream.Process$class.runFoldMap(Process.scala:498)
	at scalaz.stream.Process$Append.runFoldMap(Process.scala:641)
	at scalaz.stream.Process$class.runLast(Process.scala:522)
	at scalaz.stream.Process$Append.runLast(Process.scala:641)
	at scalaz.stream.Process$class.runLastOr(Process.scala:527)
	at scalaz.stream.Process$Append.runLastOr(Process.scala:641)
	at org.http4s.jawn.JawnInstances$$anonfun$jawnDecoder$1.apply(JawnInstances.scala:17)
	at org.http4s.jawn.JawnInstances$$anonfun$jawnDecoder$1.apply(JawnInstances.scala:12)
	at org.http4s.EntityDecoder$$anon$3.decode(EntityDecoder.scala:96)
	at org.http4s.EntityDecoder$$anon$2.decode(EntityDecoder.scala:45)
	at org.http4s.client.Client$$anonfun$expect$1.apply(Client.scala:96)
	at org.http4s.client.Client$$anonfun$expect$1.apply(Client.scala:94)
	at org.http4s.client.DisposableResponse.apply(Client.scala:27)
	at org.http4s.client.Client$$anonfun$fetch$1.apply(Client.scala:52)
	at org.http4s.client.Client$$anonfun$fetch$1.apply(Client.scala:52)
	at scalaz.concurrent.Task$$anonfun$flatMap$1$$anonfun$1.apply(Task.scala:36)
	at scalaz.concurrent.Task$$anonfun$flatMap$1$$anonfun$1.apply(Task.scala:36)
	at scalaz.concurrent.Task$.Try(Task.scala:403)
	at scalaz.concurrent.Task$$anonfun$flatMap$1.apply(Task.scala:36)
	at scalaz.concurrent.Task$$anonfun$flatMap$1.apply(Task.scala:34)
	at scalaz.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:58)
	at scalaz.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:58)
	at scalaz.concurrent.Future.step(Future.scala:109)
	at scalaz.concurrent.Future.listen(Future.scala:75)
	at scalaz.concurrent.Future$$anonfun$listen$1$$anonfun$apply$4.apply(Future.scala:79)
	at scalaz.concurrent.Future$$anonfun$listen$1$$anonfun$apply$4.apply(Future.scala:79)
	at scalaz.Free$$anonfun$map$1.apply(Free.scala:53)
	at scalaz.Free$$anonfun$map$1.apply(Free.scala:53)
	at scalaz.Free$$anonfun$flatMap$1$$anonfun$apply$1.apply(Free.scala:61)
	at scalaz.Free$$anonfun$flatMap$1$$anonfun$apply$1.apply(Free.scala:61)
	at scalaz.Free.resume(Free.scala:86)
	at scalaz.Free.go2$1(Free.scala:133)
	at scalaz.Free.go(Free.scala:137)
	at scalaz.Free.run(Free.scala:187)
	at scalaz.concurrent.Future.listen(Future.scala:76)
	at scalaz.concurrent.Future$$anonfun$listen$1$$anonfun$apply$4.apply(Future.scala:79)
	at scalaz.concurrent.Future$$anonfun$listen$1$$anonfun$apply$4.apply(Future.scala:79)
	at scalaz.Free$$anonfun$map$1.apply(Free.scala:53)
	at scalaz.Free$$anonfun$map$1.apply(Free.scala:53)
	at scalaz.Free.scalaz$Free$$fastFlatMap(Free.scala:72)
	at scalaz.Free$$anonfun$resume$1.apply(Free.scala:88)
	at scalaz.Free$$anonfun$resume$1.apply(Free.scala:88)
	at scalaz.std.FunctionInstances$$anon$1$$anonfun$map$1.apply(Function.scala:56)
	at scalaz.Free$$anonfun$run$1.apply(Free.scala:187)
	at scalaz.Free$$anonfun$run$1.apply(Free.scala:187)
	at scalaz.Free.go2$1(Free.scala:134)
	at scalaz.Free.go(Free.scala:137)
	at scalaz.Free.run(Free.scala:187)
	at scalaz.concurrent.Future$$anonfun$async$1$$anonfun$apply$14.apply(Future.scala:376)
	at scalaz.concurrent.Future$$anonfun$async$1$$anonfun$apply$14.apply(Future.scala:376)
	at org.http4s.client.blaze.Http1Connection.org$http4s$client$blaze$Http1Connection$$parsePrelude(Http1Connection.scala:242)
	at org.http4s.client.blaze.Http1Connection$$anonfun$org$http4s$client$blaze$Http1Connection$$readAndParsePrelude$1.apply(Http1Connection.scala:159)
	at org.http4s.client.blaze.Http1Connection$$anonfun$org$http4s$client$blaze$Http1Connection$$readAndParsePrelude$1.apply(Http1Connection.scala:158)
	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
[trace] Stack trace suppressed: run last compile:run for the full output.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
alexnikitchukcommented, Jun 17, 2017

Using advice from another issue helped me to fix it locally. I’m ready to push the branch with the fix

1reaction
alexnikitchukcommented, Jun 5, 2017

I have the same issue and it is caused by startTimeEpoch value. Seems like it is caused by another Jawn issue

"attempts" : [ {
    "startTime" : "2017-06-05T18:00:17.787GMT",
    "endTime" : "2017-06-05T18:00:50.240GMT",
    "lastUpdated" : "2017-06-05T18:00:50.270GMT",
    "duration" : 32453,
    "sparkUser" : "ubuntu",
    "completed" : true,
    "startTimeEpoch" : 1496685617787,
    "lastUpdatedEpoch" : 1496685650270,
    "endTimeEpoch" : 1496685650240
  } ]```
Read more comments on GitHub >

github_iconTop Results From Across the Web

json4s Long support · Issue #69 · typelevel/jawn - GitHub
Could we change JInt to JLong at this line ? jawn is not parsing big integers and crashing with: java.lang.NumberFormatException: For input ...
Read more >
How to Handle the NumberFormat Exception in Java - Rollbar
The NumberFormatException is an unchecked exception in Java that occurs when an attempt is made to convert a string with an incorrect format ......
Read more >
NumberFormatException in Java with Examples
The NumberFormatException occurs when an attempt is made to convert a string with improper format into a numeric value.
Read more >
NumberFormatException error while writing a dataframe to ...
I am writing dataframe to HDFS , with following code final_df.write.
Read more >
NumberFormatException error when running an application ...
NumberFormatException error when running an application with datasource target for a WebSphere Application Server between V6.0.2.9 or ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found