Contents
The TIBCO StreamBase® File Delete Adapter for Apache Hadoop Distributed File System (HDFS) deletes a file from the HDFS system.
The adapter deletes a file in response to the receipt of a tuple on its control input port.
The adapter has a sample, described in HDFS File Writer and File System Adapter Sample.
Note
Please note that this adapter has been marked deprecated and you should refer to the TIBCO StreamBase® HDFS File System Adapter with the delete command instead.
This section describes the properties you can set for this adapter, using the various tabs of the Properties view in StreamBase Studio.
Name: Use this field to specify or change the component's name, which must be unique in the application. The name must contain only alphabetic characters, numbers, and underscores, and no hyphens or other special characters. The first character must be alphabetic or an underscore.
Adapter: A read-only field that shows the formal name of the adapter.
Class: A field that shows the fully qualified class name that implements the functionality of this adapter. Use this class name when loading the adapter in StreamSQL programs with the APPLY JAVA statement. You can right-click this field and select Copy from the context menu to place the full class name in the system clipboard.
Start with application: If this field is set to Yes or to a module parameter that evaluates to true, an instance of this adapter starts as part of the containing StreamBase Server. If this field is set to No or to a module parameter that evaluates to false, the adapter is loaded with the server, but does not start until you send an sbadmin resume command, or until you start the component with StreamBase Manager. With this option set to No or false, the adapter does not start even if the application as a whole is suspended and later resumed. The recommended setting is selected by default.
Enable Error Output Port: Select this check box to add an Error Port to this component. In the EventFlow canvas, the Error Port shows as a red output port, always the last port for the component. See Using Error Ports and Error Streams to learn about Error Ports.
Description: Optionally enter text to briefly describe the component's purpose and function. In the EventFlow canvas, you can see the description by pressing Ctrl while the component's tooltip is displayed.
Property | Data Type | Default | Description | StreamSQL Property |
---|---|---|---|---|
Enable Status Port | check box | Selected | If enabled, a status output port is present on which tuples are emitted to convey to important events within the adapter. | EnableStatusPort |
Log Level | drop-down list | INFO | Controls the level of verbosity the adapter uses to send notifications to the console. This setting can be higher than the containing application's log level. If set lower, the system log level will be used. Available values, in increasing order of verbosity, are: OFF, ERROR, WARN, INFO, DEBUG, TRACE, and ALL. | LogLevel |
Use the Concurrency tab to specify parallel regions for this instance of this component, or multiplicity options, or both. The Concurrency tab settings are described in Concurrency Options, and dispatch styles are described in Dispatch Styles.
Caution
Concurrency settings are not suitable for every application, and using these settings requires a thorough analysis of your application. For details, see Execution Order and Concurrency, which includes important guidelines for using the concurrency options.
The HDFS File Delete adapter's ports are used as follows:
-
Control (input): Tuples enqueued on this port cause the adapter to delete a file with the associated URI. The schema for this port has the following field:
-
FileName, string, the name of the URI to delete. If null, an error will be reported on the status port.
-
User, string, the user name to use when deleting the file. If null the user executing the sbapp is used.
-
Recursive, boolean, A boolean flag to determine if the URI provided should be deleted recursively.
-
-
Status (output): The adapter emits tuples from this port when significant events occur, such as when an attempt to delete a file fails. The schema for this port has the following fields:
-
Type, string: returns the level type of this event (ERROR, WARN, INFO):
-
Action, string: returns an action associated with the event Type:
-
Delete
-
Rejected
-
-
Object, string: returns an event type-specific value, such as the name of the URI which a delete failed or the control input tuple that was rejected.
-
Message, string: Returns a human-readable description of the event.
-
The HDFS File Delete adapter uses typecheck messages to help you configure the adapter within your StreamBase application. In particular, the adapter generates typecheck messages for the following reasons:
-
The Control Input Port does not have exactly the correct fields with the correct type associated.
The adapter generates warning messages during runtime under various conditions, including:
-
A control tuple is received with a null value in its FileName field.
-
An error occurs attempting to delete a file.
When suspended, the adapter stops processing requests to delete files.
When resumed, the adapter once again starts processing requests to delete files.