Commit 5856d3b0 authored by Your Name's avatar Your Name

add dist sort

parent 1a63a88f
......@@ -98,6 +98,25 @@ def main():
print(e)
if __name__ == '__main__':
if __name__ == "__main__":
sparkConf = SparkConf().set("spark.hive.mapred.supports.subdirectories", "true") \
.set("spark.hadoop.mapreduce.input.fileinputformat.input.dir.recursive", "true") \
.set("spark.tispark.plan.allow_index_double_read", "false") \
.set("spark.tispark.plan.allow_index_read", "true") \
.set("spark.sql.extensions", "org.apache.spark.sql.TiExtensions") \
.set("spark.tispark.pd.addresses", "172.16.40.158:2379").set("spark.io.compression.codec", "lzf")\
.set("spark.driver.maxResultSize", "8g").set("spark.sql.avro.compression.codec","snappy")
spark = SparkSession.builder.config(conf=sparkConf).enableHiveSupport().getOrCreate()
spark.sparkContext.setLogLevel("WARN")
path = "hdfs://172.16.32.4:8020/strategy/esmm/"
# df = spark.read.format("tfrecords").load(path+"nearby/part-r-00000")
# df.show()
uid1 = spark.read.format("csv").options(sep="\t",header=True).load(path+"nearby/nearby.csv")
uid1.show()
pred1 = spark.read.format("csv").options(sep="\t").load(path+"nearby/pred.txt")
pred1.show()
path = "/home/gmuser/esmm"
main()
\ No newline at end of file
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