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 ...
随机推荐
- FreeBSD 9.1安装KMS 这是一个伪命题###### ,9....
FreeBSD 9.1安装KMS 这是一个伪命题###### ,9.1的内核已经加入了KMS内核支持 需要更新ports中的xorg到打了补丁的版本,无意中发现了一个pkg源,这个事也搞定了 free ...
- Linux服务器时间同步方法
一般稍微大点的项目都会部署到好几台服务器做集群,同一个应用可能部署到几台服务器上,而处理业务中必须让不同的服务器上时间保持一致,这就需要进行服务器间的时间同步.我的做法是: 1,选择其中一台对外网开放 ...
- centos下完全卸载mysql
版权声明:本文为博主原创文章,未经博主允许不得转载. yum方式安装的MySQL 1.yum remove mysql mysql-server mysql-libs compat-mysql51 2 ...
- mariadb connector bug
为了解决http://www.cnblogs.com/zhjh256/p/5807086.html的问题测试mariadb connector,常规的增删改查没有问题. 这货本来是为了解决存储过程bu ...
- Echarts图表控件使用总结1(Line,Bar)
问题篇(详解):http://www.cnblogs.com/hanyinglong/p/4708337.html 1.前言 a.在系统开发过程中可能会使用到图表控件,一个好的图标控件可以使我们的网站 ...
- CRUD Operations in MVC4 Using AngularJS and WCF REST Services
Now in this article I will show how to do Create, Retrieve, Update and Delete (CRUD) operations in M ...
- Vue列表渲染
gitHub地址:https://github.com/lily1010/vue_learn/tree/master/lesson09 一 for循环数组 <!DOCTYPE html> ...
- 原生js实现tab选项卡
1.html部分 <body> <div id="tab"> <div class="tab_menu& ...
- vIDC v2.0 强大的端口转发神器使用总结-开放内网tfs代码服务
vIDC2.0 端口映射工具,最近在公司闲来无事,想自己整个tfs来管理自己的研究代码. 本来是想用微软Visual Studio提供的免费tfs,但是无奈速度太慢.他们的服务器在美国,中国也没有代理 ...
- GridView自带的分页功能实现
要实现GrdView分页的功能操作如下:1.更改GrdView控件的AllowPaging属性为true.2.更改GrdView控件的PageSize属性为 任意数值(默认为10)3.更改GrdVie ...