That make sense. So if override is false and remote file already exist, will it throw exception?

-Julia

-----Original Message-----
From: Scott Inglis <[EMAIL PROTECTED]>
Sent: Wednesday, July 11, 2018 4:27 PM
To: [EMAIL PROTECTED]
Subject: [PROPOSAL REEF.NET] Adding an overwrite variable to IFileSystem CopyFromLocal

Hello,

I noticed that some of the file implementations like LocalFileSystem and Azure Blob will overwrite the file on a remote file system when copying from the client. However HDFS file implementation does not overwrite.

This should have a consistent behavior. Also I want to control if the overwrite is done or not. So I would like to make the following proposal:
1) Modify the IFileSystem.CopyFromLocal API to take in an overwrite boolean parameter
2) The overwrite parameter will default to true

Here is what the api will look like:
void CopyFromLocal(string localFileName, Uri remoteFileUri, bool overwrite = true);
NOTE: With this change the current behavior in HDFS as overwrite will now be true.

Thoughts?

Thanks,

Scott
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB