Skip to content

Instantly share code, notes, and snippets.

@ThomRoman
Last active February 4, 2021 01:15
Show Gist options
  • Save ThomRoman/28c19ef07190417d9db1e82502dcf4fc to your computer and use it in GitHub Desktop.
Save ThomRoman/28c19ef07190417d9db1e82502dcf4fc to your computer and use it in GitHub Desktop.
print(type(sc)) # pyspark.contex.SparkContext
integerList = range(1,1001)
print(leng(integerList))
integerListRDD = sc.parallelize(integerList,8)
print(type(integerListRDD))
print(integerListRDD.getNumPartitions())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment