spark :12: error: not found: value sc

后端 未结 7 896
北荒
北荒 2020-12-19 05:00

I wrote the following:

val a = 1 to 10000
val b = sc.parallelize(a)

and it shows error saying:

:12: error: n         


        
7条回答
  •  南笙
    南笙 (楼主)
    2020-12-19 05:47

    As stated in this thread, one solution may be to switch off permissions checking.

    In cloudera manager, go to hdfs configuration under advanced and put the following code in "HDFS Service Advanced Configuration Snippet (Safety Valve) for hdfs-site.xml" :

    
    dfs.permissions
    false
    
    

    After that, it is necessary to restart the HDFS component.

    It worked for me. It might not be appropriate for a production environment, however.

提交回复
热议问题