shell获取配置

  1. 使用hbase shell 获取相关配置

    1. @shell.hbase.configuration.get("hbase.rpc.timeout")

    image.png

    清除数据

  2. truncate清除数据的流程:disable table -> drop table -> recreate table ,注意点:清除数据会直接删除HDFS上的数据,并且truncate命令不会保留预设的参数,如预分区等等


  1. truncate_preserve:truncate_preserve和truncate的区别就是truncate_preserve会保留原来预设的参数,推荐使用这个命令