aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/pyspark/sql.py27
1 files changed, 0 insertions, 27 deletions
diff --git a/python/pyspark/sql.py b/python/pyspark/sql.py
index 93fd9d4909..f0bd3cbd98 100644
--- a/python/pyspark/sql.py
+++ b/python/pyspark/sql.py
@@ -1400,33 +1400,6 @@ class HiveContext(SQLContext):
class LocalHiveContext(HiveContext):
- """Starts up an instance of hive where metadata is stored locally.
-
- An in-process metadata data is created with data stored in ./metadata.
- Warehouse data is stored in in ./warehouse.
-
- >>> import os
- >>> hiveCtx = LocalHiveContext(sc)
- >>> try:
- ... supress = hiveCtx.sql("DROP TABLE src")
- ... except Exception:
- ... pass
- >>> kv1 = os.path.join(os.environ["SPARK_HOME"],
- ... 'examples/src/main/resources/kv1.txt')
- >>> supress = hiveCtx.sql(
- ... "CREATE TABLE IF NOT EXISTS src (key INT, value STRING)")
- >>> supress = hiveCtx.sql("LOAD DATA LOCAL INPATH '%s' INTO TABLE src"
- ... % kv1)
- >>> results = hiveCtx.sql("FROM src SELECT value"
- ... ).map(lambda r: int(r.value.split('_')[1]))
- >>> num = results.count()
- >>> reduce_sum = results.reduce(lambda x, y: x + y)
- >>> num
- 500
- >>> reduce_sum
- 130091
- """
-
def __init__(self, sparkContext, sqlContext=None):
HiveContext.__init__(self, sparkContext, sqlContext)
warnings.warn("LocalHiveContext is deprecated. "