How Spark read file with underline the beginning of the file name?
<p>When I use Spark to parse log files, I notice that if the first character of filename is <code>_</code> , the result will be empty. Here is my test code: </p>

<pre><code>SparkSession spark = SparkSession
  .builder()
  .appName("TestLog")
  .master("local")
  .getOrCreate();
JavaRDD&lt;String&gt; input = spark.read().text("D:\\_event_2.log").javaRDD();
System.out.println("size : " + input.count());
</code></pre>

<p>If I modify the file name to <code>event_2.log</code>, the code will run it correctly.
I found that the <code>text</code> function is defined as:</p>

<pre><code>@scala.annotation.varargs
def text(paths: String*): Dataset[String] = {
  format("text").load(paths : _*).as[String](sparkSession.implicits.newStringEncoder)
}
</code></pre>

<p>I think it could be due to <code>_</code> being scala's <code>placeholder</code>. How can I avoid this problem?</p>