List of Topics:
Research Breakthrough Possible @S-Logix pro@slogix.in

Office Address

Social List

How to access HDFS file system in Apache Spark?

  • The following segment accesses the file inputdata.txt stored in HDFSCode Segment

    SparkConf conf = new SparkConf().setAppName("Sample");
    JavaSparkContext sc = new JavaSparkContext(conf);
    JavaRDD file =sc.textFile("hdfs://localhost:54310/inputdata.txt");