Before you use a wrapper, you must create and configure the wrapper, deploy the wrapper to and test it in the development environment, and then deploy the wrapper to the production environment.
- Create a wrapper.
- Log on to the DataWorks console.
- In the left-side navigation pane, click Workspaces.
- In the top navigation bar, select the region where the target workspace resides. Find the target workspace and click Data Analytics in the Actions column.
- On the DataStudio page, click Node Config in the top navigation bar. The Node Plugin list tab appears by default.
- Click Create in the upper-right corner.
- In the Please select plug-in type dialog box, select a wrapper type and click OK. By default, Engine type is selected.
You can select one of the following wrapper types in the Please select plug-in type dialog box:
- Engine type: If you select this wrapper type, you must upload a code package, for example, a JAR package, to define the functionality of the wrapper. Generally, a wrapper of this type is applicable to a node type that uses a custom compute engine.
- Business type: If you select this wrapper type, you must use a manually triggered workflow to define the functionality of the wrapper. Generally, a wrapper of this type is used to encapsulate multiple nodes to implement specific business logic.
- Configure the wrapper in the wizard that appears. In the Settings step, set relevant parameters.
Parameter Description Name The name of the wrapper. The name must start with a letter and can contain only letters, underscores (_), and digits. Owner The owner of the wrapper. You can select yourself or another member of the current workspace. If you select another member as the owner, note the following points:
- An administrator of a workspace cannot edit the custom wrappers of other members of the workspace.
- Only the owner of a workspace can edit the wrappers of other members.
Resource File The resource file that defines the functionality of the wrapper. You can use one of the following methods to specify a resource file: Upload a local file, Use an OSS object, and AppStudio.Note
- This parameter is available only when you select Engine type in the Please select plug-in type dialog box.
- The size of a local file can be up to 50 MB, and the size of a file that is stored in an Object Storage Service (OSS) bucket can be up to 200 MB.
Click Select File. In the Select File dialog box, select a method, complete corresponding configurations, and then click OK.
Class Name The full path of the class for implementing the wrapper.Note This parameter is available only when you select Engine type in the Please select plug-in type dialog box. Parameter Example The parameters that are designed based on the specified resource file.Note This parameter is available only when you select Engine type in the Please select plug-in type dialog box. Manual business process The manually triggered workflow that defines the functionality of the wrapper. Click Select manual business process. In the Select manual business process dialog box, select a manually triggered workflow from the drop-down list and click OK.Note This parameter is available only when you select Business type in the Please select plug-in type dialog box. Version The version of the wrapper. In this example, select Create Version 1. When you are editing or rolling back a version, select Overwrite Version. Description The description of the wrapper.
- Click Save and then Next.
After you click Save, the configurations in this step are saved by the system. If you are modifying a wrapper, note the following points:
- If you modify the basic settings of the wrapper, the modification takes effect after you click Save. You do not need to deploy the wrapper again.
- If you modify the resource file, for example, the JAR package, of the wrapper, the modification takes effect only after you deploy the wrapper again.
- In the Deploy in Development Environment step, confirm the configurations and click Deploy in Development Environment. The real-time deployment progress appears.
- Wait until the deployment is completed and click Next.
- Test the wrapper in the development environment.
- In the Test in Development Environment step, set the Parameter configuration in and Environment variables parameters.
- Click Test.
- Confirm the test result and select the Test Passed check box.
- Click Next.
- In the Deploy in Production Environment step, click Deploy to production environment. The real-time deployment progress appears.
Note The wrapper to be deployed to the production environment must be of the latest version, have been deployed to the development environment, and have passed the test. Otherwise, a message appears, indicating that the deployment to the production environment fails.
- Wait until the deployment is completed. Click Complete. The Node Plugin list tab appears.
The information about the wrapper you created appears on this tab. You can perform the following operations on the wrapper:
- Click Settings in the Actions column to configure the wrapper. After you click Settings, you are navigated to a step in the configuration wizard of the wrapper. Which step you are navigated to depends on existing configurations of the wrapper.
- Click View Versions in the Actions column to view the version information about the wrapper. After you click View Versions, the View Versions dialog box appears. You can perform the following operations on each version:
- View: View the basic information about the current version.
- Roll Back: Roll back the wrapper from the current version to the selected version. After you click this button, the system creates a new version for the wrapper. In the new version, the wrapper uses the basic settings and resource file of the selected version. The new version number equals the latest version number among all the versions plus 1.
- Download: Download the resource file of the current version.
- Click Delete in the Actions column to delete the wrapper. After you click Delete, the Delete Wrapper message appears. Click OK.
Notice Before you delete a wrapper, make sure that the wrapper is not associated with any node types.