Delete File/Directory

Operation Name

Delete File/Directory

Function Overview

Deletes the file or directory on HDFS.

Properties

For information about using variables, refer to "variables".
Basic settings
Item name Required/Optional Use of variables Description Remarks
Name Required Not available Enter the name to show on the script canvas.  
Required settings
Item name Required/Optional Use of variables Description Remarks
Destination Required Not available Select a global resource.
For more details on Global Resource settings, refer to "Global Resource Property".
  • [Add]:
    Adds a new global resource.
  • [Edit list]:
    Enables to edit the global resource settings in the "Edit resource list" screen.
 
HDFS Path Required Available Enter the path of HDFS file/directory.
  • The following characters are not available.
    • space < > " ^ [ ] { } % | ` : ;
  • Multibyte characters are not available.
Delete settings
Item name Required/Optional Use of variables Description Remarks
Error occurs if file/directory does not exist. Optional Not available Specify whether to cause error if file/directory does not exist.  
Delete directory Optional Not available Specify whether the deleting target is directory or not.  
Process recursively Optional Not available Specify whether to delete directory recursively or not.  
Comment
Item name Required/Optional Use of variables Description Remarks
Comment Optional Not available You can write a short description of this adapter.
The description will be reflected in the specifications.
 

Schema

Input Schema

None.

Output Schema

None.

Transaction

Transaction is not supported.

PSP Usage

PSP is not supported.

Available Component Variables

Variable name Description Remarks
path The path of file/directory on the deleting HDFS is stored.
  • The value defaults to null.
message_category Stroes the category to which corresponding message code belongs to, when an error occurs.
  • The value defaults to null.
message_code Stores its corresponding message code of occured error.
  • The value defaults to null.
message_level Stores the severity of the corresponding message code of the occured error.
  • The value defaults to null.
error_type Stores the type of the occured error.
  • The value defaults to null.
  • Error is represented in the format depicted below.
    Example:java.io.FileNotFoundException
  • The message may vary depending on DataSpider Servista version.
error_message Stores the error message for the occured error.
  • The value defaults to null.
  • The message may vary depending on DataSpider Servista version.
error_trace Stores stack trace of the occurred error.
  • The value defaults to null.
  • The message may vary depending on DataSpider Servista version or the client application used.

Specification Limits

None.

Main Exceptions

Exception name Cause Solution
ResourceNotFoundException
Resource definition is not found. Name:[]
[Destination] is not specified. Specify [Destination].
ResourceNotFoundException
Resource definition is not found. Name:[<Global resource name>]
Resource definition selected in [Destination] is not found. Check the global resource specified in [Destination].
InvalidPropertyConfigurationException
<Property name> is not specified.
[<Property name>]is not specified. Specify [<Property name>].
FileIsNotDirectoryException Path entered in [HDFS path] is the file. Enter the directory path into [HDFS path], or remove the check from [Delete directory] in [Delete settings].
FileIsDirectoryException Path entered in [HDFS path] is the directory. Enter the file path into [HDFS path], or put check in [Delete directory] of [Delete settings].
java.io.FileNotFoundException File/directory specified in [HDFS path] does not exist. Change the file name of [HDFS path], or remove the check from [Error occurs if file/directory does not exist] in [Delete settings].
DirectoryIsNotEmptyException File/directory is included in the deleting directory. Delete and empty the file/directory in the deleting directory,or check [Process recursively] in [Delete settings].