A deployment method, device, and media based on Hadoop cold and hot data architecture
By partitioning data types within the Hadoop architecture and migrating them to distributed object storage, the problem of mixed storage of hot and cold data is solved, achieving cost savings, efficient resource utilization, and seamless migration of hot and cold data, thereby improving the performance of hot data and the query efficiency of cold data.
Patent Information
- Application Number
- CN202611245089.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-17
- Publication Date
- 2026-11-17
AI Technical Summary
In the existing Hadoop deployment architecture, mixed storage of hot and cold data leads to high hardware costs, performance interference, complex operation and maintenance, and inflexible expansion. Existing hot and cold data separation solutions cannot simultaneously meet the requirements of cost savings, high resource utilization, no impact on hot data performance, high efficiency in restoring and using cold data, and seamless migration.
By analyzing the access frequency of statistical data, we categorize data into hot data, low-frequency cold data for tracking, and archived cold data for future reference. We adopt a storage-compute integrated architecture and a storage-compute separation architecture to keep hot data within the Hadoop cluster, while migrating low-frequency cold data for tracking and archived cold data for future reference to distributed object storage. Only the file path or database name is modified, while the table name remains unchanged. We use MD5 and Hash verification to ensure the accuracy of the migration.
It achieves a logically unified access layer, resource-isolated cold data query service, seamless and accurate migration process, reduces storage costs, improves resource utilization and hot data performance, and reduces operational complexity.
Smart Images

