IPWorks Cloud 2020 C++ Edition

Questions / Feedback?

JoinFileBlocks Method

Joins multiple files' blocks together into one file.

Syntax

ANSI (Cross Platform)
int JoinFileBlocks(const char* lpszTargetFilePath, const char* lpszSourceFilePaths);

Unicode (Windows)
INT JoinFileBlocks(LPCWSTR lpszTargetFilePath, LPCWSTR lpszSourceFilePaths);
- (void)joinFileBlocks:(NSString*)targetFilePath :(NSString*)sourceFilePaths;
#define MID_HADOOPDFS_JOINFILEBLOCKS 11

IPWORKSCLOUD_EXTERNAL int IPWORKSCLOUD_CALL IPWorksCloud_HadoopDFS_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);

Remarks

This method joins the blocks from the files at one or more SourceFilePaths onto the end of the file at TargetFilePath. (If this operations is successful, the original source files will no longer be accessible.)

The order of the source files' paths in SourceFilePaths determines the order in which their blocks are joined onto the file at TargetFilePath.

Usage Constraints

The server imposes a number of constraints that must be satisfied in order for the join operation to complete successfully.

TargetFilePath and SourceFilePaths must both be non-empty.

SourceFilePaths must be specified as a comma-separated list of source file paths, with no duplicates or paths that match TargetFilePath.

Additionally, all files referred to by both TargetFilePath and SourceFilePaths must satisfy the following constraints:

  • All files must already exist.
  • All files must be located in the exact same directory (i.e., all files must be siblings).
  • The block size of all source files must be less than or equal to the block size of the target file.

If any of the above constraints are not satisfied, the server will return an error.

The class will take care of verifying that all parameters are non-empty and that all paths begin with a forward slash (/).

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Cloud 2020 C++ Edition - Version 20.0 [Build 8265]