text: 5267/how-can-write-text-file-in-hdfs-not-from-an-rdd-in-spark-program
  Yes, you can go ahead and write a text file into HDFS using Spark.
  val filesystem = FileSystem.get(sparkContext.hadoopConfiguration);
  val output_stream = filesystem.create(new Path(file));
  val buffered_output = BufferedOutputStream(output_stream)
  buffered_output.write("My Text".getBytes("UTF-8"))
  buffered_output.close()
  Important thing to note down is FSDataOutputStream, is object output stream not a text output stream.
  Hey,
  You can try this:
  from pyspark import SparkContext
  SparkContext.stop(sc)
  sc ...READ MORE
  Some of the key differences between an RDD and ...READ MORE
  Hi!
  I found 2 links on github where ...READ MORE
  Instead of spliting on '\n'. You should ...READ MORE
  Firstly you need to understand the concept ...READ MORE
  Hi,
  You can create one directory in HDFS ...READ MORE
  In your case there is no difference ...READ MORE
  For accessing Hadoop commands & HDFS, you ...READ MORE
  // Collect data from input avro file ...READ MORE
  You can save the RDD using saveAsObjectFile and saveAsTextFile method. ...READ MORE
  OR
  Already have an account? Sign in.