{"id":467,"date":"2020-07-24T00:00:00","date_gmt":"2020-07-24T00:00:00","guid":{"rendered":"https:\/\/en.pingcap.com\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/"},"modified":"2024-07-16T23:09:34","modified_gmt":"2024-07-17T06:09:34","slug":"horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb","status":"publish","type":"case-study","link":"https:\/\/www.pingcap.com\/ko\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/","title":{"rendered":"Horizontally Scaling the Hive Metastore Database by Migrating from MySQL to TiDB"},"content":{"rendered":"<p><strong>Author:<\/strong> Mengyu Hu (Platform Engineer at Zhihu)<\/p>\n\n\n\n<p>Zhihu which means &#8220;Do you know?&#8221; in classical Chinese, is the Quora of China: a question-and-answer website where all kinds of questions are created, answered, edited, and organized by the community of its users. As China&#8217;s biggest knowledge sharing platform, we have 220 million registered users and 30 million questions with more than 130 million answers on the site. In August 2019, we completed $450 million in F-round funding.<\/p>\n\n\n\n<p>At Zhihu, we used MySQL as the Hive Metastore. With data growth in Hive, MySQL stored about 60 GB of data, and the largest table had more than 20 million rows of data. Although the data volume was not excessive for a standalone MySQL database, running queries or writing data in Hive caused frequent operations in Metastore. In this case, MySQL, Metastore&#8217;s backend database, became the bottleneck for the entire system. We compared multiple solutions and found that <a href=\"\/ko\/tidb\/\">\ud2f0DB<\/a>, an open-source distributed Hybrid Transactional\/Analytical Processing (HTAP) database was the optimal solution. <strong>Thanks to TiDB&#8217;s elastic scalability, we can horizontally scale our Hive metadata storage system without worrying about database capacity.<\/strong><\/p>\n\n\n\n<p>Last year, we published a <a href=\"https:\/\/www.pingcap.com\/ko\/case-studies\/lesson-learned-from-queries-over-1.3-trillion-rows-of-data-within-milliseconds-of-response-time-at-zhihu\/\">post<\/a> that showed how we kept our query response times at milliseconds levels despite having over 1.3 trillion rows of data. This post became a hit on various media platforms like Hacker News and DZone. Today, I&#8217;ll share with you how we use TiDB to horizontally scale Hive Metastore to meet our growing business needs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Our_pain_point\"><\/span>Our pain point<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Apache Hive is a data warehouse software project built on top of Apache Hadoop that provides data query and analysis. Hive Metastore is Hive&#8217;s metadata management tool. It provides a series of interfaces for operating metadata, and its backend storage generally uses a relational database like Derby or MySQL. In addition to Hive, many computing frameworks support using Hive Metastore as a metadata center to query the data in the underlying Hadoop ecosystem, such as Presto, Spark, and Flink.<\/p>\n\n\n\n<p>At Zhihu, we used MySQL as the Hive Metastore. As data grew in Hive, a single table stored more than 20 million rows of data in MySQL. When a user&#8217;s task had intensive operations in Metastore, it often ran slow or even timed out. This greatly affected task stability. If this continued, MySQL would be overwhelmed. Therefore, it was critical to optimize Hive Metastore.<\/p>\n\n\n\n<p>To reduce MySQL&#8217;s data size and ease the pressure on Metastore, we regularly deleted metadata in MySQL. However, in practice this policy had the following drawbacks:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Data grew much faster than it was deleted.<\/li>\n\n\n\n<li>When we deleted partitions of a very large partitioned table that had millions of partitions, it caused pressure on MySQL. We had to control the concurrency of such queries, and at peak hours only one query could be executed at a time. Otherwise, this would affect other operations in Metastore such as <code>SELECT<\/code> \uadf8\ub9ac\uace0 <code>UPDATE<\/code> operations.<\/li>\n\n\n\n<li>At Zhihu, when metadata was deleted, the corresponding data was also deleted. (We deleted outdated data in the Hadoop Distributed File System to save costs.) In addition, Hive users would sometimes improperly create tables and set a wrong partition path. This resulted in data being deleted by mistake.<\/li>\n<\/ul>\n\n\n\n<p>Therefore, we began to look for another solution.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Solutions_we_compared\"><\/span>Solutions we compared<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>We compared multiple options and chose TiDB as our final solution.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">MySQL sharding<\/h3>\n\n\n\n<p>We considered using MySQL sharding to balance the load of multiple MySQL databases in a cluster. However, we decided against this policy because it had these issues:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To shard MySQL, we would need to modify the Metastore interface to operate MySQL. This would involve a lot of high-risk changes, and it would make future Hive upgrades more complicated.<\/li>\n\n\n\n<li>Every day, we replicated MySQL data to Hive for data governance and data life cycle management. We used the internal data replication platform to replicate data. If we had used MySQL sharding, we would need to update the replication logic for the data replication platform.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Scaling Hive Metastore using Federation<\/h3>\n\n\n\n<p>We thought we could scale Hive Metastore using Federation. We could form an architecture that consisted of MySQL and multiple sets of Hive Metastore and add a proxy in front of Metastore to distribute requests according to certain rules.<\/p>\n\n\n\n<p>But after investigation, we found this policy also had flaws:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To enable Federation on Hive Metastore, we wouldn&#8217;t need to modify Metastore, but we would have to maintain a set of routing components. What&#8217;s more, we need to carefully set routing rules. If we divided the existing MySQL store to different MySQL instances, divisions might be uneven. This would result in unbalanced loads among subclusters.<\/li>\n\n\n\n<li>Like the MySQL sharing solution, we would need to update the replication logic for the data replication platform.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">TiDB, with elastic scalability, is the perfect solution<\/h3>\n\n\n\n<p>TiDB is a distributed SQL database built by <a href=\"https:\/\/www.pingcap.com\/ko\/\">PingCAP<\/a> and its open-source community. <strong>It is MySQL compatible and features horizontal scalability, strong consistency, and high availability.<\/strong> It&#8217;s a one-stop solution for both OLTP and OLAP workloads. You can learn more about TiDB&#8217;s architecture <a href=\"https:\/\/docs.pingcap.com\/tidb\/v4.0\/architecture\">\uc5ec\uae30<\/a>.<\/p>\n\n\n\n<p>As you recall, our problem was that when the data size increased, MySQL, limited by its standalone performance, could not deliver good performance. When individual MySQL databases formed a cluster, the complexity drastically increased. If we could find a distributed, MySQL-compatible database, we could solve this problem. Therefore, TiDB is a perfect match.<\/p>\n\n\n\n<p>We chose TiDB because it had the following advantages:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>TiDB is compatible with the MySQL protocol.<\/strong> Our tests showed that TiDB supported all inserts, deletes, updates, and selects in Metastore. Using TiDB would not bring any compatibility-related issues. Therefore, all we needed to do is dump MySQL data to TiDB.<\/li>\n\n\n\n<li>Due to its distributed architecture, <strong>TiDB far outperforms MySQL on large data sets and large number of concurrent queries<\/strong>.<\/li>\n\n\n\n<li><strong>TiDB has excellent horizontal scalability.<\/strong> It supports elastic scalability. Whether we choose MySQL sharding or Hive Metastore Federation, we could encounter bottlenecks again. Then, we would need to do sharding or Hive Metastore Federation again. But TiDB solves this problem.<\/li>\n\n\n\n<li><strong>TiDB is widely used in Zhihu<\/strong>, and the related technologies are relatively mature, so we can control the migration risk.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_Hive_architecture\"><\/span>The Hive architecture<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Before migration to TiDB<\/h3>\n\n\n\n<p>Before we migrated from MySQL to TiDB, our Hive architecture was as follows. In this architecture, Zue is a visual query interface for Zhihu&#8217;s internal use.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"659\" src=\"https:\/\/www.pingcap.com\/core\/uploads\/2021\/11\/hive-architecture-before-migration-1024x659.jpeg\" alt=\"\" class=\"wp-image-2723\" srcset=\"https:\/\/static.pingcap.com\/files\/2021\/11\/hive-architecture-before-migration-1024x659.jpeg 1024w, https:\/\/static.pingcap.com\/files\/2021\/11\/hive-architecture-before-migration-300x193.jpeg 300w, https:\/\/static.pingcap.com\/files\/2021\/11\/hive-architecture-before-migration-768x495.jpeg 768w, https:\/\/static.pingcap.com\/files\/2021\/11\/hive-architecture-before-migration-1536x989.jpeg 1536w, https:\/\/static.pingcap.com\/files\/2021\/11\/hive-architecture-before-migration-1440x927.jpeg 1440w, https:\/\/static.pingcap.com\/files\/2021\/11\/hive-architecture-before-migration.jpeg 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">The Hive architecture before migration to TiDB<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">After migration to TiDB<\/h3>\n\n\n\n<p>After we migrated from MySQL to TiDB, the Hive architecture looks like this:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"2000\" height=\"1199\" src=\"https:\/\/www.pingcap.com\/core\/uploads\/2020\/07\/hive-architecture-after-migration.jpg\" alt=\"The Hive architecture after migration to TiDB\" class=\"wp-image-468\" srcset=\"https:\/\/static.pingcap.com\/files\/2020\/07\/hive-architecture-after-migration.jpg 2000w, https:\/\/static.pingcap.com\/files\/2020\/07\/hive-architecture-after-migration-300x180.jpg 300w, https:\/\/static.pingcap.com\/files\/2020\/07\/hive-architecture-after-migration-1024x614.jpg 1024w, https:\/\/static.pingcap.com\/files\/2020\/07\/hive-architecture-after-migration-768x460.jpg 768w, https:\/\/static.pingcap.com\/files\/2020\/07\/hive-architecture-after-migration-1536x921.jpg 1536w, https:\/\/static.pingcap.com\/files\/2020\/07\/hive-architecture-after-migration-1440x863.jpg 1440w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/><\/figure>\n\n\n\n<div class=\"caption-center\">The Hive architecture after migration to TiDB<\/div>\n\n\n\n<p>You can see that after we migrated metadata to TiDB, the architecture has almost no change. The query requests, which were on a single MySQL node, are now distributed in the TiDB cluster. The larger the TiDB cluster, the higher the query efficiency and the greater the performance improvement.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_migration_process\"><\/span>The migration process<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>We migrated from MySQL to TiDB this way:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>We used MySQL as the primary database and TiDB as the secondary database to replicate data from MySQL to TiDB in real time.<\/li>\n\n\n\n<li>We reduced the number of Metastore nodes to one to prevent multiple Metastore nodes from writing to MySQL and TiDB simultaneously, which would cause inconsistent metadata.<\/li>\n\n\n\n<li>During the application&#8217;s off-peak hours, we switched from the primary database to the secondary. We used TiDB as the primary and restarted Metastore.<\/li>\n\n\n\n<li>We added back Metastore nodes.<\/li>\n<\/ol>\n\n\n\n<p>During the migration process, the application was not affected. Now TiDB successfully runs in our production environment.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_applications_running_status\"><\/span>The application&#8217;s running status<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Operation execution time in the application peak<\/h3>\n\n\n\n<p>We tested the database from the Hive level, simulated the application peak, and concurrently deleted and added partitions for tables with millions of partitions. We executed Hive SQL statements as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER TABLE '${table_name}' DROP IF EXISTS PARTITION(...);\nALTER TABLE '${table_name}' ADD IF NOT EXISTS PARTITION(...);\n<\/code><\/pre>\n\n\n\n<p>The operation execution time dropped from 45\u201375 seconds before migration to under 10 seconds after migration.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The impact of large queries on the database<\/h3>\n\n\n\n<p>From the Metastore level, we tested some of the SQL statements submitted by Metastore, especially SQL statements that would cause great pressure on the Metastore, for example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT `A0`.`PART_NAME`,`A0`.`PART_NAME` AS `NUCORDER0` FROM `PARTITIONS` `A0` LEFT OUTER JOIN `TBLS` `B0` ON `A0`.`TBL_ID` = `B0`.`TBL_ID` LEFT OUTER JOIN `DBS` `C0` ON `B0`.`DB_ID` = `C0`.`DB_ID` WHERE `C0`.`NAME` = '${database_name}' AND `B0`.`TBL_NAME` = '${table_name}' ORDER BY `NUCORDER0`\n<\/code><\/pre>\n\n\n\n<p>When the number of partitions of a Hive table was very large, this SQL statement would trigger great pressure on the Metastore. Before migration to TiDB, the execution time of this type of SQL statement in MySQL was 30\u201340 seconds. After migration, the execution time was 6\u20137 seconds. What a remarkable improvement!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Replication time<\/h3>\n\n\n\n<p>The safety data sheet (SDS) table, with more than 10 million rows of data, is one of the biggest tables in Metastore. The replication time of the SDS table in Metastore on the data replication platform was reduced from 90 seconds to 15 seconds.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Whats_next\"><\/span>What&#8217;s next<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In the Hive Metastore case, TiDB helps us horizontally scale our metadata storage database so we no longer need to worry about our database storage capacity. We hope that, in the future, TiDB can provide cross-data center (DC) services: through the cross-DC deployment of data replicas, TiDB could connect online and offline scenarios so we can do real-time extract, transform, load (ETL) tasks offline without causing pressure on online services. This will improve offline ETL tasks&#8217; real-time performance. Therefore, we&#8217;re developing <a href=\"https:\/\/github.com\/tidb-incubator\/TiBigData\">TiBigData<\/a>.<\/p>\n\n\n\n<p>This project was initiated by Xiaoguang Sun, a TiKV Maintainer at Zhihu. Currently, it&#8217;s an incubation project in PingCAP Incubator. PingCAP Incubator aims to establish an incubation system for TiDB ecological open-source projects. For all projects, see <a href=\"https:\/\/github.com\/tidb-incubator\">tidb-incubator on GitHub<\/a>. You can check out PingCAP Incubator&#8217;s documentation <a href=\"https:\/\/github.com\/pingcap\/community\/tree\/master\/incubator\">\uc5ec\uae30<\/a>.<\/p>\n\n\n\n<p>The TiBigData project has provided the read-only support of Presto and Flink for TiDB. In the future, with the support of the PingCAP Incubator plan, we hope to build the TiBigData project together with the community and strive to enhance TiDB&#8217;s big data capabilities.<\/p>","protected":false},"excerpt":{"rendered":"<p>This post shows how TiDB helps Zhihu scale its Hive Metastore database horizontally to meet its growing business needs and eliminate its database bottlenecks.<\/p>","protected":false},"author":22,"featured_media":469,"template":"","tags":[26,9],"customer":[42],"industry":[8],"class_list":["post-467","case-study","type-case-study","status-publish","has-post-thumbnail","hentry","tag-no-sharding","tag-scalability","customer-zhihu","industry-internet"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Horizontally Scaling the Hive Metastore Database by Migrating from MySQL to TiDB | TiDB<\/title>\n<meta name=\"description\" content=\"Read success stories from businesses using TiDB and the TiDB Cloud solutions from PingCAP. Learn more in our latest case study &quot;Horizontally Scaling the Hive Metastore Database by Migrating from MySQL to TiDB&quot; here.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pingcap.com\/ko\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Horizontally Scaling the Hive Metastore Database by Migrating from MySQL to TiDB | TiDB\" \/>\n<meta property=\"og:description\" content=\"Read success stories from businesses using TiDB and the TiDB Cloud solutions from PingCAP. Learn more in our latest case study &quot;Horizontally Scaling the Hive Metastore Database by Migrating from MySQL to TiDB&quot; here.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pingcap.com\/ko\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/\" \/>\n<meta property=\"og:site_name\" content=\"TiDB\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/pingcap2015\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-17T06:09:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/static.pingcap.com\/files\/2020\/07\/horizontally-scale-hive-metastore-scaled.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"854\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@PingCAP\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"8\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pingcap.com\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/\",\"url\":\"https:\/\/www.pingcap.com\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/\",\"name\":\"Horizontally Scaling the Hive Metastore Database by Migrating from MySQL to TiDB | TiDB\",\"isPartOf\":{\"@id\":\"https:\/\/www.pingcap.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.pingcap.com\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.pingcap.com\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/static.pingcap.com\/files\/2020\/07\/horizontally-scale-hive-metastore-scaled.jpg\",\"datePublished\":\"2020-07-24T00:00:00+00:00\",\"dateModified\":\"2024-07-17T06:09:34+00:00\",\"description\":\"Read success stories from businesses using TiDB and the TiDB Cloud solutions from PingCAP. Learn more in our latest case study \\\"Horizontally Scaling the Hive Metastore Database by Migrating from MySQL to TiDB\\\" here.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pingcap.com\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pingcap.com\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.pingcap.com\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/#primaryimage\",\"url\":\"https:\/\/static.pingcap.com\/files\/2020\/07\/horizontally-scale-hive-metastore-scaled.jpg\",\"contentUrl\":\"https:\/\/static.pingcap.com\/files\/2020\/07\/horizontally-scale-hive-metastore-scaled.jpg\",\"width\":2560,\"height\":854},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pingcap.com\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pingcap.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Case Studies\",\"item\":\"https:\/\/www.pingcap.com\/customers\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Horizontally Scaling the Hive Metastore Database by Migrating from MySQL to TiDB\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pingcap.com\/#website\",\"url\":\"https:\/\/www.pingcap.com\/\",\"name\":\"TiDB\",\"description\":\"TiDB | SQL at Scale\",\"publisher\":{\"@id\":\"https:\/\/www.pingcap.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pingcap.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.pingcap.com\/#organization\",\"name\":\"PingCAP\",\"url\":\"https:\/\/www.pingcap.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png\",\"contentUrl\":\"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png\",\"width\":811,\"height\":232,\"caption\":\"PingCAP\"},\"image\":{\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/facebook.com\/pingcap2015\",\"https:\/\/x.com\/PingCAP\",\"https:\/\/linkedin.com\/company\/pingcap\",\"https:\/\/youtube.com\/channel\/UCuq4puT32DzHKT5rU1IZpIA\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Horizontally Scaling the Hive Metastore Database by Migrating from MySQL to TiDB | TiDB","description":"Read success stories from businesses using TiDB and the TiDB Cloud solutions from PingCAP. Learn more in our latest case study \"Horizontally Scaling the Hive Metastore Database by Migrating from MySQL to TiDB\" here.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pingcap.com\/ko\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/","og_locale":"ko_KR","og_type":"article","og_title":"Horizontally Scaling the Hive Metastore Database by Migrating from MySQL to TiDB | TiDB","og_description":"Read success stories from businesses using TiDB and the TiDB Cloud solutions from PingCAP. Learn more in our latest case study \"Horizontally Scaling the Hive Metastore Database by Migrating from MySQL to TiDB\" here.","og_url":"https:\/\/www.pingcap.com\/ko\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/","og_site_name":"TiDB","article_publisher":"https:\/\/facebook.com\/pingcap2015","article_modified_time":"2024-07-17T06:09:34+00:00","og_image":[{"width":2560,"height":854,"url":"https:\/\/static.pingcap.com\/files\/2020\/07\/horizontally-scale-hive-metastore-scaled.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_site":"@PingCAP","twitter_misc":{"Est. reading time":"8\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.pingcap.com\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/","url":"https:\/\/www.pingcap.com\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/","name":"Horizontally Scaling the Hive Metastore Database by Migrating from MySQL to TiDB | TiDB","isPartOf":{"@id":"https:\/\/www.pingcap.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pingcap.com\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/#primaryimage"},"image":{"@id":"https:\/\/www.pingcap.com\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/#primaryimage"},"thumbnailUrl":"https:\/\/static.pingcap.com\/files\/2020\/07\/horizontally-scale-hive-metastore-scaled.jpg","datePublished":"2020-07-24T00:00:00+00:00","dateModified":"2024-07-17T06:09:34+00:00","description":"Read success stories from businesses using TiDB and the TiDB Cloud solutions from PingCAP. Learn more in our latest case study \"Horizontally Scaling the Hive Metastore Database by Migrating from MySQL to TiDB\" here.","breadcrumb":{"@id":"https:\/\/www.pingcap.com\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pingcap.com\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/"]}]},{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/#primaryimage","url":"https:\/\/static.pingcap.com\/files\/2020\/07\/horizontally-scale-hive-metastore-scaled.jpg","contentUrl":"https:\/\/static.pingcap.com\/files\/2020\/07\/horizontally-scale-hive-metastore-scaled.jpg","width":2560,"height":854},{"@type":"BreadcrumbList","@id":"https:\/\/www.pingcap.com\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pingcap.com\/"},{"@type":"ListItem","position":2,"name":"Case Studies","item":"https:\/\/www.pingcap.com\/customers\/"},{"@type":"ListItem","position":3,"name":"Horizontally Scaling the Hive Metastore Database by Migrating from MySQL to TiDB"}]},{"@type":"WebSite","@id":"https:\/\/www.pingcap.com\/#website","url":"https:\/\/www.pingcap.com\/","name":"\ud2f0DB","description":"TiDB | SQL at Scale","publisher":{"@id":"https:\/\/www.pingcap.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pingcap.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/www.pingcap.com\/#organization","name":"PingCAP","url":"https:\/\/www.pingcap.com\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/","url":"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png","contentUrl":"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png","width":811,"height":232,"caption":"PingCAP"},"image":{"@id":"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/pingcap2015","https:\/\/x.com\/PingCAP","https:\/\/linkedin.com\/company\/pingcap","https:\/\/youtube.com\/channel\/UCuq4puT32DzHKT5rU1IZpIA"]}]}},"card_markup":"<div class=\"card-case-study\"><div class=\"card-case-study__image-container\"><img class=\"card-case-study__image\" alt=\"Zhihu\" src=\"https:\/\/static.pingcap.com\/files\/2024\/11\/28235646\/Zhihu-white.svg\" loading=\"lazy\" width=199 height=80 \/><\/div><span class=\"card-case-study__title\">Horizontally Scaling the Hive Metastore Database by Migrating from MySQL to TiDB<\/span><div class=\"card-case-study__button\"><a class=\"button--secondary\" href=\"https:\/\/www.pingcap.com\/ko\/case-study\/horizontally-scaling-hive-metastore-database-by-migrating-from-mysql-to-tidb\/\" target=\"_blank\">View Case Study<\/a><\/div><\/div>","_links":{"self":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/case-study\/467","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/case-study"}],"about":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/types\/case-study"}],"author":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/users\/22"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media\/469"}],"wp:attachment":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media?parent=467"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/tags?post=467"},{"taxonomy":"customer","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/customer?post=467"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/industry?post=467"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}