{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/14579","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/14579/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/14579/comments","events_url":"https://api.github.com/repos/apache/spark/issues/14579/events","html_url":"https://github.com/apache/spark/pull/14579","id":170364337,"number":14579,"title":"[SPARK-16921][PYSPARK] RDD/DataFrame persist()/cache() should return Python context managers","user":{"login":"MLnick","id":1036807,"avatar_url":"https://avatars.githubusercontent.com/u/1036807?v=3","gravatar_id":"","url":"https://api.github.com/users/MLnick","html_url":"https://github.com/MLnick","followers_url":"https://api.github.com/users/MLnick/followers","following_url":"https://api.github.com/users/MLnick/following{/other_user}","gists_url":"https://api.github.com/users/MLnick/gists{/gist_id}","starred_url":"https://api.github.com/users/MLnick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MLnick/subscriptions","organizations_url":"https://api.github.com/users/MLnick/orgs","repos_url":"https://api.github.com/users/MLnick/repos","events_url":"https://api.github.com/users/MLnick/events{/privacy}","received_events_url":"https://api.github.com/users/MLnick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-10T08:48:38Z","updated_at":"2016-08-10T09:31:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/14579","html_url":"https://github.com/apache/spark/pull/14579","diff_url":"https://github.com/apache/spark/pull/14579.diff","patch_url":"https://github.com/apache/spark/pull/14579.patch"},"body":"JIRA: https://issues.apache.org/jira/browse/SPARK-16921\r\n\r\nContext managers are a natural way to capture closely related setup and teardown code in Python. It can be useful to apply this pattern to persisting/unpersisting RDDs and DataFrames.\r\n\r\nThis PR makes RDDs and DataFrames implement the context manager `__enter__` and `__exit__`  functions, allowing code such as:\r\n\r\n```python\r\nwith labeled_data.persist():\r\n    model = pipeline.fit(labeled_data)\r\n```\r\n\r\n## How was this patch tested?\r\n\r\nNew doc tests."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/238814469","html_url":"https://github.com/apache/spark/pull/14579#issuecomment-238814469","issue_url":"https://api.github.com/repos/apache/spark/issues/14579","id":238814469,"user":{"login":"SparkQA","id":8108735,"avatar_url":"https://avatars.githubusercontent.com/u/8108735?v=3","gravatar_id":"","url":"https://api.github.com/users/SparkQA","html_url":"https://github.com/SparkQA","followers_url":"https://api.github.com/users/SparkQA/followers","following_url":"https://api.github.com/users/SparkQA/following{/other_user}","gists_url":"https://api.github.com/users/SparkQA/gists{/gist_id}","starred_url":"https://api.github.com/users/SparkQA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SparkQA/subscriptions","organizations_url":"https://api.github.com/users/SparkQA/orgs","repos_url":"https://api.github.com/users/SparkQA/repos","events_url":"https://api.github.com/users/SparkQA/events{/privacy}","received_events_url":"https://api.github.com/users/SparkQA/received_events","type":"User","site_admin":false},"created_at":"2016-08-10T09:31:28Z","updated_at":"2016-08-10T09:31:28Z","body":"**[Test build #63520 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63520/consoleFull)** for PR 14579 at commit [`2b4e56e`](https://github.com/apache/spark/commit/2b4e56e72bf3cd291349baf6feb197666d368b67).\n * This patch passes all tests.\n * This patch merges cleanly.\n * This patch adds no public classes."}}
{"actor":{"display_login":"SparkQA"}}