Click or drag to resize

INameServerClientProtocolCreateFile Method

Creates a new file in the specified directory.

Namespace:  Ookii.Jumbo.Dfs
Assembly:  Ookii.Jumbo.Dfs (in Ookii.Jumbo.Dfs.dll) Version: 2.0.0
Syntax
BlockAssignment CreateFile(
	string path,
	int blockSize,
	int replicationFactor,
	bool localReplica,
	RecordStreamOptions recordOptions
)

Parameters

path
Type: SystemString
The full path of the new file.
blockSize
Type: SystemInt32
The size of the blocks in the file, or zero to use the file system default block size.
replicationFactor
Type: SystemInt32
The number of replicas to create of the file's blocks, or zero to use the file system default replication factor.
localReplica
Type: SystemBoolean
to put the first replica on the node that's creating the file if it's part of the DFS cluster; otherwise, .
recordOptions
Type: Ookii.Jumbo.IORecordStreamOptions
The record options for the file.

Return Value

Type: BlockAssignment
The BlockAssignment for the first block of the file.
Exceptions
ExceptionCondition
ArgumentNullExceptionpath is .
ArgumentExceptionpath is not an absolute path, contains an empty component, contains a file name, or refers to an existing file or directory.
DirectoryNotFoundExceptionPart of the path specified in path does not exist.
See Also