HDFS File Delete Adapter

Introduction

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.

HDFS File Delete Properties

This section describes the properties you can set for this adapter, using the various tabs of the Properties view in StreamBase Studio.

General Tab

Name: Use this required field to specify or change the name of this instance of this component, which must be unique in the current EventFlow module. 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 name: Shows the fully qualified class name that implements the functionality of this adapter. If you need to reference this class name elsewhere in your application, 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 (default) or to a module parameter that evaluates to true, this instance of this adapter starts as part of the JVM engine that runs this EventFlow module. If this field is set to No or to a module parameter that evaluates to false, the adapter instance is loaded with the engine, but does not start until you send an sbadmin resume command, or until you start the component with StreamBase Manager.

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 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.

Adapter Properties Tab

Property Data Type Default Description
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.
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.

Concurrency Tab

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.

Description of This Adapter's Ports

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.

Typechecking and Error Handling

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.

Suspend and Resume Behavior

When suspended, the adapter stops processing requests to delete files.

When resumed, the adapter once again starts processing requests to delete files.