Skip to content

Commit 7cff657

Browse files
committed
NON_NULL -> NON_ABSENT annotation change.
1 parent 75b8155 commit 7cff657

File tree

5 files changed

+27
-22
lines changed

5 files changed

+27
-22
lines changed

core/src/main/scala/org/apache/spark/deploy/rest/SubmitRestProtocolMessage.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import org.apache.spark.util.Utils
3636
* (2) the Spark version of the client / server
3737
* (3) an optional message
3838
*/
39-
@JsonInclude(Include.NON_NULL)
39+
@JsonInclude(Include.NON_ABSENT)
4040
@JsonAutoDetect(getterVisibility = Visibility.ANY, setterVisibility = Visibility.ANY)
4141
@JsonPropertyOrder(alphabetic = true)
4242
private[rest] abstract class SubmitRestProtocolMessage {

core/src/main/scala/org/apache/spark/rdd/RDDOperationScope.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import org.apache.spark.internal.Logging
4141
* There is no particular relationship between an operation scope and a stage or a job.
4242
* A scope may live inside one stage (e.g. map) or span across multiple jobs (e.g. take).
4343
*/
44-
@JsonInclude(Include.NON_NULL)
44+
@JsonInclude(Include.NON_ABSENT)
4545
@JsonPropertyOrder(Array("id", "name", "parent"))
4646
private[spark] class RDDOperationScope(
4747
val name: String,

core/src/main/scala/org/apache/spark/status/KVUtils.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private[spark] object KVUtils extends Logging {
4242
private[spark] class KVStoreScalaSerializer extends KVStoreSerializer {
4343

4444
mapper.registerModule(DefaultScalaModule)
45-
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL)
45+
mapper.setSerializationInclusion(JsonInclude.Include.NON_ABSENT)
4646

4747
}
4848

core/src/main/scala/org/apache/spark/status/api/v1/JacksonMessageWriter.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ private[v1] class JacksonMessageWriter extends MessageBodyWriter[Object]{
4949
}
5050
mapper.registerModule(com.fasterxml.jackson.module.scala.DefaultScalaModule)
5151
mapper.enable(SerializationFeature.INDENT_OUTPUT)
52-
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL)
52+
mapper.setSerializationInclusion(JsonInclude.Include.NON_ABSENT)
5353
mapper.setDateFormat(JacksonMessageWriter.makeISODateFormat)
5454

5555
override def isWriteable(

sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/json/JsonBenchmarks.scala

+23-18
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,13 @@ object JSONBenchmarks {
7272
}
7373

7474
/*
75-
Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
75+
Java HotSpot(TM) 64-Bit Server VM 1.8.0_241-b07 on Mac OS X 10.15.5
76+
Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
7677
77-
JSON schema inferring: Best/Avg Time(ms) Rate(M/s) Per Row(ns) Relative
78-
--------------------------------------------------------------------------------------------
79-
No encoding 38902 / 39282 2.6 389.0 1.0X
80-
UTF-8 is set 56959 / 57261 1.8 569.6 0.7X
78+
JSON schema inferring: Best/Avg Time(ms) Rate(M/s) Per Row(ns) Relative
79+
---------------------------------------------------------------------------------------------
80+
No encoding 7664 / 7686 13.0 76.6 1.0X
81+
UTF-8 is set 9981 / 10180 10.0 99.8 0.8X
8182
*/
8283
benchmark.run()
8384
}
@@ -113,12 +114,13 @@ object JSONBenchmarks {
113114
}
114115

115116
/*
116-
Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
117+
Java HotSpot(TM) 64-Bit Server VM 1.8.0_241-b07 on Mac OS X 10.15.5
118+
Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
117119
118-
JSON per-line parsing: Best/Avg Time(ms) Rate(M/s) Per Row(ns) Relative
119-
--------------------------------------------------------------------------------------------
120-
No encoding 25947 / 26188 3.9 259.5 1.0X
121-
UTF-8 is set 46319 / 46417 2.2 463.2 0.6X
120+
JSON per-line parsing: Best/Avg Time(ms) Rate(M/s) Per Row(ns) Relative
121+
---------------------------------------------------------------------------------------------
122+
No encoding 5832 / 5915 17.1 58.3 1.0X
123+
UTF-8 is set 8687 / 8884 11.5 86.9 0.7X
122124
*/
123125
benchmark.run()
124126
}
@@ -161,12 +163,13 @@ object JSONBenchmarks {
161163
}
162164

163165
/*
164-
Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
166+
Java HotSpot(TM) 64-Bit Server VM 1.8.0_241-b07 on Mac OS X 10.15.5
167+
Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
165168
166-
JSON parsing of wide lines: Best/Avg Time(ms) Rate(M/s) Per Row(ns) Relative
167-
--------------------------------------------------------------------------------------------
168-
No encoding 45543 / 45660 0.2 4554.3 1.0X
169-
UTF-8 is set 65737 / 65957 0.2 6573.7 0.7X
169+
JSON parsing of wide lines: Best/Avg Time(ms) Rate(M/s) Per Row(ns) Relative
170+
---------------------------------------------------------------------------------------------
171+
No encoding 9367 / 9475 1.1 936.7 1.0X
172+
UTF-8 is set 14211 / 14397 0.7 1421.1 0.7X
170173
*/
171174
benchmark.run()
172175
}
@@ -196,12 +199,14 @@ object JSONBenchmarks {
196199
}
197200

198201
/*
199-
Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
202+
Java HotSpot(TM) 64-Bit Server VM 1.8.0_241-b07 on Mac OS X 10.15.5
203+
Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
200204
201205
Count a dataset with 10 columns: Best/Avg Time(ms) Rate(M/s) Per Row(ns) Relative
202206
---------------------------------------------------------------------------------------------
203-
Select 10 columns + count() 9961 / 10006 1.0 996.1 1.0X
204-
Select 1 column + count() 8355 / 8470 1.2 835.5 1.2X
207+
Select 10 columns + count() 2074 / 2112 4.8 207.4 1.0X
208+
Select 1 column + count() 1753 / 1792 5.7 175.3 1.2X
209+
205210
*/
206211
benchmark.run()
207212
}

0 commit comments

Comments
 (0)