Research breakthrough possible @S-Logix pro@slogix.in

Office Address

  • 2nd Floor, #7a, High School Road, Secretariat Colony Ambattur, Chennai-600053 (Landmark: SRM School) Tamil Nadu, India
  • pro@slogix.in
  • +91- 81240 01111

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");