2016-11-25 43 views
1

1)创建一个数据库并使用它。即使删除数据库,Hive CLI也显示数据库使用情况

hive> create database testdb; 
hive> use testdb; 

2)设置hive.cli.print.current.db = true以显示正在使用哪个数据库。

hive> set hive.cli.print.current.db=true; 
hive (testdb)> 

3)删除数据库。

hive (testdb)> drop database testdb; 

4)设置hive.cli.print.current.db = false,然后将其设置为true。

hive (testdb)> set hive.cli.print.current.db=false; 
hive> set hive.cli.print.current.db=true; 

5)Hive CLI仍然表示正在使用已删除的数据库。

hive (testdb)> 

回答

0

如果您在DEV环境中工作,

  • 您可能要启用TRASH功能。这可以通过在core-site.xml中设置 fs.trash.interval = 1来完成。在少数情况下,文件/数据库没有 移动到这些垃圾文件夹。
  • 检查是否将合适的权限分配给HDFS中的垃圾文件夹。
  • 注销会话并检查它是否仍然存在。
+0

'fs.trash.interval'在hdfs core-site.xml中设置为360。另外,/ users中没有配置单元目录。 –

相关问题