title: importing csv file in rstudio from hdfs using sparkR
body: <p>i have stored .csv file on Hadoop HDFS,</p>
  
  <pre><code>hadoop dfs -ls /afs
  DEPRECATED: Use of this script to execute hdfs command is deprecated.
  Instead use the hdfs command for it.
  
  17/01/12 15:15:49 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  Found 1 item
  -rw-r--r--   2 hduser supergroup  203572404 2017-01-10 12:04 /afs/Accounts.csv
  </code></pre>
  
  <p>i want to import this file to rstudio using SparkR. </p>
  
  <p>i tried following command:</p>
  
  <pre><code>sc&lt;-sparkR.session(master = "spark://MasterNode:7077",appName = "SparkR",sparkHome = "/opt/spark")
  sContext&lt;- sparkRSQL.init(sc)
  library(data.table)
  library(dplyr)
  
  df&lt;- read.df(sContext, "hdfs://MasterNode:54310/afs/Accounts.csv")
  </code></pre>
  
  <p>following error occurred:</p>
  
  <pre><code>&gt; df&lt;- read.df(sContext, "hdfs://MasterNode:54310/afs/Accounts.csv")
  Error in handleErrors(returnStatus, conn) : 
    No status is returned. Java SparkR backend might have failed.
  In addition: Warning message:
  In writeBin(requestMessage, conn) : problem writing to connection
  </code></pre>
  
  <p>please help me to import Accounts.csv file into rstudio using SparkR.</p>