Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Viewing the Debugging Result

Updated on 2023-04-10 GMT+08:00

Scenarios

After a Flink application completes running, you can view the running result, or use Apache Flink Dashboard to view application running status.

Procedure

  • View the running result of the Flink application.

    If you want to check the execution result, view the Stdout log of Task Manager on the Apache Flink Dashboard.

    If the execution result is exported to a file or a location specified by Flink, view the result from the exported file or the location. The checkpoint, pipeline, and join between configuration tables and streams are used as examples.

  • View checkpoint results and files
    • The results are stored in the taskmanager.out file of Flink. User can log in to the WEB UI of the Yarn. Choose Jobs > Checkpoints to view the submitted jobs as shown inFigure 1. Choose Task Managers > Stdout to view the running result, as shown in Figure 2.
      Figure 1 Submitted jobs
      Figure 2 Execution result
    • Run the hdfs dfs -ls hdfs://hacluster/flink/checkpoint/ command to view the checkpoint snapshot information in the HDFS.
  • View pipeline results
    • The results are stored in the taskmanager.out file of Flink. User can log in to the WEB UI of the Yarn. Choose Jobs > Running Jobs to view the running jobs as shown in Figure 3. Choose Task Managers. You can see two tasks, as shown in Figure 4. Click any task, choose Stdout to view the output of the task, as shown in Figure 5 and Figure 6.
      Figure 3 Running jobs
      Figure 4 Submitted tasks
      Figure 5 Output of task1
      Figure 6 Output of task2
  • View the result of DataStream
    • The results are stored in the taskmanager.out file of Flink. User can log in to the WEB UI of the Yarn. Choose Jobs > Completed Jobs to view the completed job as shown in Figure 7. Choose Task Managers, you can see submitted task, as shown in Figure 8. Choose Stdout to view the running result, as shown in Figure 9.
      Figure 7 Completed job
      Figure 8 Submitted task
      Figure 9 Execution result
  • View the result of stream sql join
    • The results are stored in the taskmanager.out file of Flink. User can log in to the WEB UI of the Yarn. Choose Jobs > Running Jobs to view the running jobs as shown in Figure 10. Choose Task Managers, you can see submitted task, as shown in Figure 11. Choose Stdout to view the running result, as shown in Figure 12.
      Figure 10 Running jobs
      Figure 11 Submitted task
      Figure 12 Execution result
  • View the result of produce and consume data in Kafka
    • The results are stored in the taskmanager.out file of Flink. User can log in to the WEB UI of the Yarn. Choose Jobs > Running Jobs to view the running jobs as shown in Figure 13. Choose Task Managers, you can see submitted task, as shown in Figure 14. Choose Stdout to view the running result, as shown in Figure 15.
      Figure 13 Runnning jobs
      Figure 14 Submitted task
      Figure 15 Execution result
  • Use Apache Flink Dashboard to view the running status of the Flink application.

    The Apache Flink Dashboard mainly includes Overview, Running Jobs, Completed Jobs, Task Managers, Job Manager and Logout and so on.

    On In the YARN web UI, find the desired Flink application. Click the ApplicationMaster at the last column of the application to switch to the Apache Flink Dashboard.

    View the print results of the program execution: find the corresponding Task Manager to see the corresponding Stdout tag log information.

  • View Flink logs.

    Three methods can be used to obtain Flink logs:

    • Log in to the Apache Flink Dashboard and view logs of TaskManagers and JobManager.
    • Log in to the YARN web UI to view logs about JobManager and GC.

      On the YARN web UI wind, find the desired Flink application. Click the ID of the application. On the switched page, click Logs in the Logs column.

    • On the Yarn client, obtain or view logs of Task Managers and Job Manager.
      1. Download and install the Yarn client, for example, in the /opt/client directory.
      2. Use PuTTY to log in to the node where the client is installed as the client installation user.
      3. Run the following command to switch to the client installation directory:

        cd /opt/client

      1. Run the following command to configure environment variables:

        source bigdata_env

      1. If the cluster employs the security mode, run the following command to authenticate the user. If the normal mode is used, skip this step.

        kinit component service user

      1. Run the following commands to obtain container information of the Flink cluster:

        yarn logs -applicationId application_* -show_application_log_info

      2. Run the following command to obtain run logs of the specified container. Generally, container_*_000001 is the container where the Job Manager is running.

        yarn logs -applicationId application_* --containerId container_1547547065745_0001_01_000004 -out logdir/

        After the command is executed, container run logs, including run logs of the Task Manager and Job Manager and GC logs, are downloaded to the local host.

      3. You can also run a command to obtain the log with the specified name:

        The following command is used to obtain the container log list.

        yarn logs -applicationId application_* -show_container_log_info --containerId container_1547547065745_0001_01_000004

        Download taskmanager.log to the local host.

        yarn logs -applicationId application_* --containerId container_1547547065745_0001_01_000004 -log_files taskmanager.log -out localpath

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback