Commit 72b0b3f9 authored by 张彦钊's avatar 张彦钊

修改测试文件

parent 8c43ce13
...@@ -30,10 +30,7 @@ def test(): ...@@ -30,10 +30,7 @@ def test():
from pyspark.sql import SparkSession from pyspark.sql import SparkSession
spark = SparkSession \ spark = SparkSession.builder.appName("BinarizerExample").enableHiveSupport().getOrCreate()
.builder \
.appName("BinarizerExample") \
.getOrCreate()
spark.sql("SET mapreduce.job.queuename=data") spark.sql("SET mapreduce.job.queuename=data")
spark.sql("SET mapred.input.dir.recursive=true") spark.sql("SET mapred.input.dir.recursive=true")
spark.sql("SET hive.mapred.supports.subdirectories=true") spark.sql("SET hive.mapred.supports.subdirectories=true")
...@@ -42,7 +39,7 @@ def test(): ...@@ -42,7 +39,7 @@ def test():
# hive_context.sql("SET mapred.input.dir.recursive=true") # hive_context.sql("SET mapred.input.dir.recursive=true")
# hive_context.sql("SET hive.mapred.supports.subdirectories=true") # hive_context.sql("SET hive.mapred.supports.subdirectories=true")
sql = "select user_id from online.tl_hdfs_maidian_view where partition_date = '20190412' limit 10" sql = "select user_id from online.tl_hdfs_maidian_view where partition_date = '20190412' limit 10"
hive_context.sql(sql).show(6) spark.sql(sql).show(6)
# def esmm_pre(): # def esmm_pre():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment