Commit 743396d9 authored by Your Name's avatar Your Name

python start sucess

parent 06caf5ba
...@@ -176,25 +176,25 @@ def test_map(x): ...@@ -176,25 +176,25 @@ def test_map(x):
if __name__ == "__main__": if __name__ == "__main__":
# sparkConf = SparkConf().set("spark.hive.mapred.supports.subdirectories", "true") \ sparkConf = SparkConf().set("spark.hive.mapred.supports.subdirectories", "true") \
# .set("spark.hadoop.mapreduce.input.fileinputformat.input.dir.recursive", "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_double_read", "false") \
# .set("spark.tispark.plan.allow_index_read", "true") \ .set("spark.tispark.plan.allow_index_read", "true") \
# .set("spark.sql.extensions", "org.apache.spark.sql.TiExtensions") \ .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.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") .set("spark.driver.maxResultSize", "8g").set("spark.sql.avro.compression.codec","snappy")
# spark = SparkSession.builder.config(conf=sparkConf).enableHiveSupport().getOrCreate() spark = SparkSession.builder.config(conf=sparkConf).enableHiveSupport().getOrCreate()
# spark.sparkContext.setLogLevel("WARN") spark.sparkContext.setLogLevel("WARN")
path = "hdfs://172.16.32.4:8020/strategy/esmm/" path = "hdfs://172.16.32.4:8020/strategy/esmm/"
# df = spark.read.format("tfrecords").load(path+"nearby/part-r-00000") # df = spark.read.format("tfrecords").load(path+"nearby/part-r-00000")
# df.show() # df.show()
# name = spark.sparkContext.parallelize([1,2,3,4,5]) name = spark.sparkContext.parallelize([1,2,3,4,5])
#
# test = name.repartition(5).map(lambda x: test_map(x)) test = name.repartition(5).map(lambda x: test_map(x))
# print(test) print(test)
# print(test.collect()) print(test.collect())
tf.logging.set_verbosity(tf.logging.INFO) tf.logging.set_verbosity(tf.logging.INFO)
# te_files = [[path+"nearby/part-r-00000"],[path+"native/part-r-00000"]] # te_files = [[path+"nearby/part-r-00000"],[path+"native/part-r-00000"]]
......
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