Java 使用本机方法加载文件时,不要将下划线替换为空格
我在Spark工作中加载了很多文件,它们都有这样的名称:“file\u owner.extension”。我用来阅读它们的代码是:Java 使用本机方法加载文件时,不要将下划线替换为空格,java,apache-spark,pyspark,apache-spark-sql,spark-streaming,Java,Apache Spark,Pyspark,Apache Spark Sql,Spark Streaming,我在Spark工作中加载了很多文件,它们都有这样的名称:“file\u owner.extension”。我用来阅读它们的代码是: JavaPairRDD<String, PortableDataStream> imageByteRDD = jsc.binaryFiles(sourcePath); fileName extracted by the key of the PairRDD created as above: Capture11 (Custom).PNG fileNa
JavaPairRDD<String, PortableDataStream> imageByteRDD = jsc.binaryFiles(sourcePath);
fileName extracted by the key of the PairRDD created as above: Capture11 (Custom).PNG
fileName extracted with a FileVisitor in Java 1.7: Capture11_(Custom).PNG