hive metatool 使用说明

metatool 使用说明

usage: metatool
 -dryRun                                  Perform a dry run of
                                          updateLocation changes.When run
                                          with the dryRun option
                                          updateLocation changes are
                                          displayed but not persisted.
                                          dryRun is valid only with the
                                          updateLocation option.
 -executeJDOQL <query-string>             execute the given JDOQL query
 -help                                    print this message
 -listFSRoot                              print the current FS root
                                          locations
 -prepareAcidUpgrade <find-compactions>   Generates a set Compaction
                                          commands to run to prepare for
                                          Hive 2.x to 3.0 upgrade
 -serdePropKey <serde-prop-key>           Specify the key for serde
                                          property to be updated.
                                          serdePropKey option is valid
                                          only with updateLocation option.
 -tablePropKey <table-prop-key>           Specify the key for table
                                          property to be updated.
                                          tablePropKey option is valid
                                          only with updateLocation option.
 -updateLocation <new-loc> <old-loc>      Update FS root location in the
                                          metastore to new location.Both
                                          new-loc and old-loc should be
                                          valid URIs with valid host names
                                          and schemes.When run with the
                                          dryRun option changes are
                                          displayed but are not persisted.
                                          When run with the
                                          serdepropKey/tablePropKey option
                                          updateLocation looks for the
                                          serde-prop-key/table-prop-key
                                          that is specified and updates
                                          its value if found.

-listFSRoot

列出所有数据库的地址

metatool -listFSRoot

执行结果如下:

hdfs://master-e812d44:8020/warehouse/tablespace/managed/hive/sys.db
hdfs://master-e812d44:8020/warehouse/tablespace/managed/hive
hdfs://master-e812d44:8020/warehouse/tablespace/managed/hive/information_schema.db
hdfs://master-e812d44:8020/warehouse/tablespace/managed/hive/test.db

-updateLocation

更改存储位置

metatool -updateLocation hdfs://master-e812d44:8020 hdfs://master-e812d44:8020/hive/new-location

更新 DBS 和 SDS 数据表中关于位置的字段。

Looking for LOCATION_URI field in DBS table to update..
Successfully updated the following locations..
old location: hdfs://master-e812d44:8020/warehouse/tablespace/managed/hive/test.db new location: hdfs://master-e812d44:8020/warehouse/tablespace/managed/hive/test.db
-- 省略详细信息
Updated 4 records in DBS table
Looking for LOCATION field in SDS table to update..
Successfully updated the following locations..

-- 省略详细信息
Updated 43 records in SDS table

相关推荐

  1. Eureka的使用说明

    2024-04-10 17:56:02       61 阅读
  2. NatCat使用说明

    2024-04-10 17:56:02       39 阅读
  3. hive metatool 使用说明

    2024-04-10 17:56:02       43 阅读
  4. Git使用说明

    2024-04-10 17:56:02       26 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-10 17:56:02       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-10 17:56:02       100 阅读
  3. 在Django里面运行非项目文件

    2024-04-10 17:56:02       82 阅读
  4. Python语言-面向对象

    2024-04-10 17:56:02       91 阅读

热门阅读

  1. 计算机笔记(5)续20个

    2024-04-10 17:56:02       43 阅读
  2. Python 设计一个监督自己的软件2

    2024-04-10 17:56:02       37 阅读
  3. 【kears】(01)keras使用介绍

    2024-04-10 17:56:02       35 阅读
  4. Openstack(T)openstack event list 验证panko,显示为空

    2024-04-10 17:56:02       39 阅读
  5. AI-漫画推文

    2024-04-10 17:56:02       37 阅读
  6. QML速查手册

    2024-04-10 17:56:02       41 阅读
  7. uniapp:uview-plus的一些记录

    2024-04-10 17:56:02       43 阅读
  8. docker容器常用创建命令

    2024-04-10 17:56:02       42 阅读
  9. Git学习笔记

    2024-04-10 17:56:02       37 阅读
  10. PHP语言中=> 和<=有啥区别

    2024-04-10 17:56:02       44 阅读
  11. 阻止有风险的文件扩展名插件

    2024-04-10 17:56:02       36 阅读
  12. leetcode - 2073. Time Needed to Buy Tickets

    2024-04-10 17:56:02       42 阅读
  13. react ant design 通过函数弹出 modal窗口

    2024-04-10 17:56:02       33 阅读
  14. webRtc生产环境实用方法

    2024-04-10 17:56:02       32 阅读
  15. Linux下的文件权限

    2024-04-10 17:56:02       29 阅读