随笔分类 -  python spark

摘要:RDD Persistence One of the most important capabilities in Spark is persisting (or caching) a dataset in memory across operations. When you persist an  阅读全文
posted @ 2019-08-20 09:58 夏天换上冬装 阅读(300) 评论(0) 推荐(0)
摘要:(e.g. standalone manager, Mesos, YARN) In "cluster" mode, the framework launches the driver inside of the cluster. In "client" mode, the submitter lau 阅读全文
posted @ 2019-07-15 09:46 夏天换上冬装 阅读(177) 评论(0) 推荐(0)
摘要:sparkbin目录下 ./pyspark --help http://spark.apache.org/docs/latest/submitting-applications.html local模式 spark-env.sh 在$SPARK_HOME/conf下 yarn模式不需要启动maste 阅读全文
posted @ 2019-07-08 09:39 夏天换上冬装 阅读(139) 评论(0) 推荐(0)
摘要:1 from pyspark import SparkContext,SparkConf 2 import sys 3 if __name__ == '__main__': 4 if len(sys.argv) != 2: 5 print("Usage: wordcount <input>",fil 阅读全文
posted @ 2019-06-17 09:39 夏天换上冬装 阅读(150) 评论(0) 推荐(0)
摘要:pycharm 内的环境变量配置 选择相应的spark程序文件的对应的配置信息 PYSPARK_PYTHON:python的安装路径 PYTHONPATH:spark安装路径下的python 提交pyspark应用程序 在$SPARK_HOME/bin 将HDFS上的文件作为参数传入 阅读全文
posted @ 2019-06-10 09:46 夏天换上冬装 阅读(361) 评论(0) 推荐(0)
摘要:RDD Opertions transformations:create a new dataset from an existing one RDDA --> RDDB actions: return a value to the driver program after running a co 阅读全文
posted @ 2019-06-03 09:40 夏天换上冬装 阅读(242) 评论(0) 推荐(0)
摘要:参考: RDD programming guide http://spark.apache.org/docs/latest/rdd-programming-guide.html SQL programming guide http://spark.apache.org/docs/latest/sql 阅读全文
posted @ 2019-05-27 10:35 夏天换上冬装 阅读(348) 评论(0) 推荐(0)
摘要:在配置Hadoop之前,应该先做以下配置 1.更改主机名 首先更改主机名,目的是为了方便管理。 输入:hostname 查看本机的名称 使用 hostname 修改当前主机名。 hostname test1 然后输入:vim /etc/sysconfig/network 修改主机名称 将HOSTNA 阅读全文
posted @ 2019-05-13 10:10 夏天换上冬装 阅读(2499) 评论(0) 推荐(0)
摘要:RDD(Resilient Distributed Dataset) Spark源码:https://github.com/apache/spark abstract class RDD[T: ClassTag]( @transient private var _sc: SparkContext, 阅读全文
posted @ 2019-05-06 09:51 夏天换上冬装 阅读(854) 评论(0) 推荐(0)