You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/08/05 14:46:41 UTC
[GitHub] [spark] cloud-fan commented on a change in pull request #29357: [SPARK-32539][INFRA] Disallow `FileSystem.get(Configuration conf)` in style check by default
cloud-fan commented on a change in pull request #29357:
URL: https://github.com/apache/spark/pull/29357#discussion_r465781616
##########
File path: scalastyle-config.xml
##########
@@ -264,6 +264,19 @@ This file is divided into 3 sections:
of Commons Lang 2 (package org.apache.commons.lang.*)</customMessage>
</check>
+ <check customId="FileSystemGet" level="error" class="org.scalastyle.file.RegexChecker" enabled="true">
+ <parameters><parameter name="regex">FileSystem.get\([a-zA-Z_$][a-zA-Z_$0-9]*\)</parameter></parameters>
+ <customMessage><![CDATA[
+ Are you sure that you want to use "FileSystem.get(Configuration conf)"? If the input
+ configuration is not set properly, a default FileSystem instance will be returned. Please use
+ "FileSystem.get(URI uri, Configuration conf)" or "Path.getFileSystem()" instead.
Review comment:
`Path.getFileSystem()` also takes a conf parameter?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org