ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / Big Data / HDFS system
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
<hdfsConnection variable>.CopyTo (Function)
In french: <Variable hdfsConnexion>.CopieVers
Copies a file located on the local machine to a Hadoop server.
Example
// 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.
hdfsOverwriteIf 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.
Component: wd300big.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/20/2024

Send a report | Local help