title: Reading csv files stored on hdfs using sparklyr from local desktop
body: <p>We are trying to load a csv file thats stored in HDFS  using the spark_read_csv function available in sparklyr. The R code runs on a windows desktop and is configured to connect to the remote yarn cluster in yarn-client mode to submit and execute jobs. The version of spark being used is 1.6.0 .
  We have included the com.databricks_spark-csv_2.10-1.0.3.jar and org.apache.commons_commons-csv-1.1.jar to the spark class path as spark 1.6.0 does not support CSV.
  The Issue: When we call </p>
  
  <pre><code>spark_read_csv(sc=sc
                           ,path ="/user/xyz/adv.csv"
                           ,name ="FinStatement"
                           ,infer_schema = TRUE
                           ,header = TRUE
                           )
  </code></pre>
  
  <p>the  system looks up the file in remote hdfs after it prepends the drive letter 'C' to the path name. The hdfs location searched by the code is hdfs://machine-name/C:/user/user1/adv.csv instead of looking at hdfs://machine-name/user/user1/adv.csv, hence failing to retrieve the file.
  Any help in resolving the issue is greatly appreciated.</p>
  
  <p>Spark version : 1.6.0
  Sparklyr version : 0.5.6
  Hadoop version : 2.6.0
  Exception trace : </p>
  
  <pre><code>Error: java.lang.IllegalArgumentException: Pathname /C:/user/user1/adv.csv from hdfs://machine-name/C:/user/p587722/adv.csv is not a valid DFS filename.
      at org.apache.hadoop.hdfs.DistributedFileSystem.getPathName(DistributedFileSystem.java:196)
      at org.apache.hadoop.hdfs.DistributedFileSystem.access$000(DistributedFileSystem.java:105)
      at org.apache.hadoop.hdfs.DistributedFileSystem$18.doCall(DistributedFileSystem.java:1118)
      at org.apache.hadoop.hdfs.DistributedFileSystem$18.doCall(DistributedFileSystem.java:1114)
      at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
      at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1114)
      at org.apache.hadoop.fs.Globber.getFileStatus(Globber.java:57)
  </code></pre>
  
  <p>Rstudio session info:</p>
  
  <pre><code>R version 3.3.2 (2016-10-31)
  Platform: x86_64-w64-mingw32/x64 (64-bit)
  Running under: Windows 7 x64 (build 7601) Service Pack 1
  
  locale:
  [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
  [4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    
  
  attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base     
  
  other attached packages:
  [1] stringr_1.2.0  rJava_0.9-8    dplyr_0.7.1    sparklyr_0.5.6
  
  loaded via a namespace (and not attached):
   [1] Rcpp_0.12.10     rstudioapi_0.6   bindr_0.1        magrittr_1.5     xtable_1.8-2     R6_2.2.0         rlang_0.1.1     
   [8] httr_1.2.1       tools_3.3.2      DBI_0.7          withr_1.0.2      dbplyr_1.1.0     htmltools_0.3.6  assertthat_0.2.0
  [15] rprojroot_1.2    digest_0.6.12    tibble_1.3.3     bindrcpp_0.2     shiny_1.0.3      base64enc_0.1-3  glue_1.1.1      
  [22] mime_0.5         stringi_1.1.3    backports_1.0.5  jsonlite_1.5     httpuv_1.3.3     pkgconfig_2.0.1 
  </code></pre>