aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark
diff options
context:
space:
mode:
authorYin Huai <yhuai@databricks.com>2015-02-20 16:20:02 +0800
committerCheng Lian <lian@databricks.com>2015-02-20 16:20:02 +0800
commit70bfb5c7282df84e76eba01f59bf1b8551583c33 (patch)
treee3b23f20595563d7a4fde5d62ada016fa3b8e465 /python/pyspark
parent3be92cdac30cf488e09dbdaaa70e5c4cdaa9a099 (diff)
downloadspark-70bfb5c7282df84e76eba01f59bf1b8551583c33.tar.gz
spark-70bfb5c7282df84e76eba01f59bf1b8551583c33.tar.bz2
spark-70bfb5c7282df84e76eba01f59bf1b8551583c33.zip
[SPARK-5909][SQL] Add a clearCache command to Spark SQL's cache manager
JIRA: https://issues.apache.org/jira/browse/SPARK-5909 Author: Yin Huai <yhuai@databricks.com> Closes #4694 from yhuai/clearCache and squashes the following commits: 397ecc4 [Yin Huai] Address comments. a2702fc [Yin Huai] Update parser. 3a54506 [Yin Huai] add isEmpty to CacheManager. 6d14460 [Yin Huai] Python clearCache. f7b8dbd [Yin Huai] Add clear cache command.
Diffstat (limited to 'python/pyspark')
-rw-r--r--python/pyspark/sql/context.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/pyspark/sql/context.py b/python/pyspark/sql/context.py
index 2e2309f103..3f168f718b 100644
--- a/python/pyspark/sql/context.py
+++ b/python/pyspark/sql/context.py
@@ -687,6 +687,10 @@ class SQLContext(object):
"""Removes the specified table from the in-memory cache."""
self._ssql_ctx.uncacheTable(tableName)
+ def clearCache(self):
+ """Removes all cached tables from the in-memory cache. """
+ self._ssql_ctx.clearCache()
+
class HiveContext(SQLContext):