1、spark2.1.1-FlatMapFunction中call返回类型从Iterable变成了Iterator。
最近开始用spark,一直以为是我本地编译有问题,真是要死要活。
2、Spark任务都会绑定一个端口来显示WebUI,默认端口为4040,如果被占用则依次递增+1端口重试,重试次数由参数spark.port.maxRetries控制,默认重试16次后就放弃执行
也可以在submit使用用 --maxRetries来指定。所以java.net.BindException: Address already in use 报错是正常的。
hdfs也有一个ui界面查看文件系统,linux上要加上hdfs dfs 或者hadoop fs -ls 和linux上命令差不多。
3、yarn、spark, mesos, local 目前用的是yarn,local用于本地开发测试,本地单机模式;
http://blog.csdn.net/u012050154/article/details/50766008
参考http://blog.csdn.net/xwc35047/article/details/53933265
目前使用yarn:http://chinadaas-test101:8088/cluster/apps/RUNNING 可以spark上运行过的application
yarn application -list 查看当前运行的程序列表
4、sqoop
oracle 导入数据到hive表example
sudo -u hive sqoop import --connect jdbc:oracle:thin:@ip:port/orcl --username name --password password --table tablename --hive-table tablename --hive-import --fields-terminated-by "\t" --lines-terminated-by "\n" --hive-overwrite -m 1 --target-dir /tmp/hive_export_year/tmp/AN_TABLE_S_hdfs_ext/
-m 线程
参考链接:http://www.cnblogs.com/cenyuhai/p/3306037.html
http://blog.csdn.net/a2011480169/article/details/51500156
5. 创建hive表
生成的par文件,可以用创建外部表方式指向par文件,create external table tablename
show create table tablename; 等也可以创建hive表