Viewing the Migration Result
You can view a migration report and perform necessary operations as instructed to verify or complete the migration.
- You can drag the sliding frame on the left of the Guidance Suggestion area to adjust the area size. You can also click a file in the file list on the navigation pane to quickly locate the first suggestion.
- Click View Details. The number of suggestions (excluding compatible SQL statements and modified system content) contained in the file is displayed in the list on the left of the Guidance Suggestion area.
- On the upper part of the Migration Result page, you can click New Project to return to the New Project page, where you can modify the information of the components to be migrated and restart the migration.
Prerequisites
- You have logged in to the Kunpeng DevKit.
- You have created a system migration project and completed the migration.
Migration Report
- Go to the Migration Result page and view the migration report. If SQL statements exist, the Download Non-Source-Code SQL File button is displayed. You can click this button to download the file.Figure 1 Migration Report
Table 1 Parameters in the migration report Parameter
Description
Source Component Name
Name of the migrated source component.
Owning Node
Node to which the component belongs. Filtering is supported.
Component Belonging
Ownership of a component. Filtering is supported.
Origin of Source Component
Where the component comes.
Target Component Name
Name of the target component.
Status
Migration status of the component, which is Migrated, To be migrated, or Masked.
Guidance
Click View Details to view the guidance details.
Status Source
Source of the component, which defaults to a migration by the tool. If you want to modify the component status, the status source will change to Customized.
Remarks
Supplementary information.
Updated
Time when the migration status is updated.
Operation
You can modify the migration status and add remarks.
- Click View Details in the Guidance column, and you will see the guidance details on the right.
- Migrated: Verify system functions based on the verification method provided in Guidance Suggestion. The following uses a migration from Tomcat to TongWeb as an example.
Figure 2 Guidance Suggestion
- To be migrated: Perform a manual migration and verify system functions based on Guidance Suggestion. The following uses a RabbitMQ migration as an example.
Figure 3 Guidance Suggestion
You can click Edit and Remigrate under the guidance suggestion to return to the New Project page, edit the component information, and click Restart to retry the migration.
- Java application migration: Java application packages can be automatically converted to JAR packages that can run on the Kunpeng platform.
Figure 4 Java application conversion
- For dependencies that fail to be replaced, run a script to obtain related dependencies or required files according to Migration Guide.
- Click script for downloading dependency files, decompress the downloaded package, and run the script.
sh dependency_download.sh
See the following example. If the information in bold is displayed, the dependency has been successfully downloaded:
Start downloading: DmDialect-for-hibernate5.6-8.1.3.140.jar Start downloading: DmJdbcDriver18-8.1.3.140.jar Download failed: DmDialect-for-hibernate5.6-8.1.3.140.jar 100%[====================================================================================================>] 49.62K 203KB/s in 0.2s Downloaded: DmDialect-for-hibernate5.6-8.1.3.140.jar DmJdbcDriver18-8.1.3.140.jar 100%[====================================================================================================>] 1.31M 92.7KB/s in 8.3s Downloaded: DmJdbcDriver18-8.1.3.140.jar All files have been downloaded.
- The script execution requires Internet connection. For details, refer to Configuring a Proxy for Wget.
- After the download is successful, a download folder that stores the dependencies is generated in the same directory as the script.
- For architecture-related dependencies, replace the dependencies that fail to be converted one by one using replacement package paths. For database-related dependencies, refer to the handling suggestions.
- Use the prepared test cases to check whether the application is successfully migrated in the Kunpeng environment.
- Click script for downloading dependency files, decompress the downloaded package, and run the script.
- For the dependencies that are successfully replaced, perform operations based on the migration guide. These dependencies can be rolled back when needed. After the rollback, in the case of architecture-related dependencies, the converted software package is replaced by the original software package; in the case of database-related dependencies, dependency files added to the application package are deleted.
- For dependencies that fail to be replaced, run a script to obtain related dependencies or required files according to Migration Guide.
- Migrated: Verify system functions based on the verification method provided in Guidance Suggestion. The following uses a migration from Tomcat to TongWeb as an example.
- After the migration is complete, you can close the right sliding frame. Click Edit in the Operation column, select a state from the drop-down list, and click Save.
You can select multiple components and click Batch Edit to edit the selected components at the same time. Click OK to save the modification.
Source Code Migration Guide – SQL Migration
If no database is selected in the migration content, SQL statements in the source file will not be parsed.
- On the Migration Result page, the SQL Migration tab page is displayed by default. You can download the SQL migration report summary file.
The SQL migration report summary file contains the SQL summary file and the source code patch file. The patch file is generated based on the actual need. For details about how to use the patch file, see Source Code SQL Writeback Patch.
Figure 5 SQL Migration
Table 2 Compatibility assessment Parameter
Description
Total SQL statements
Total number of extracted SQL statements.
Compatible
Number of SQL statements that are compatible with the target database. These SQL statements do not need to be modified.
Incompatible
Number of SQL statements incompatible with the target database. Modify the source code based on the generated patch file. For details, see Source Code SQL Writeback Patch.
- If no patch is generated but the SQL statements have been converted, manually modify the source code based on the new SQL statements and identified context information.
- If no patch was generated due to SQL statement conversion failure, manually convert the SQL statements and modify the source code.
Unconfirmed
Number of SQL statements whose compatibility with the target database has not been confirmed. Adjust these SQL statements based on the source file, and use the database migration tool to perform compatibility analysis and conversion.
Compatibility ratio
Number of compatible SQL statements divided by the total number of SQL statements.
Note: The SQL Migration table supports filtering by SQL compatibility. You can click View Details to check filtered results.
Table 3 Parameter description Parameter
Description
File Name
File name.
Source Path
Source path of the file.
Source Package Name
Name of the source package.
Total SQL Statements
Total number of SQL statements in the file.
Incompatible
Number of incompatible SQL statements in the file.
Unconfirmed
Number of SQL statements whose database compatibility has not been confirmed.
Generated Patches
Number of patches generated in incompatible SQL statements.
Guidance
Click View Details to view the guidance details.
Status
Migration status of the file, which is Migrated, To be migrated, or Masked.
Status Source
Source of the component, which defaults to a migration by the tool. If you want to modify the component status, the status source will change to Customized.
Remarks
Supplementary information.
Updated
Time when the migration status is updated.
Operation
You can modify the migration status and add remarks.
- Click View Details in the Guidance column, and you will see the SQL migration guidance on the right.You can move the cursor to the code with a wavy line. Some of the migration paths allow assessing extracted SQL statements (incompatible and to-be-confirmed SQL statements are marked with
), and converting incompatible SQL statements and generating patches. For other migration paths, perform compatibility analysis and conversion as prompted.
Figure 6 Guidance
- SQL statements starting with drop, grant, alter, or truncate are risky operations, and the risk is described in the pop-up information. You are not advised to run such statements in the database, for example, drop table t;.
- The .NET source code does not provide the SQL concatenation or completion capability. Check whether the identified database operation statements are supported in the target database. If not, modify the source file.
- For details about source code SQL APIs, see Source Code SQL APIs.
- After the migration is complete, you can close the sliding frame. Click Edit in the Operation column, select a state from the drop-down list, and click Save.
You can select multiple files and click Batch Edit in the left upper corner to edit the source files at the same time. Click OK to save the modification.
Source Code Porting Guide – Configuration Migration
- Click Configuration Migration to switch to the Configuration Migration tab page. You can download the modification suggestion summary file.Figure 7 Configuration Migration
Table 4 Parameter description Parameter
Description
File Name
File name.
Source Path
Source path of the file.
Source Package Name
Name of the source package.
Suggestions
Total number of suggestions in the file.
Guidance
Click View Details to view the guidance details.
Status
Migration status of the file, which is Migrated, To be migrated, or Masked.
Status Source
Source of the component, which defaults to a migration by the tool. If you want to modify the component status, the status source will change to Customized.
Remarks
Supplementary information.
Updated
Time when the migration status is updated.
Operation
You can modify the migration status and add remarks.
- Click View Details in the Guidance column. The configuration migration guidance is displayed on the right.You can move the mouse pointer to the code with a red wavy line and click Quick Fix to replace the code with the recommended code. (You can choose Batch Apply This Suggestion to batch fix similar issues.) Alternatively, you can modify the configuration as prompted, for example, modify the IP address and port number.Figure 8 Guidance
- You can modify the source file. After the modification is complete, click Save, Roll Back, or Cancel in the upper right corner as needed.
- You can click the arrow keys in the upper right corner of the source file module to go up and down.
- Click
in the file list on the left to download the required source file.
- After the modification is complete, you can close the sliding frame. Click Edit in the Operation column, select a state from the drop-down list, and click Save.
You can select multiple files and click Batch Edit in the left upper corner to edit the source files at the same time. Click OK to save the modification.