不是完spark2不能启动
分配、激活parcel
磁盘太小
sudo fdisk -l
Disk /dev/nvme1n1: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
sudo mkfs -t ext4 /dev/nvme1n1
sudo mount /dev/nvme1n1 /home/ubuntu/data_disk/
代理目录太小:
代理日志目录 Suppress...
Cloudera Manager Agent 的日志目录位于可用空间小于 2.0 吉字节 的文件系统上。 /var/log/cloudera-scm-agent(可用:1.6 吉字节 (11.18%),容量:14.5 吉字节)
修改 /etc/cloudera-scm-server/config.ini
# Parcel directory. Unpacked parcels will be stored in this directory.
# Downloaded parcels will be stored in <parcel_dir>/../parcel-cache
# parcel_dir=/opt/cloudera/parcels
parcel_dir=/home/ubuntu/data_disk/parcels
cdh spark-shell 报错
spark-shell java.lang.NoClassDefFoundError: org/apache/hadoop/fs/FSDataInput
error retrieving current directory: getcwd: cannot access parent directories
看到的解决方法:
在spark2的配置文件:/ect/spark2/spark-env.sh
export SPARK_DIST_CLASSPATH="$SPARK_DIST_CLASSPATH:$(hadoop classpath)"
但是没用。因为我自己部署了spark2.3
后面尝试的方法:
pwd
/home/ubuntu/data_disk/parcels/SPARK2-2.3.0.cloudera3-1.cdh5.13.3.p0.458809/lib/spark2
#在spark2目录下提交任务:
/bin/spark-submit --class org.apache.spark.examples.SparkPi --master yarn ./examples/jars/spark-examples_2.11-2.3.0.cloudera3.jar 10
# 在其他目录需要用spark2-submit,否则使用的是spark1