diff --git a/README.md b/README.md index 2600f53..d61ce6f 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,17 @@ To add http.almaren dependency to your sbt build: ``` -libraryDependencies += "com.github.music-of-the-ainur" %% "http-almaren" % "1.2.5-3.3" +libraryDependencies += "com.github.music-of-the-ainur" %% "http-almaren" % "1.2.6-3.3" ``` To run in spark-shell: For scala-version(2.12): ``` -spark-shell --master "local[*]" --packages "com.github.music-of-the-ainur:almaren-framework_2.12:0.9.8-3.3,com.github.music-of-the-ainur:http-almaren_2.12:1.2.5-3.3" +spark-shell --master "local[*]" --packages "com.github.music-of-the-ainur:almaren-framework_2.12:0.9.8-3.3,com.github.music-of-the-ainur:http-almaren_2.12:1.2.6-3.3" ``` For scala-version(2.13): ``` -spark-shell --master "local[*]" --packages "com.github.music-of-the-ainur:almaren-framework_2.13:0.9.8-3.3,com.github.music-of-the-ainur:http-almaren_2.13:1.2.5-3.3" +spark-shell --master "local[*]" --packages "com.github.music-of-the-ainur:almaren-framework_2.13:0.9.8-3.3,com.github.music-of-the-ainur:http-almaren_2.13:1.2.6-3.3" ``` ## Table of Contents @@ -49,12 +49,12 @@ repository. It can be used using the `--packages` option or the | version | Connector Artifact | |----------------------------|-------------------------------------------------------------| -| Spark 3.3.x and scala 2.13 | `com.github.music-of-the-ainur:http-almaren_2.13:1.2.5-3.3` | -| Spark 3.3.x and scala 2.12 | `com.github.music-of-the-ainur:http-almaren_2.12:1.2.5-3.3` | -| Spark 3.2.x and scala 2.12 | `com.github.music-of-the-ainur:http-almaren_2.12:1.2.5-3.2` | -| Spark 3.1.x and scala 2.12 | `com.github.music-of-the-ainur:http-almaren_2.12:1.2.5-3.1` | -| Spark 2.4.x and scala 2.12 | `com.github.music-of-the-ainur:http-almaren_2.12:1.2.5-2.4` | -| Spark 2.4.x and scala 2.11 | `com.github.music-of-the-ainur:http-almaren_2.11:1.2.5-2.4` | +| Spark 3.3.x and scala 2.13 | `com.github.music-of-the-ainur:http-almaren_2.13:1.2.6-3.3` | +| Spark 3.3.x and scala 2.12 | `com.github.music-of-the-ainur:http-almaren_2.12:1.2.6-3.3` | +| Spark 3.2.x and scala 2.12 | `com.github.music-of-the-ainur:http-almaren_2.12:1.2.6-3.2` | +| Spark 3.1.x and scala 2.12 | `com.github.music-of-the-ainur:http-almaren_2.12:1.2.6-3.1` | +| Spark 2.4.x and scala 2.12 | `com.github.music-of-the-ainur:http-almaren_2.12:1.2.6-2.4` | +| Spark 2.4.x and scala 2.11 | `com.github.music-of-the-ainur:http-almaren_2.11:1.2.6-2.4` | ## Methods diff --git a/src/main/scala/com/github/music/of/the/ainur/almaren/http/HTTPConnector.scala b/src/main/scala/com/github/music/of/the/ainur/almaren/http/HTTPConnector.scala index 1fdcc4d..0c746a0 100644 --- a/src/main/scala/com/github/music/of/the/ainur/almaren/http/HTTPConnector.scala +++ b/src/main/scala/com/github/music/of/the/ainur/almaren/http/HTTPConnector.scala @@ -83,7 +83,10 @@ private[almaren] case class HTTP( Some(r.text()), r.headers, Some(r.statusCode), - Some(r.statusMessage), + r.statusMessage match { + case null => None + case _ => Some(r.statusMessage) + }, `__ELAPSED_TIME__` = elapsedTime, `__URL__` = url) case Failure(f) => { @@ -124,7 +127,10 @@ private[almaren] case class HTTPBatch( Some(r.text()), r.headers, Some(r.statusCode), - Some(r.statusMessage), + r.statusMessage match { + case null => None + case _ => Some(r.statusMessage) + }, `__ELAPSED_TIME__` = System.currentTimeMillis() - startTime, `__URL__` = url, `__DATA__` = data