Hive drop table batched
if the hive version not support drop table tablename purge.
your drop table command will move data to .Trash in hdfs.
dfs .Trash;
drop table tablename;
dfs .Trash/Current;
#batch drop tables you want in hive.
hive --database databaseName -e "show tables '*_evan'" >>tables.txt;
---read line from txt files
while read line
do
#echo "drop table $line;"
hive --database databasename -e "drop table if exists $line;";
done < tables.txt
#output the drop table tableName to a hql file, then execute the file.
Hive drop table batched的更多相关文章
- Hive drop table,create table没有反应处理方法
Hive drop table时没有反应,于是强制中断. 解决之法,对其进行补充. mysql> show variables like 'char%';第一步:进入mysql,输入:show ...
- Hive drop table卡住的问题
在hive中,show tables,create 等命令能正常执行,删除表drop table x时,会出现卡住的现象. 进入mysql, show variables like 'char%' 可 ...
- hive drop和恢复partition external table
在hdfs目录:/user/xx/table/test_external 保存 test_external 表数据 先建表,使用列式存储格式 CREATE external TABLE `test_e ...
- 【转】Hive 修改 table、column
表 1.重命名表重命名表的语句如下: ALTER TABLE table_name RENAME TO new_table_name 2.修改表属性: ALTER TABLE table_name S ...
- 利用硬链接和truncate降低drop table对线上环境的影响
众所周知drop table会严重的消耗服务器IO性能,如果被drop的table容量较大,甚至会影响到线上的正常. 首先,我们看一下为什么drop容量大的table会影响线上服务 直接执行drop ...
- DROP TABLE ** CASCADE CONSTRAINTS PURGE删除表的时候级联删除从表外键
1.关于 cascade constraints 假设A为主表(既含有某一主键的表),B为从表(即引用了A的主键作为外键). 则当删除A表时,如不特殊说明,则 drop table A 系统会出现错误 ...
- Truncate table、Delete与Drop table的区别
Truncate table.Delete与Drop table的区别 TRUNCATE TABLE 在功能上与不带 WHERE 子句的 DELETE 语句相同:二者均删除表中的全部行.但 TRUNC ...
- Oracle10g 回收站及彻底删除table : drop table xx purge
drop后的表被放在回收站(user_recyclebin)里,而不是直接删除掉.这样,回收站里的表信息就可以被恢复,或彻底清除. 1.通过查询回收站user_recyclebin获取被删除的表信息, ...
- drop table big_table 调试
(gdb) thread apply all bt Thread (Thread )): # # /storage/innobase/os/os0sync.cc: # ) at /usr/src/my ...
随机推荐
- 可访问性级别的C# 修饰符
使用访问修饰符 public.protected.internal 或 private 可以为成员指定以下声明的访问级别之一. http://keleyi.com/a/bjad/3ccfqh95.ht ...
- 重温html5的新增的标签和废除的标签
HTML5已经盛行有段时间了,对于标签的使用,按照规范,哪些该用,哪些不该用,你是否都掌握了呢.今天我在这里详细列举下: 新增的结构标签 section元素 表示页面中的一个内容区 块,比如章节.页眉 ...
- .NET转JAVA之拼音组件
PS:做了4年,自我感觉.NET到瓶颈了,而且公司并没有深入运用.NET技术的项目,自我学习感觉也没太大动力(请骂我懒T_T).再加上技术年限越往上走,了解到的.NET职业提升环境就越来越艰难(个人理 ...
- 编程Bug集
(基础)将“/”用于取余符号,导致非预想结果——1小时后才找到错误原因 9.16
- 【C#进阶系列】04 类型基础
关于System.Object 所有类型都从System.Object派生而来. System.Object的公共方法中ToString()一般是返回对象的类型的全名,只有Int32这些类型将其重写后 ...
- 平衡二叉树---Shaolin
Description Shaolin temple is very famous for its Kongfu monks.A lot of young men go to Shaolin temp ...
- yii2时间日期控件的使用[转]
注:原文http://www.manks.top/yii2-datetimepicker.html 有更改 1.安装 进入到项目文件中D:\phpStudy\WWW\yii2blog 使用cmd ...
- IE Unknown runtime error
1. 在函数中使用原生的js的时候,有时在IE下会出现Unknown runtime error 火狐下正常 2. 解决办法, 将原生js改成jquery处理兼容问题 document.getElem ...
- eclipse debug 快捷键
简单的说下调试的快捷键: 1 F5:下一步,可以进入下一个函数栈 2 F6:当前函数的下一步,不会进入其他的函数. 3 F8:下一个断点. 4 也可以通过选中一个变量或者表达式,按ctrl+shift ...
- lambda 个人学习理解
lambda是简化代码量的写用更简单的方法来写匿名方法 lambda左边是参数,右边是代码块(方法执行语句). 整体运算结果是根据左边参数,执行右边语句,返回右边执行的结果: 匿名方法是简化方法 1. ...