Skip to content

Commit

Permalink
Fix issue with inferred existential type
Browse files Browse the repository at this point in the history
  • Loading branch information
tgravescs committed May 28, 2019
1 parent 6704cb6 commit c046f07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/scala/org/apache/spark/ResourceDiscoverer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ private[spark] object ResourceDiscoverer extends Logging {

def parseAllocatedFromJsonFile(resourcesFile: String): Map[String, ResourceInformation] = {
implicit val formats = DefaultFormats
// case class to make json4s parsing easy
case class JsonResourceInformation(val name: String, val addresses: Array[String])
val resourceInput = new BufferedInputStream(new FileInputStream(resourcesFile))
val resources = try {
// case class to make json4s parsing easy
case class JsonResourceInformation(val name: String, val addresses: Array[String])
parse(resourceInput).extract[Seq[JsonResourceInformation]]
} catch {
case e@(_: MappingException | _: MismatchedInputException | _: ClassCastException) =>
Expand Down

0 comments on commit c046f07

Please sign in to comment.