From 5b9cb46d3fdd93b05a80d0a57013f661e2e042b2 Mon Sep 17 00:00:00 2001 From: Dongjoon Hyun Date: Tue, 1 Mar 2016 14:31:37 -0800 Subject: [PATCH] [MINOR][STREAMING] Replace deprecated `apply` with `create` in example. Twitter Algebird deprecated `apply` in HyperLogLog.scala. ``` @deprecated("Use toHLL", since = "0.10.0 / 2015-05") def apply[T <% Array[Byte]](t: T) = create(t) ``` This PR replace the deprecated usage `apply` with new `create` according to the upstream change. --- .../apache/spark/examples/streaming/TwitterAlgebirdHLL.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/src/main/scala/org/apache/spark/examples/streaming/TwitterAlgebirdHLL.scala b/examples/src/main/scala/org/apache/spark/examples/streaming/TwitterAlgebirdHLL.scala index 0ec6214fdef1f..6442b2a4e294b 100644 --- a/examples/src/main/scala/org/apache/spark/examples/streaming/TwitterAlgebirdHLL.scala +++ b/examples/src/main/scala/org/apache/spark/examples/streaming/TwitterAlgebirdHLL.scala @@ -62,7 +62,7 @@ object TwitterAlgebirdHLL { var userSet: Set[Long] = Set() val approxUsers = users.mapPartitions(ids => { - ids.map(id => hll(id)) + ids.map(id => hll.create(id)) }).reduce(_ + _) val exactUsers = users.map(id => Set(id)).reduce(_ ++ _)