ListFileStatus
You can use the ListFileStatus activity to list the status of a specified file or directory in HDFS.
General
In the General tab, you can specify the activity name in the process and establish a connection to HDFS.
The following table lists the configurations in the General tab of the ListFileStatus activity:
Field | Module Property? | Description |
---|---|---|
Name | No | The name to be displayed as the label for the activity in the process. |
HDFSConnection | Yes | The HDFS Connection shared resource that is used to create a connection between the plug-in and HDFS. Click
to select an HDFS Connection shared resource.
If no matching HDFS Connection shared resources are found, click Create Shared Resource to create one. For more details, see Creating an HDFS Connection. |
Description
In the Description tab, you can enter a short description for the ListFileStatus activity.
Input
In the Input tab, you can specify the path of the file or directory that you want to list status for.
The following table lists the input elements in the Input tab of the ListFileStatus activity:
Output
In the Output tab, you can view detailed file status.
The following table lists the output elements in the Output tab of the ListFileStatus activity:
Output Item | Data Type | Description |
---|---|---|
fileinfo | Complex | The file information.
This element contains the elements from accessTime to pathSuffix that are listed in this table. |
accessTime | Long | The access time of the file in milliseconds. |
blockSize | Long | The block size of the file. |
length | Long | The number of bytes in a file. |
modification
Time |
Long | The modification time of the file in milliseconds. |
replication | Long | The number of replications of the file. |
owner | String | The user name of the file owner. |
type | String | The type of the path object, FILE or DIRECTORY. |
group | String | The group that is associated with the file. |
permission | String | The permission of the file. |
pathSuffix | String | The path suffix of the file. |
Fault
In the Fault tab, you can view the error code and error message of the ListFileStatus activity. See Error Codes for more detailed explanation of errors.
The following table lists the error schema elements in the Fault tab of the ListFileStatus activity:
Error Schema Element | Data Type | Description |
---|---|---|
msg | String | The error message description that is returned by the plug-in. |
msgCode | String | The error code that is returned by the plug-in. |
exception | String | The exception occurs when the plug-in has internal errors. |
message | String | The error message that is returned by the server. |
javaClassName | String | The name of the Java class where an error occurs. |