Figure CN123115083A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a deployment method, device and medium based on the Hadoop cold and hot data architecture. Background Technology
[0002] As enterprises deepen their digital transformation, the amount of data carried by enterprise-grade data lakes and data warehouses based on the Hadoop ecosystem is growing exponentially. However, data access patterns follow a clear "80 / 20 rule," meaning that more than 80% of access is concentrated on 20% of new or frequently accessed data (hot data), while the vast majority of historical data (cold data) is only stored for compliance, archiving, or occasional data analysis needs, and is accessed very infrequently.
[0003] In traditional Hadoop deployment architectures, all data is typically stored indiscriminately in the same physical cluster, a storage-compute architecture that uses identical hardware servers and network switches (including CPU, memory, and hard drives). This leads to three prominent problems: First, there is a serious waste of resources: cold data consumes a large amount of the same high-performance, high-cost hardware resources as hot data, resulting in high storage costs.
[0004] Second, there is mutual interference in performance: occasional large-scale offline batch processing tasks for cold data compete for I / O resources with hot data analysis tasks that have high real-time requirements, causing jitter in critical business operations.
[0005] Third, rigid expansion and operation and maintenance: It is impossible to adopt differentiated lifecycle management and fault recovery strategies for hot and cold data, resulting in complex operation and maintenance and inflexible expansion.
[0006] Therefore, separating and deploying hot and cold data at the architectural level has become an inevitable choice for reducing costs and increasing efficiency on large-scale Hadoop platforms. Existing related implementation solutions can be mainly divided into four categories: (1) Tiered storage scheme based on storage policy: The traditional in-memory computing architecture is adopted. The implementation path is as follows: First, different storage media (such as SSD hard disks and HDD hard disks) are labeled; then storage policies are defined, such as "Hot" (all copies are on SSD hard disks) and "Cold" (all copies are on HDD hard disks); finally, the policy is specified for the directory through the command hdfs storagepolicies, and the Mover tool scans and migrates data blocks periodically to make their storage location match the policy.
[0007] The drawbacks of this approach are: data storage is still located on the same local server within the same Hadoop cluster, distinguished only by different hard drive media, resulting in high overall hardware costs. Furthermore, the limited number of hard drive slots on a single server leads to significant bottlenecks in scalability.
[0008] (2) Storage scheme based on multi-physical clusters: By establishing two independent Hadoop clusters (one high-performance hot cluster and one high-density cold cluster), both clusters are storage-compute integrated architectures, but use hardware servers of different specifications. For example, the hot cluster uses SSD hard disks or ordinary HDD hard disks, while the cold cluster uses high-density large-capacity HDD hard disks. Through newly created data synchronization tasks, cold data is periodically migrated to the cold Hadoop cluster.
[0009] The disadvantages of this approach are as follows: First, the computing power of the cold data cluster servers is wasted due to idle capacity. Second, for users (applications), accessing data requires knowing whether to retrieve data from the hot or cold data cluster. If a seamless user experience is desired, reverse on-demand data synchronization is necessary, impacting the user experience. Finally, the cold cluster also requires purchasing Hadoop licenses, resulting in higher costs.
[0010] (3) Solution based on professional archiving tools: This solution uses professional archiving tools to export Hadoop cold data into files and then archive and back it up to the enterprise's unified archiving storage pool (NAS, cloud storage, Blu-ray disc, etc.).
[0011] The drawback of this solution is that, in scenarios involving cold data that cannot be accessed online, the cold data needs to be restored to the Hadoop cluster before it can be used again, resulting in low efficiency in restoration and usage.
[0012] (4) Solution based on storage-compute separation architecture: This solution adopts storage-compute separation architecture, puts the data storage layer of Hadoop on cloud storage, and both cold and hot data are stored on the same storage platform, but cold and hot data are stored through different storage media (such as SSD hard disks and HDD hard disks).
[0013] The drawbacks of this approach are: hot and cold data still reside on the same remote storage platform, losing the data locality advantage inherent in Hadoop; access efficiency for hot data decreases, impacting business performance. Furthermore, all data requires network interaction, placing high demands on the deployed network and server network cards, leading to increased costs.
[0014] In summary, existing technologies attempt to solve the problem of separating hot and cold data, but they have consistently failed to simultaneously achieve cost savings, high resource utilization, no impact on hot data processing performance, high efficiency in cold data restoration and utilization, and seamless business operations during the migration process within the same architecture. There is an urgent need for a deployment method, equipment, and media based on the Hadoop hot and cold data architecture. Summary of the Invention
[0015] To address the aforementioned technical problems, this invention proposes a deployment method, device, and medium based on a Hadoop cold and hot data architecture. The technical solution is as follows: This invention provides a deployment method based on a Hadoop cold and hot data architecture, including: S1. Analyze the data access frequency distribution of the Hadoop cluster of the big data platform to obtain access frequency information for Hive tables and partitions; S2. Establish data lifecycle specifications, and divide Hive tables into hot data, low-frequency cold data for tracking, and archived cold data for future reference. S3. Scan Hive tables and deploy cold and hot data according to the data lifecycle specification, including: For frequently accessed data, it is retained within the Hadoop cluster without data migration. For low-frequency, serial cold data, the data of the corresponding partition is migrated from the Hadoop cluster to the distributed object storage cluster. The Hive library name and table name remain unchanged, and only the file path is modified from the HDFS local file system directory to the file path provided by the distributed object storage. For archived cold data, the data of the corresponding partition is migrated from the Hadoop cluster to the distributed object storage cluster. Only the Hive database name is replaced, while the table name remains unchanged. The file path is migrated from the HDFS local file system directory to the file path provided by the distributed object storage.
[0016] Optionally, in S1, the data access frequency distribution of the Hadoop cluster of the big data platform is statistically analyzed, including: Statistics on the job scheduling and execution status of the Hadoop cluster, including the table names, partition metadata information, and access times of the scheduled executions; statistics on the execution status of historical data tracing tasks, including the table names involved in the tracing, partition metadata information, and tracing times; statistics on the metadata information of Hive tables in the Hadoop cluster, including the database name and table name of the Hive tables.
[0017] Optionally, in S2, cold data and hot data are defined as follows: Hot data: The number of daily batch accesses to Hive tables and partitions within one year is greater than 0; Low-frequency cold data: The number of daily batch accesses to the Hive table and partition within one year is 0, and the number of historical batch accesses to the Hive table and partition within one year is greater than 0. Archived cold data: The number of daily batch processing and historical data accesses for Hive tables and partitions within one year is 0.
[0018] Optionally, in S3, hot data can be saved as a local HDFS file within a storage-compute architecture.
[0019] Optionally, in S3, low-frequency, cold data is saved as a distributed object storage file in a compute-storage separation architecture. The corresponding migration process includes: Call HDFS underlying commands to copy the local HDFS file of the partition corresponding to the Hive table in the source to the specified directory of the remote distributed object storage; By calling the interface provided by Hive Metastore through the big data scheduling platform, the HDFS path of the corresponding partition is modified to the specified directory of the remote distributed object storage; By modifying the metadata information of Hive tables and copying files, the data migration of low-frequency, serial cold data can be achieved, and the table name and partition name of Hive tables remain unchanged after the migration.
[0020] Optionally, in S3, archived cold data for future reference is saved as distributed object storage files in a compute-storage separation architecture. The corresponding migration process includes: In the archive repository, a table with the same name is created by referencing the metadata information of the table to be migrated. The file path of the table with the same name does not point to the local HDFS, but to a specified directory in the remote distributed object storage. File copying is performed by calling the distcp command, which copies data from the local HDFS file system to a specified path on a remote distributed object storage system. Automatic partition repair is performed using system partition repair commands, updating the metadata information of the archive database tables.
[0021] Optionally, the method of the present invention further includes S4 verification comparison, wherein the verification includes MD5 verification and Hash verification, wherein: MD5 verification: Read file data from the source local HDFS and the remote distributed object storage respectively, calculate the MD5 value and compare and verify it; Hash verification: Impala reads the source Hive partition data and the migrated Hive partition data, hashes each field, and then sums and compares the hash values of all fields.
[0022] In addition, the present invention also provides a computer device, including a processor and a memory; The memory stores computer programs; When the processor executes the computer program, it implements the steps of the deployment method based on the Hadoop cold and hot data architecture as described above.
[0023] In addition, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the deployment method based on the Hadoop cold and hot data architecture described above.
[0024] The application of the technical solution of the present invention has at least the following beneficial effects: (1) The deployment method based on the Hadoop hot and cold data architecture proposed in this invention combines the advantages of the Hadoop cluster storage-computing integrated architecture and the storage-computing separation architecture. It designs the migration and storage of hot data, low-frequency cold data, and archived cold data, forming a logically unified access layer. This invention adopts the method of not changing the table name, but only modifying the underlying partition path of the HDFS file to migrate the data to the distributed object storage at the source end, so that the upper-layer computing engine can access hot data and low-frequency cold data without modifying the code. In addition, the method of this invention can also realize a separate cold data query service for operation and maintenance with resource isolation.
[0025] (2) The method of the present invention enables online incremental migration at the partition file level, so that the migration process does not require locking data. Furthermore, the method of the present invention performs final file size and MD5 verification after the migration is completed and before switching metadata pointers, ensuring that the entire migration process is accurate and controllable and completely imperceptible to upper-layer business. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0027] Figure 1 This is a flowchart illustrating the steps of a deployment method based on a Hadoop cold and hot data architecture in a preferred embodiment of the present invention. Figure 2 This is a schematic diagram of a data warehouse account in a preferred embodiment of the present invention. Detailed Implementation
[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0029] Explanation of proper nouns: Hadoop: A big data platform technology framework.
[0030] Hive: A big data warehouse technology component.
[0031] HDFS: A distributed file system for big data.
[0032] Impala: A big data online query component.
[0033] Example: like Figure 1 As shown, this embodiment provides a deployment method based on a Hadoop cold and hot data architecture, including: S1. Analyze the data access frequency distribution of the Hadoop cluster on the big data platform to obtain access frequency information for Hive tables and partitions.
[0034] Specifically, the distribution of data access frequency on the Hadoop cluster of the big data platform is statistically analyzed, including: Statistics on the job scheduling and execution status of the Hadoop cluster, including the table names, partition metadata information, and access times of the scheduled executions; statistics on the execution status of historical data tracing tasks, including the table names involved in the tracing, partition metadata information, and tracing times; statistics on the metadata information of Hive tables in the Hadoop cluster, including the database name and table name of the Hive tables.
[0035] It should be noted that both the big data scheduling platform and the big data development platform can use the metadata query interface provided by Hive Metastore to query the metadata information of all Hive tables on the big data platform's Hadoop cluster, including the database name and table name.
[0036] S2. Establish data lifecycle specifications, and divide Hive tables into hot data, low-frequency cold data for tracking, and archived cold data for future reference.
[0037] In this embodiment, hot data, low-frequency cold data, and archived cold data are defined as follows: Hot data: The number of daily batch accesses to Hive tables and partitions within one year is greater than 0; Low-frequency cold data: The number of daily batch accesses to the Hive table and partition within one year is 0, and the number of historical batch accesses to the Hive table and partition within one year is greater than 0. Archived cold data: The number of daily batch processing and historical data accesses for Hive tables and partitions within one year is 0.
[0038] It's important to note that "hot data" is defined as data from tables and corresponding partitions frequently used in daily big data analysis and query scenarios, which has relatively high performance requirements. "Low-frequency cold data" is defined as scenarios that don't involve daily use but require historical data retrieval within the past year. Performance requirements for retrieval are not high, but it's crucial to ensure that the data retrieval is seamless and can be rerun without script modifications. "Archived cold data" is primarily for handling customer complaints, requiring operations personnel to retrieve data online via SQL scripts. Performance requirements are low; online SQL query capabilities are sufficient.
[0039] Furthermore, the data lifecycle specification in this embodiment can define hot data retention periods and cold data retention periods for data tables in each layer of the data warehouse and data mart (such as ODS, DWD, DWS, ADS layers).
[0040] like Figure 2 The data warehouse account information shown has an online database named ONLINE, an archive database named ACHIVE, and an original table named D_AGT_ACCOUT_INFO. This table is partitioned daily, with partitions from 2000 to 2026. Based on data access frequency, the lifecycle of hot and cold data is defined: hot data has a lifecycle of the last 2 years, low-frequency, retrospective cold data has a lifecycle of the last 5 years to the last 2 years, and archived cold data for future reference is data older than 5 years. According to the converged deployment architecture proposed in this embodiment, the hot data from the last 2 years uses a storage-compute integrated architecture, while the cold data older than 2 years uses a storage-compute separated architecture.
[0041] S3. Scan Hive tables and deploy cold and hot data according to the data lifecycle specification, including: For hot data, it is kept within the Hadoop cluster without data migration, and saved as a local HDFS file in a storage-compute integrated architecture to ensure data processing efficiency in hot data scenarios.
[0042] For low-frequency, data-intensive cold data, the data in the corresponding partitions is migrated from the Hadoop cluster to a distributed object storage cluster. The Hive database and table names remain unchanged; only the file paths are modified, moving from the local HDFS file system directory to a file path provided by the distributed object storage. It's important to note that because the Hive database and table names remain unchanged, and only the file partition paths are modified (i.e., migrating from the local HDFS file system directory to a file path provided by the distributed object storage), and the HDFS protocol is used uniformly, the low-frequency, data-intensive cold data is processed seamlessly without impacting business operations, while simultaneously reducing data storage costs.
[0043] Furthermore, for low-frequency, serial cold data, it is saved as a distributed object storage file in a compute-storage separation architecture. The corresponding migration process includes: Call the HDFS underlying command to copy the local HDFS file corresponding to the Hive table partition in the source to the specified directory of the remote distributed object storage (refer to the command: hdfs dfs -cp hdfs: / / localHDFS partition directory hdfs: / / remote distributed object storage partition directory). By calling the interface provided by Hive Metastore through the big data scheduling platform, the HDFS path of the corresponding partition is modified to the specified directory of the remote distributed object storage (reference command: alter table table_name + partition_name set location hdfs: / / remote distributed object storage partition directory). By modifying the metadata information of Hive tables and copying files, the data migration of low-frequency, serial cold data can be achieved, and the table name and partition name of Hive tables remain unchanged after the migration.
[0044] For archived cold data, the data in the corresponding partition is migrated from the Hadoop cluster to the distributed object storage cluster. Only the Hive database name is replaced; the table names remain unchanged. The file path is moved from the HDFS local file system directory to a file path provided by the distributed object storage. It should be noted that the archived cold data migration method proposed in this embodiment can isolate the query database capabilities for operation and maintenance, reducing resource conflicts with hot data and low-frequency, data-driven cold data application scenarios.
[0045] Furthermore, for archived cold data for future reference, it is saved as a distributed object storage file in a compute-storage separation architecture. The corresponding migration process includes: In the archive repository, create a table with the same name as the table to be migrated, referencing the metadata information of the table to be migrated. The file path of this table does not point to the local HDFS, but rather to a specified directory in the remote distributed object storage (see instruction: create externaltable if not exist archive repository table name like source table name location remote distributed object storage path). The file copying is performed by calling the distcp command, which copies the local HDFS file system data to a specified path in the remote distributed object storage (reference command: hadoop distcp hdfs: / / local HDFS partition directory hdfs: / / remote distributed object storage partition directory). Automatic partition repair is performed using the system partition repair command, updating the metadata information of the archive database table (reference command: beeline -e “msck repair table archive database table name”).
[0046] It should be noted that, S4. Verification and comparison, including MD5 verification and Hash verification, wherein: MD5 verification: Read file data from the source local HDFS and the remote distributed object storage respectively, calculate the MD5 value and compare and verify it; Hash verification: Impala reads the source Hive partition data and the migrated Hive partition data, hashes each field, and then sums and compares the hash values of all fields.
[0047] If the verification passes, the files in the relevant HDFS partitions on the source end will be cleared. If the verification fails, the files in the relevant partitions on the remote distributed object storage will be cleared, and the migration task will be retried.
[0048] In addition, this embodiment also provides a computer device, including a processor and a memory; The memory stores computer programs; When the processor executes the computer program, it implements the steps of the deployment method based on the Hadoop hot and cold data architecture described above.
[0049] It should be noted that computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof. These programming languages include object-oriented programming languages—such as Java, Smalltalk, and C++—as well as conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0050] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0051] In addition, this embodiment also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the deployment method based on the Hadoop cold and hot data architecture described above.
[0052] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described deployment method based on the Hadoop cold and hot data architecture. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the deployment method based on the Hadoop cold and hot data architecture provided in the above embodiments, and will not be repeated here.
[0053] The above description is only a preferred embodiment of the present invention and does not limit the scope of the present invention. All equivalent structural transformations made under the inventive concept of the present invention using the contents of the present invention specification and drawings, or direct / indirect applications in other related technical fields, are included within the protection scope of the present invention.
Claims
1. A deployment method based on a Hadoop cold and hot data architecture, characterized in that, include: S1. Analyze the data access frequency distribution of the Hadoop cluster of the big data platform to obtain access frequency information for Hive tables and partitions; S2. Establish data lifecycle specifications, and divide Hive tables into hot data, low-frequency cold data for tracking, and archived cold data for future reference. S3. Scan Hive tables and deploy cold and hot data according to the data lifecycle specification, including: For frequently accessed data, it is retained within the Hadoop cluster without data migration. For low-frequency, serial cold data, the data of the corresponding partition is migrated from the Hadoop cluster to the distributed object storage cluster. The Hive library name and table name remain unchanged, and only the file path is modified from the HDFS local file system directory to the file path provided by the distributed object storage. For archived cold data, the data of the corresponding partition is migrated from the Hadoop cluster to the distributed object storage cluster. Only the Hive database name is replaced, while the table name remains unchanged. The file path is migrated from the HDFS local file system directory to the file path provided by the distributed object storage.
2. The deployment method based on the Hadoop cold and hot data architecture according to claim 1, characterized in that, In S1, the data access frequency distribution of the Hadoop cluster is statistically analyzed, including: Statistics on the job scheduling and execution status of the Hadoop cluster, including the table names, partition metadata information, and access times of the scheduled executions; statistics on the execution status of historical data tracing tasks, including the table names involved in the tracing, partition metadata information, and tracing times; statistics on the metadata information of Hive tables in the Hadoop cluster, including the database name and table name of the Hive tables.
3. The deployment method based on the Hadoop cold and hot data architecture according to claim 1, characterized in that, In S2, cold data and hot data are defined as follows: Hot data: The number of daily batch accesses to Hive tables and partitions within one year is greater than 0; Low-frequency cold data: The number of daily batch accesses to the Hive table and partition within one year is 0, and the number of historical batch accesses to the Hive table and partition within one year is greater than 0. Archived cold data: The number of daily batch processing and historical data accesses for Hive tables and partitions within one year is 0.
4. The deployment method based on the Hadoop cold and hot data architecture according to claim 1, characterized in that, In S3, hot data is saved as a local HDFS file in a storage-compute architecture.
5. The deployment method based on the Hadoop cold and hot data architecture according to claim 1, characterized in that, In S3, low-frequency, cold data is saved as distributed object storage files in a compute-storage separation architecture. The corresponding migration process includes: Call HDFS underlying commands to copy the local HDFS file of the partition corresponding to the Hive table in the source to the specified directory of the remote distributed object storage; By calling the interface provided by Hive Metastore through the big data scheduling platform, the HDFS path of the corresponding partition is modified to the specified directory of the remote distributed object storage; By modifying the metadata information of Hive tables and copying files, the data migration of low-frequency, serial cold data can be achieved, and the table name and partition name of Hive tables remain unchanged after the migration.
6. The deployment method based on the Hadoop cold and hot data architecture according to claim 1, characterized in that, In S3, archived cold data is saved as distributed object storage files in a compute-storage separation architecture. The corresponding migration process includes: In the archive repository, a table with the same name is created by referencing the metadata information of the table to be migrated. The file path of the table with the same name does not point to the local HDFS, but to a specified directory in the remote distributed object storage. File copying is performed by calling the distcp command, which copies local HDFS file system data to a specified path on a remote distributed object storage system. Automatic partition repair is performed using system partition repair commands, updating the metadata information of the archive database tables.
7. The deployment method based on the Hadoop cold and hot data architecture according to claim 1, characterized in that, It also includes S4 checksum comparison, which includes MD5 checksum and hash checksum, among which: MD5 verification: Read file data from the source local HDFS and the remote distributed object storage respectively, calculate the MD5 value and compare and verify it; Hash verification: Impala reads the source Hive partition data and the migrated Hive partition data, hashes each field, and then sums and compares the hash values of all fields.
8. A computer device, characterized in that, Including processor and memory; The memory stores computer programs; When the processor executes the computer program, it implements the steps of the deployment method based on the Hadoop cold and hot data architecture as described in any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the steps of the deployment method based on the Hadoop cold and hot data architecture as described in any one of claims 1 to 7.
