This topic answers frequently asked questions (FAQs) about managing and using Realtime Compute for Apache Flink workspaces, projects, and jobs. These questions cover topics such as resource scaling, viewing workspace IDs, checking job engine versions, and configuring job parameters.
Workspace and namespace management
Job management
Can I change the name of a workspace?
In the Realtime Compute for Apache Flink console, click in the Actions column of the target workspace.
Click the workspace name to modify it.
Can I change the VPC and virtual switch?
You cannot change the VPC, but you can change the virtual switch.
How do I view information such as the workspace ID?
In the Realtime Compute for Apache Flink console, click in the Actions column of the target workspace to view information such as the workspace ID.

Resource allocation failed during project scale-in
Problem description
The "Resource allocation failed" message is displayed during a project scale-in.

Cause
All resources are allocated or in use.
Solution
First, reduce the resources allocated to the resource queue. For more information, see Modify the resource amount. Then, you can scale in the project.

Flink compute resource upgrade has no effect
Subscription
Flink resources must be scaled from the top down. Resources are allocated from the workspace to projects, and then from projects to resource queues. For more information, see Resource adjustment.
pay-as-you-go
Pay-as-you-go is a postpaid billing method. The system settles your bill based on the actual resource usage of your workspace, so resource scaling is not required. In the Actions column of the target workspace, click . You can then configure resource queues for the project to meet the resource isolation and management needs of batch job scenarios. For more information, see Manage resource queues.
How do I view the AccessKey ID and AccessKey secret?
AccessKey ID
For an Alibaba Cloud account: Log on to the Alibaba Cloud Management Console, move the pointer over your profile picture in the upper-right corner, and click AccessKey Management.
For a RAM user: For more information, see View the AccessKey information of a RAM user.
AccessKey secret
To prevent security risks, the AccessKey secret for an Alibaba Cloud account or a RAM user is displayed only when you create it and cannot be retrieved later. You must store the AccessKey secret in a secure location.
If you do not have your AccessKey information or have forgotten it, see Create an AccessKey.
How do I upload a file to OSS for a Flink job to use?
If you select OSS Bucket as the storage class when you create a Flink workspace, you can upload a file to the OSS Bucket that is attached to the workspace for a Flink job to use. You can also upload files for Flink jobs on the File Management page of the Realtime Compute for Apache Flink development console. For more information, see Manage files.
In the Realtime Compute for Apache Flink console, find the target workspace and choose in the Actions column to view information about the OSS Bucket that is attached to the workspace.

Upload the resource file to the target OSS Bucket.
Log in to the OSS console and upload the resource file to the /artifacts/namespaces directory in the target Bucket.

You can also upload the resource file by calling an API operation. For more information, see PutObject.
In the navigation pane of the Realtime Compute for Apache Flink development console, click File Management to view the resource file that you uploaded in the OSS console.

What do I do if an activated Flink workspace is not displayed in the Realtime Compute for Apache Flink console?
You can troubleshoot the issue by checking the following items. If the issue persists, submit a ticket.
Confirm that the Flink workspace has been initialized. This process usually takes 5 to 10 minutes.
Make sure that you have selected the correct region at the top of the Realtime Compute for Apache Flink console page. The workspace is displayed only in the region that you selected when you created it.

If you are logged on as a RAM user, make sure that the user has the required permissions for the Realtime Compute for Apache Flink console. For more information about how to configure permissions, see Permission management.
Error: Has not enough ip address: abnormal event detected from kubernetes
Error details
Has not enough ip address:abnormal event detected from kubernetes (type:[Warning], reason:[CniError_CodeUnKnownErr], message:[CniAllocateError: allocateIP failed: ipamCreate failed: failed to create ENI: all vSwitches ([*****]) cannot be used: CreateNetworkInterface: RequestId: 67959AE5-EA20-5CB4-8560-5BD6752472FD, ErrorCode: InvalidVSwitchId.IpNotEnough, Message: The specified VSwitch "*****" has not enough IpAddress., elapsedTime: 245.03232ms])Cause
The virtual switch has no available IP addresses.
Solution
Add available IP addresses. For more information, see Modify a virtual switch.
Error: Unknown Error: Http failure response for xxxxx
Error details
File upload fails, and the following error message is displayed.

