flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uce <...@git.apache.org>
Subject [GitHub] flink pull request #2288: Feature/s3 a fix
Date Mon, 15 Aug 2016 10:20:34 GMT
Github user uce commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2288#discussion_r74743404
  
    --- Diff: flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java ---
    @@ -255,4 +257,33 @@ private Utils() {
     		}
     		return result;
     	}
    +
    +	/**
    +	 * Recursive directory copy to work around FileSystem implementations that do not implement
it.
    +	 * @param fs
    +	 * @param localPath
    +	 * @param remotePath
    +	 * @throws IOException
    +     */
    +	protected static void copyFromLocalFile(final FileSystem fs, final Path localPath, final
Path remotePath) throws IOException {
    +		File localFile = new File(localPath.toUri());
    +		if (localFile.isDirectory()) {
    +			for (File file : localFile.listFiles()) {
    +				copyFromLocalFile(fs, new Path("file://" + file.getAbsolutePath()), new Path(remotePath,file.getName()));
    +			}
    +		} else {
    +			fs.copyFromLocalFile(localPath,remotePath);
    +		}
    +	}
    +
    +	public static Path checkScheme(final Path localRsrcPath) throws IOException {
    --- End diff --
    
    Can you make this private and remove the `final` modifier? What is the current behaviour
if no scheme is specified?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message