object SBX_WorldPerm {
def main(args:Array[String]){
val conf = new SparkConf()
val sc = new SparkContext(conf)
val sqlcontext = new org.apache.spark.sql.SQLContext(sc)
var perm : String = null
var h_loc : String = null
val SBXParquetFile = sqlcontext.parquetFile(args(0))
val SBXParquetFile_rdd = SBXParquetFile.rdd.map(fields => (fields(0),fields(3))).collect()
for((permission,hdfs_loc) <- SBXParquetFile_rdd){
perm = permission
h_loc = hdfs_loc
if(h_loc.startsWith("/sbx/"))
if(perm.endsWith("rwx"))
println(h_loc)
}
}
}
i slightly modified my code but still no luck, i am getting this error
<console>:70: error: type mismatch;
found : Any
required: String
perm = permission
^
<console>:71: error: type mismatch;
found : Any
required: String
h_loc = hdfs_loc
i am very much new to scala and any help would be appreciated. i looked into suggested answers but could not relate the problem to mine. thanks in advance