手动删除/kylin hdfs 上的数据

本文介绍如何手动清理Apache Kylin中HDFS上的过期数据。包括使用StorageCleanupJob工具遇到的问题及解决办法,以及如何手动删除指定Cube及其元数据。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

手动删除/kylin  hdfs 上的数据

      使用kylin一段时间,不难发现kylin指定的work folder目录下存储的数据越来越多。我们在使用kylin时,由于数据模型设计及其他问题,多次数据回溯,导致kylin的work folder下存储量越滚越大。不得不手动清除。

     kylin提供了清理的java类:org.apache.kylin.storage.hbase.util.StorageCleanupJob ,但是我在执行

${KYLIN_HOME}/bin/kylin.sh org.apache.kylin.storage.hbase.util.StorageCleanupJob --delete true

并没有发现删除kylin指定的work folder目录/kylin/kylin_metadata下的文件。

    我是手动删除的:

    首先到此目录下找到不要的cube及在此日期之前构建的(不是最后一次构建产生的数据需要删除的work folder)


然后到hbase中找到hbase_metadata表,查看cube元信息


   删除不要的cube

   deleteall 'kylin_metadata','/cube/C_PRODUCT_V1.json'

   删除之前最好备份一下

  ./bin/metastore.sh backup

ldy@ldy-pc:~/桌面$ sudo apt update 命中:1 http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1-hwe InRelease 忽略:2 http://archive.kylinos.cn/kylin/partner 10.1-hwe InRelease 错误:3 http://archive.kylinos.cn/kylin/partner 10.1-hwe Release 404 Not Found [IP: 59.42.240.60 80] 正在读取软件包列表... 完成 W: 鉴于仓库 'http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1-hwe InRelease' 不含有 'restricted' 组件,跳过配置文件 'restricted/binary-amd64/Packages' 的获取。(sources.list 中的组件名称是否拼写错误?) W: 鉴于仓库 'http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1-hwe InRelease' 不含有 'restricted' 组件,跳过配置文件 'restricted/i18n/Translation-zh' 的获取。(sources.list 中的组件名称是否拼写错误?) W: 鉴于仓库 'http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1-hwe InRelease' 不含有 'restricted' 组件,跳过配置文件 'restricted/i18n/Translation-en' 的获取。(sources.list 中的组件名称是否拼写错误?) W: 鉴于仓库 'http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1-hwe InRelease' 不含有 'restricted' 组件,跳过配置文件 'restricted/i18n/Translation-zh_CN' 的获取。(sources.list 中的组件名称是否拼写错误?) W: 鉴于仓库 'http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1-hwe InRelease' 不含有 'restricted' 组件,跳过配置文件 'restricted/cnf/Commands-amd64' 的获取。(sources.list 中的组件名称是否拼写错误?) W: 鉴于仓库 'http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1-hwe InRelease' 不含有 'universe' 组件,跳过配置文件 'universe/binary-amd64/Packages' 的获取。(sources.list 中的组件名称是否拼写错误?) W: 鉴于仓库 'http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1-hwe InRelease' 不含有 'universe' 组件,跳过配置文件 'universe/i18n/Translation-zh' 的获取。(sources.list 中的组件名称是否拼写错误?) W: 鉴于仓库 'http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1-hwe InRelease' 不含有 'universe' 组件,跳过配置文件 'universe/i18n/Translation-en' 的获取。(sources.list 中的组件名称是否拼写错误?) W: 鉴于仓库 'http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1-hwe InRelease' 不含有 'universe' 组件,跳过配置文件 'universe/i18n/Translation-zh_CN' 的获取。(sources.list 中的组件名称是否拼写错误?) W: 鉴于仓库 'http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1-hwe InRelease' 不含有 'universe' 组件,跳过配置文件 'universe/cnf/Commands-amd64' 的获取。(sources.list 中的组件名称是否拼写错误?) W: 鉴于仓库 'http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1-hwe InRelease' 不含有 'multiverse' 组件,跳过配置文件 'multiverse/binary-amd64/Packages' 的获取。(sources.list 中的组件名称是否拼写错误?) W: 鉴于仓库 'http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1-hwe InRelease' 不含有 'multiverse' 组件,跳过配置文件 'multiverse/i18n/Translation-en' 的获取。(sources.list 中的组件名称是否拼写错误?) W: 鉴于仓库 'http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1-hwe InRelease' 不含有 'multiverse' 组件,跳过配置文件 'multiverse/i18n/Translation-zh' 的获取。(sources.list 中的组件名称是否拼写错误?) W: 鉴于仓库 'http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1-hwe InRelease' 不含有 'multiverse' 组件,跳过配置文件 'multiverse/i18n/Translation-zh_CN' 的获取。(sources.list 中的组件名称是否拼写错误?) W: 鉴于仓库 'http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1-hwe InRelease' 不含有 'multiverse' 组件,跳过配置文件 'multiverse/cnf/Commands-amd64' 的获取。(sources.list 中的组件名称是否拼写错误?) E: 仓库 “http://archive.kylinos.cn/kylin/partner 10.1-hwe Release” 没有 Release 文件。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
最新发布
07-15
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值