tencent cloud

Feedback

Managing Dependencies

Last updated: 2023-11-07 15:52:47
    Dependencies are external resources you use in jobs in the Stream Compute Service console. Two types of dependencies are available:
    JAR package: Used as the main package of a JAR job, or as a custom function or connector of a SQL or JAR job. You need to upload JAR packages in Dependencies, and reference them in JAR and SQL jobs.
    Configuration file: The resource files to be accessed by a JAR job, such as text or configuration files. After configuration files are uploaded in Dependencies, you can use them (accessing configurations, for example) in JAR jobs via a fixed path.

    Creating a dependency

    ‍Log in to the Stream Compute Service console‍, select Dependencies on the left sidebar, and click Create dependency. On the dependency creation page, set a region, dependency type, directory, ‍upload method, and dependency description, and click Confirm. The dependency created will appear in the dependency list.
    Region: The region selected must be the same as that where the job for which the dependency is created resides, or that of the private cluster associated.
    Dependency type: JAR package or configuration file.
    Upload method: The local and COS ‍methods are available.
    For the local method, click Select, and select and upload a local dependency file (up to 50 MB for a JAR package or 2 MB for a configuration file). To upload a larger package or file, submit a ticket.
    For the COS method, click Select, and select a dependency from the COS bucket list. To use dependencies this way, you must upload them to the COS console first.
    The dependency name must be identical to the uploaded file and cannot be changed. We recommend you specify a distinguishable and readable name for a file to upload.

    Uploading a new dependency version

    Upload a new dependency version as follows: Click Upload new version in the Operation column of the dependency for which a new version is to add, enter a version description in the pop-up window, and click Confirm to generate a new dependency version (with a version number automatically generated).
    Up to 20 versions can be retained for a dependency. If 20 versions already exist, and you still need to upload a new version, delete unnecessary versions first.

    Viewing dependency information

    Log in to the Stream Compute Service console, and select Dependencies to view all dependencies in the current region. Click a target dependency to view the version of its package and associated jobs (those that have referenced this dependency). A job in Stream Compute Service references to a specific version of a dependency, which means a job version references to a dependency version.

    Deleting a dependency

    You can delete a dependency as a whole via the dependency list. This operation will delete all versions of the dependency. You can also delete a specific version of the dependency via the Dependency version section.
    A ‍dependency version referenced by a job (regardless of the job status) cannot be deleted directly. Instead, you need to first delete the appropriate job version or remove the reference to the dependency version from the job version, and then delete the dependency version. When a dependency version cannot be deleted, the dependency as a whole cannot be deleted directly, either.

    Viewing a file

    If the dependency type is configuration file, View will be available in the Operation column of the dependency version list, allowing you to view the content of the configuration file.
    For some existing dependencies, their names may be different from those of the corresponding files in COS. In this case, View will display the file name in COS, which can be used for file call in a program.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support