title: Spark: Copy files from HDFS to local FS within function?
body: <p>I am trying to get my head around Spark and how to use 3rd party libraries which are not meant to deal with hdfs file system paths, but only now local file systems.</p>
  
  <p>Is it possible / advisable within functions() to load the file from HDFS and copy it to a local file? Within a function I am in a isolated piece of code that is executed on a single node, right? So, copying a file to a temporary file is within a function safe or at least not a problem?</p>
  
  <p>Are there other best practices for HDFS unaware 3rd party libraries?</p>