Cause
After the Alibaba Cloud International site domain name is updated, file upload requests to the new alibabacloud.com domain fail because of cross-domain restrictions. This issue occurs if you have not configured a cross-domain rule (CORS) in Object Storage Service (OSS).
Solution
On the OSS console, configure a CORS rule for the OSS Bucket that is attached to the Flink workspace. For more information about how to set the rule, see Manage files.
How do I view the Flink version of the current job?
You can view the version in the following ways:
On the right side of the ETL or Data Ingestion page, click More Configurations and find the version information in the Engine Version field.

On the page, click the name of the target job and view the version information in the Basic Configuration area on the Deployment Details tab.

How do I change the engine version for a Realtime Compute for Apache Flink job?
SQL or YAML jobs
On the right side of the ETL or Data Ingestion page, click More Configurations and select the target version from the Engine Version field. For a deployed job, you must redeploy and start the job for the version change to take effect.
JAR or Python jobs
On the Job O&M page, click the target job name. On the Deployment Details tab, click Edit in the upper-right corner of the Basic Configuration section. In the Engine Version field, select the target version, click Save, and then click Start.
How do I configure custom running parameters for a job?
Find the workspace that you want to manage and click Console in the Actions column.
On the Job O&M page, click the name of the target job.
On the Deployment Details tab, click Edit to the right of the Running Parameter Settings section.
In the Other Configuration field, configure the parameters.
Make sure that a space follows the colon (:) between the key and the value. The following code provides an example.
task.cancellation.timeout: 180sClick Save.
How do I persist common Flink configurations to improve efficiency?
Realtime Compute for Apache Flink provides the Job Template feature. You can save common parameters as a template so that you do not need to manually configure them for each new job.

How do I prevent sensitive information such as AccessKeys or passwords from being leaked?
To prevent security risks from exposing sensitive information such as AccessKey secrets and passwords in plaintext, you can use variables. Using variables also helps you avoid writing the same code or values repeatedly and simplifies configuration management. You can use variables in various scenarios, such as SQL jobs, JAR or Python jobs, log configurations, and UI settings. For more information, see Manage variables.
How can Flink jobs use compute resources more efficiently?
You can make adjustments in the following ways:
Manual adjustment: On the Smart Diagnosis tab, click Start Diagnosis, view the resource analysis results, and manually make adjustments as prompted.

Automatic adjustment: You can enable the automatic tuning feature, which includes intelligent tuning and scheduled tuning modes, to allow the Flink system to automatically adjust resources. For more information about the scenarios and configuration procedures, see Configure automatic tuning.
Cron expression writing rules
Job state set management uses Unix-style rules, while task orchestration uses Java-style rules. Use the correct cron expression for your scenario.
Unix-style rules
Field definition:
minute hour day_of_month month day_of_week. There are five fields.Union of "day of month" and "day of week": If you define both the third field (day of month) and the fifth field (day of week), they have an OR relationship.
0 12 1 * 5means the job runs at 12:00 on the first of each month OR on every Friday. It does not mean the job runs only when the first of the month is also a Friday.The question mark (
?) is not supported: Do not use the?character. Using it will cause the system to report an error or fail to recognize the expression. To ignore a field, use the asterisk (*) instead.
Java-style rules (Quartz)
Field definition:
second minute hour day_of_month month day_of_week. Six fields are commonly used.Conflict between "day of month" and "day of week":
The "day of month" and "day of week" fields cannot both be set to specific values or both be set to an asterisk (
*).To prevent logical conflicts, you must use a question mark (
?) in one of the two fields. For example, specifying both "the 1st" and "Friday" creates a conflict if the 1st of the month is not a Friday.Rule: If you specify a value for "day of month", set "day of week" to
?. If you specify a value for "day of week", set "day of month" to?.
Numeric day-of-the-week values: 1 represents Sunday, 2 represents Monday, and so on. To avoid ambiguity, use English abbreviations, such as
SUN,MON, andTUE.