|
|
|
|
|
<hdfsConnection variable>.CopyTo (Function) In french: <Variable hdfsConnexion>.CopieVers Copies a file located on the local machine to a Hadoop server. // Connection MyConnection is hdfsConnection MyConnection.namenode = "MyServer" MyConnection.User = "Admin" MyConnection.OpenConnection() // Copy from the local computer to the server MyConnection.CopyTo("c:\temp\test.data", "/tmp/test.data")
Syntax
<Result> = <Connection>.opyTo(<Source file> , <Destination file> [, <Options> [, <Permission>]])
<Result>: Boolean - if the file was copied successfully,
- False if a problem occurs. ErrorInfo is used to identify the error.
<Connection>: hdfsConnection variable Name of the hdfsConnection variable that corresponds to connection to the Hadoop server. <Source file>: Character string Path of local file to copy (up to 260 characters). This parameter can correspond to:- a file name. This file will be automatically searched in the current directory (returned by fCurrentDir).
- a file name with its full or relative path. A UNC path can be used.
<Destination file>: Character string Absolute path of file copied onto the Hadoop server. This path is case sensitive. <Options>: Optional constant Options for copying: | | hdfsDefault (Default value) | If the destination file already exists on the server, it is not averwritten. | hdfsOverwrite | If the destination file already exists on the server, it is replaced with the file copied from the local computer. |
<Permission>: Optional hdfsRights variable Name of the hdfsRights variable defining the rights of the destination file on the server. By default, all the rights are granted to all the users.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|