[
https://issues.apache.org/jira/browse/FLINK-39493?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yuepeng Pan resolved FLINK-39493.
---------------------------------
Resolution: Done
> Release Testing: Verify FLIP-549: Support Application Management
> ----------------------------------------------------------------
>
> Key: FLINK-39493
> URL: https://issues.apache.org/jira/browse/FLINK-39493
> Project: Flink
> Issue Type: Sub-task
> Reporter: Yi Zhang
> Assignee: Taranpreet Kaur
> Priority: Blocker
> Labels: release-testing
> Fix For: 2.3.0
>
> Attachments: FLINK-39493-test-report.pdf
>
>
> h1. FLIP-549: Support Application Management - Cross-Team Test Instructions
> h2. Background
> [FLIP-549]([https://cwiki.apache.org/confluence/display/FLINK/FLIP-549%3A+Support+Application+Management])
> introduces Application as a first-class entity in Flink, establishing a
> Cluster-Application-Job architecture. It adds REST APIs for application
> query, cancellation, and submission, a new Web UI for application management,
> and support for archiving completed applications to the History Server.
> h2. Prerequisites
> - A latest built Flink distribution.
> - Test job JARs (e.g., the built-in examples such as
> `flink-examples-streaming`).
> - Access to the Flink cluster (including UI), `curl` or similar client for
> REST API verification.
> h2. Test Cases
> —
> h3. Test 1: Application Mode - Run and Monitor Application
> {*}Objective{*}: Verify that running an application in Application Mode works
> and that the Web UI correctly displays application and job information.
> {*}Steps{*}:
> 1. Start a Flink cluster in Application Mode with a test job:
> {code:java}
> ./bin/standalone-job.sh start -D user.artifacts.base-dir=/tmp/flink-artifacts
> --jars ./examples/streaming/WordCount.jar {code}
> {*}Note{*}: To keep the cluster alive after the application finishes (useful
> for verification), add the following to `conf/config.yaml` before starting:
> {code:java}
> execution:
> shutdown-on-application-finish: false{code}
> You also need to start a TaskManager manually to provide resources:
> {code:java}
> ./bin/taskmanager.sh start {code}
> 2. Wait for the cluster to start, then open the Flink Web UI (default:
> `[http://localhost:8081|http://localhost:8081/]`).
> 3. Verify the Overview page:
> - While the application is running, it should appear in the "Running
> Application List".
> - After its job completes, the application should move to the "Completed
> Application List" with status `FINISHED`.
> 4. Verify the Application Detail page: Click on the application entry to
> navigate to its detail page. Check that it shows information including
> Application ID, status, start timestamps, and its associated jobs.
> 5. Verify via REST API:
> {code:java}
> # List all applications
> curl http://localhost:8081/applications/overview
> # Get application details (replace <applicationid> with actual ID)
> curl http://localhost:8081/applications/<applicationid>
> {code}
> 6. Verify application cancellation:
> - While the application is `RUNNING`, click the "Cancel Application" button
> on the application detail page, or
> {code:java}
> curl -X POST http://localhost:8081/applications/<applicationid>/cancel {code}
> - Verify the application eventually transitions through to `CANCELED`.
> - Verify the associated jobs are also canceled.
> {*}Expected Results{*}:
> - Application appears in the correct list (running vs. completed) on the
> overview page.
> - Application detail page shows correct lifecycle states, timestamps, and
> job list.
> - Cancellation works and propagates to all jobs.
> {*}Cleanup{*}:
> {code:java}
> ./bin/taskmanager.sh stop
> ./bin/standalone-job.sh stop
> rm -rf /tmp/flink-artifacts{code}
>
> —
> h3. Test 2: Session Mode - Submit via CLI and Monitor Application
> {*}Objective{*}: Verify that submitting a job via CLI in Session Mode creates
> a `SingleJobApplication` and that the Web UI correctly displays application
> and job information.
> {*}Steps{*}:
> 1. Start a Flink Session cluster:
> {code:java}
> ./bin/start-cluster.sh {code}
> 2. Submit a test job via CLI:
> {code:java}
> ./bin/flink run ./examples/streaming/WordCount.jar {code}
> 3. Open the Web UI. Verify the application appears in the overview and detail
> pages (same checks as Test 1).
> 4. Submit multiple jobs and verify each appears as a separate application in
> the overview.
> {*}Expected Results{*}:
> - Each CLI-submitted job creates a `SingleJobApplication`.
> - Application status mirrors the job status.
> - Multiple submissions result in multiple separate applications.
> {*}Cleanup{*}:
> {code:java}
> ./bin/stop-cluster.sh {code}
>
> —
> h3. Test 3: Session Mode - Submit via JarRunApplication REST API
> {*}Objective{*}: Verify that the `/jars/:jarid/run-application` REST API
> creates an application.
> {*}Steps{*}:
> 1. Start a Flink Session cluster (or reuse from Test 2).
> 2. Upload a test JAR:
> {code:java}
> curl -X POST -H "Expect:" -F "jarfile=@./examples/streaming/WordCount.jar"
> http://localhost:8081/jars/upload {code}
> Note the returned `filename` (the last part is JAR ID).
> 3. Submit via `run-application`:
> {code:java}
> curl -X POST http://localhost:8081/jars/<jarid>/run-application -H
> "Content-Type: application/json" {code}
> Note the returned `applicationid`. Verify the application appears in the Web
> UI (same checks as Test 1).
> 4. Compare with `/jars/:jarid/run`:
> {code:java}
> curl -X POST http://localhost:8081/jars/<jarid>/run -H "Content-Type:
> application/json" {code}
> - This creates a `SingleJobApplication` (same as Test 2).
> {*}Expected Results{*}:
> - `run-application` creates an application with the name of the main class.
> - `run` creates a `SingleJobApplication`.
> - Both appear correctly in the Web UI.
> {*}Cleanup{*}:
> {code:java}
> ./bin/stop-cluster.sh {code}
>
> —
> h3. Test 4: Application Archiving and History Server
> {*}Objective{*}: Verify that completed applications are archived and can be
> viewed via the History Server.
> {*}Steps{*}:
> 1. Configure archiving in `conf/config.yaml`:
> {code:java}
> jobmanager:
> archive:
> fs:
> dir: /tmp/flink-archives
> historyserver:
> archive:
> fs:
> dir: /tmp/flink-archives{code}
> 2. Start the Flink cluster (Application Mode or Session Mode) and submit a
> test job. Wait for the job to complete and the application to reach a
> terminal state (e.g. `FINISHED`).
> 3. Start the History Server:
> {code:java}
> ./bin/historyserver.sh start {code}
> 5. Open the History Server Web UI (default
> `[http://localhost:8082|http://localhost:8082/]`).
> 6. Verify application archives:
> - The completed application should appear in the overview page.
> - Click on the application to verify the detail page shows:
> - Application ID, name, and status (`FINISHED`, `CANCELED`, or `FAILED`).
> - Associated jobs with their statuses.
> - Start time, end time, and duration.
> 7. Verify via REST API on History Server:
> {code:java}
> # List all archived applications
> curl http://localhost:8082/applications/overview
> # Get archived application details
> curl http://localhost:8082/applications/<applicationid>
> {code}
> 8. Verify archived jobs within applications:
> {code:java}
> # List all archived jobs
> curl http://localhost:8082/jobs/overview
> # Get archived job details
> curl http://localhost:8082/jobs/<jobid> {code}
> {*}Expected Results{*}:
> - Completed applications are archived to the configured directory.
> - History Server discovers and displays archived applications.
> - Application detail pages are available on the History Server.
> - Jobs within archived applications are also available.
> {*}Cleanup{*}:
> {code:java}
> ./bin/stop-cluster.sh
> ./bin/historyserver.sh stop
> rm -rf /tmp/flink-archives{code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)