Configuring Data+
Scenarios
This section explains how to use Data+ to automatically perform complex tasks (such as video parsing, transcoding, and capturing frames) on data stored in OBS.
- First, create a workflow that specifies the sequence of tasks during data processing.
- Then, create an event trigger and bind it to the workflow. The event trigger defines the execution conditions of the workflow, and it specifies the events following which the workflow starts and the data that is processed.
You can create event triggers or replicate existing event triggers from one bucket to another one in the same region.
Limitations and Constraints
For details, see Data+.
Creating a Workflow
- In the navigation pane on the left of OBS Console, choose Object Storage.
- In the bucket list, click a bucket name, and then the Overview page of the bucket is displayed.
- In the navigation pane on the left, choose Data+ > Workflow. The workflow page is displayed. Authorization is required when you log in to the system for the first time.
- Click Create Workflow in the upper right corner of the page. The Workflow Orchestration page is displayed.
- Drag the built-in action templates or customized functions on the left pane to the orchestration area. Configure basic parameters and dynamic parameters on the Parameters Panel on the right pane. Action icons in the workflow change to blue after you finish the configuration.
For details about the parameters of built-in templates and customized functions, see Built-in Template Parameters.
To use the video parsing, thumbnailing, transcoding, and other templates, you need to grant MPC the permissions to access required buckets. For details, see Permissions.
- Move the mouse pointer over the small circle at the bottom of each action, then click and drag to draw a line to connect an action to another.
Actions in a workflow can only be connected in serial mode.
Figure 1 A complete workflow with serial actions
- Click Save in the upper-right corner.
- In the dialog box that is displayed, enter a workflow name and click OK.
All created workflows in the same region are displayed in the same workflow list. After a workflow is created, you need to create an event trigger or use an API to trigger the workflow.
Creating an Event Trigger
- In the navigation pane on the left of OBS Console, choose Object Storage.
- In the bucket list, click a bucket name, and then the Overview page of the bucket is displayed.
- In the navigation pane on the left, choose Data+ > Event Trigger. The Event Trigger page is displayed.
- Click Create in the upper left corner of the list. The Create Event Trigger dialog box is displayed.
Alternatively, in the workflow list, you can locate the target workflow and click Create Event Trigger in the Operation column. With this method, the workflow that the event trigger is bound to cannot be changed.
Figure 2 Creating an event trigger
- Set event trigger parameters.
Table 1 Event trigger parameters Parameter
Description
Trigger Name
User-defined trigger name. Each trigger name must be unique in the same bucket.
Associated Workflow
Workflow that is automatically executed when the event trigger condition is met.
You can select an existing workflow or create a workflow. An event trigger can be associated with only one workflow.
Event Source Bucket
Target bucket of the specified events. When a specified event occurs in the bucket, the associated workflow is triggered.
This parameter value is fixed to the bucket where the event trigger is created.
Event Source Type
Types of events that will make the event trigger effective upon occurrence. OBS supports the following event source types:
- ObjectCreated: all kinds of object creation operations, including PUT, POST, and COPY of objects, as well as the merging of parts.
- Put: PUT upload of objects
- Post: POST upload of objects
- Copy: copying object using the COPY method
- CompleteMultipartUpload: merging parts of multipart tasks
- ObjectRemoved: deleting objects
- Delete: deleting an object with a specified version ID
- DeleteMarkerCreated: deleting an object without a specified version ID
Multiple event source types are applicable to the same object. For example, if you have selected Put, Copy, and Delete, a notification message will be sent to you when the specified object is uploaded to, copied to, or deleted from the bucket. ObjectCreated contains Put, Post, Copy, and CompleteMultipartUpload. If you select ObjectCreated, the others are automatically selected and cannot be deselected. Similarly, if you select ObjectRemoved, Delete and DeleteMarkerCreated are automatically selected and cannot be deselected.
Prefix
Object name prefix shared by objects on which the specified events may occur.
NOTE:If neither the Prefix nor the Suffix is specified, the specified types of events apply to all objects in the bucket.
Suffix
Object name suffix shared by objects on which the specified events may occur.
NOTE:- A folder path ends with a slash (/). If you want to specify any folder, the suffix should ends with a slash (/).
- If neither the Prefix nor the Suffix is specified, the specified types of events apply to all objects in the bucket.
- Click OK to complete the configuration.
When the conditions of an event trigger are met, the actions in the associated workflow are automatically executed.
Replicating Event Triggers
- In the navigation pane on the left of OBS Console, choose Object Storage.
- In the bucket list, click a bucket name, and then the Overview page of the bucket is displayed.
- In the navigation pane on the left, choose Data+ > Event Trigger. The Event Trigger page is displayed.
- Click Replicate.
- Select a replication source, that is, the source bucket for which the event triggers were configured.
- The event triggers replicated from a source bucket will not overwrite existing triggers in the destination bucket, and any that conflict with the existing ones will not be replicated.
- The version of both the source and destination buckets must be 3.0.
- The source and destination buckets must be in the same region.
- You can remove the event triggers that you do not want to replicate.
- There can be 10 event triggers at most in a bucket. If the number of triggers you will replicate plus the number of existing triggers in the destination bucket exceeds 10, the replication will fail. Before replicating the triggers, delete some if necessary.
- Click OK to replicate the event triggers to the destination bucket.
Related Operations
You can also asynchronously start a workflow by an API. In this way, you can perform complex tasks on a single object, or immediately execute a workflow on an object.
Last Article: Data+ Overview
Next Article: Development Specifications on Custom Functions
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.