Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

What changes were proposed in this pull request?

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.

How was this patch tested?

manual.

/bin/spark-submit --class org.apache.spark.examples.streaming.TwitterAlgebirdHLL examples/target/scala-2.11/spark-examples-2.0.0-SNAPSHOT-hadoop2.2.0.jar

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.
@srowen
Copy link
Member

srowen commented Mar 1, 2016

Is it causing a warning in our build now? or just deprecated in later releases? it's OK to switch now anyway if both methods are present and the latter one is preferred

@srowen
Copy link
Member

srowen commented Mar 1, 2016

Jenkins test this please

@srowen
Copy link
Member

srowen commented Mar 1, 2016

PS we have several PRs in flight to address some build warnings, with more that we need to fix. Feel free to start addressing them, and try to solve all instances of one or more type of warning at a time if you can.

@SparkQA
Copy link

SparkQA commented Mar 1, 2016

Test build #52260 has finished for PR 11451 at commit 5b9cb46.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun
Copy link
Member Author

Right, @srowen . This is one of Spark deprecated warnings.

I chose this one as a minor since it's an example and only one line fix for Twitter library.

Thanks, @srowen . I will try do more bigger one as you mentioned; one or more type of warning .

@dongjoon-hyun
Copy link
Member Author

Before this PR, the warn message in the Jenkins build looks like the following. (9 times.)

/home/jenkins/workspace/SparkPullRequestBuilder/examples/src/main/scala/org/apache/spark/examples/streaming/TwitterAlgebirdHLL.scala:65: method apply in class HyperLogLogMonoid is deprecated: Use toHLL
[warn]       ids.map(id => hll(id))

@srowen
Copy link
Member

srowen commented Mar 2, 2016

Great, that's easy. Merged to master

@asfgit asfgit closed this in 366f26d Mar 2, 2016
@dongjoon-hyun
Copy link
Member Author

Thank you for merging, @srowen !

@dongjoon-hyun dongjoon-hyun deleted the replace_deprecated_hll_apply branch March 3, 2016 20:41
roygao94 pushed a commit to roygao94/spark that referenced this pull request Mar 22, 2016
## What changes were proposed in this pull request?

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.

## How was this patch tested?
manual.
```
/bin/spark-submit --class org.apache.spark.examples.streaming.TwitterAlgebirdHLL examples/target/scala-2.11/spark-examples-2.0.0-SNAPSHOT-hadoop2.2.0.jar
```

Author: Dongjoon Hyun <[email protected]>

Closes apache#11451 from dongjoon-hyun/replace_deprecated_hll_apply.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants