Apache spark apache spark dataframe支持的最大列数是多少

Apache spark apache spark dataframe支持的最大列数是多少,apache-spark,spark-dataframe,apache-spark-mllib,Apache Spark,Spark Dataframe,Apache Spark Mllib,火花版本:1.5.2带纱线2.7.1.2.3.0.0-2557 我在通过spark shell探索数据时遇到了一个问题,我试图创建一个包含3000列的非常胖的数据框架。代码如下: val valueFunctionUDF = udf((valMap: Map[String, String], dataItemId: String) => valMap.get(dataItemId) match { case Some(v) => v.toDouble case None

火花版本:1.5.2带纱线2.7.1.2.3.0.0-2557

我在通过spark shell探索数据时遇到了一个问题,我试图创建一个包含3000列的非常胖的数据框架。代码如下:

val valueFunctionUDF = udf((valMap: Map[String, String], dataItemId: String) =>
  valMap.get(dataItemId) match {
  case Some(v) => v.toDouble
  case None => Double.NaN
})
|-- combKey: string (nullable = true)
|-- valMaps: map (nullable = true)
|    |-- key: string
|    |-- value: string (valueContainsNull = true)
s1是主数据帧和模式,如下所示:

val valueFunctionUDF = udf((valMap: Map[String, String], dataItemId: String) =>
  valMap.get(dataItemId) match {
  case Some(v) => v.toDouble
  case None => Double.NaN
})
|-- combKey: string (nullable = true)
|-- valMaps: map (nullable = true)
|    |-- key: string
|    |-- value: string (valueContainsNull = true)
运行代码后:

dataItemIdVals.foreach{w =>
 s1 = s1.withColumn(w, valueFunctionUDF($"valMaps", $"combKey"))}
我的终端在上面的列后面卡住,信息被打印出来:

16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_3_piece0 on 172.22.49.20:41494 in memory (size: 7.6 KB, free: 5.2 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_3_piece0 on xxxxx:43026 in memory (size: 7.6 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_3_piece0 on xxxxx:44890 in memory (size: 7.6 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_3_piece0 on xxxxx:52020 in memory (size: 7.6 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_3_piece0 on xxxxx:33272 in memory (size: 7.6 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_3_piece0 on xxxxx:48481 in memory (size: 7.6 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_3_piece0 on xxxxx:44026 in memory (size: 7.6 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_3_piece0 on xxxxx:34539 in memory (size: 7.6 KB, free: 5.0 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_3_piece0 on xxxxx:43734 in memory (size: 7.6 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_3_piece0 on xxxxx:42769 in memory (size: 7.6 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_3_piece0 on xxxxx:60603 in memory (size: 7.6 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_3_piece0 on xxxxx:59102 in memory (size: 7.6 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_3_piece0 on xxxxx:47578 in memory (size: 7.6 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_3_piece0 on xxxxx:43149 in memory (size: 7.6 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_3_piece0 on xxxxx:52488 in memory (size: 7.6 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_3_piece0 on xxxxx:52298 in memory (size: 7.6 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO ContextCleaner: Cleaned accumulator 9
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_2_piece0 on 172.22.49.20:41494 in memory (size: 7.3 KB, free: 5.2 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_2_piece0 on xxxxx:33272 in memory (size: 7.3 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_2_piece0 on xxxxx:59102 in memory (size: 7.3 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_2_piece0 on xxxxx:44026 in memory (size: 7.3 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_2_piece0 on xxxxx:42769 in memory (size: 7.3 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_2_piece0 on xxxxx:43149 in memory (size: 7.3 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_2_piece0 on xxxxx:43026 in memory (size: 7.3 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_2_piece0 on xxxxx:52298 in memory (size: 7.3 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_2_piece0 on xxxxx:42890 in memory (size: 7.3 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_2_piece0 on xxxxx:47578 in memory (size: 7.3 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_2_piece0 on xxxxx:60603 in memory (size: 7.3 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_2_piece0 on xxxxx:43734 in memory (size: 7.3 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_2_piece0 on xxxxx:48481 in memory (size: 7.3 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_2_piece0 on xxxxx:52020 in memory (size: 7.3 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_2_piece0 on xxxxx:52488 in memory (size: 7.3 KB, free: 5.1 GB)
 16/07/11 12:20:54 INFO BlockManagerInfo: Removed broadcast_2_piece0 on xxxxx:34539 in memory (size: 7.3 KB, free: 5.0 GB)
 16/07/11 12:20:54 INFO ContextCleaner: Cleaned accumulator 8
 16/07/11 12:20:54 INFO ContextCleaner: Cleaned shuffle 0
 16/07/11 12:20:54 INFO ContextCleaner: Cleaned accumulator 7
 16/07/11 12:20:54 INFO ContextCleaner: Cleaned accumulator 6
 16/07/11 12:20:54 INFO ContextCleaner: Cleaned accumulator 5
 16/07/11 12:20:54 INFO ContextCleaner: Cleaned accumulator 4
sparkUI上没有发生任何事情,我猜spark正在为新的数据帧计算一些元数据(列数等)?以前有人见过这种问题吗?不管怎么说,你想四处转转吗