HDP学习--HDFS Storage(中)_hortonword hdp hdfs-程序员宅基地

技术标签: HDP  # HDP学习  

承接HDP学习–HDFS Storage(上)

八、 HDFS Trash

Trash相当于回收站,暂时的将删除的文件和目录移动到/.Trash/Current, 当文件被其他用户删除, 方便恢复。删除的文件保存在Trash directory
例如:
删除 /user/steve/dir1/fileA
重建在Trash directory:

/user/steve/.Trash/Current/user/steve/dir1/fileA

但也是有限制:
 如果你使用 HDFS Shell or the Ambari Files View删除文件, 是会保护的;
 如果使用Java API, WebHDFS, the HDFS NFS Gateway, or HUE删除的文件,是不被保护的。
Ttrash有两个属性决定:

Set In core-default.xml 
property:
    fs.trash.checkpoint.interval
    Determines how often the NameNode should checkpoint the .Trash directory.
    0 means use the value set in fs.trash.interval

Set In core-site.xml
property:
    fs.trash.interval
    Determines how often checkpoints in the .Trash directory should be removed. 
    A value of 0 disables trash. 
    The HDP default value is 360 minutes. 

HDFS Shell -rm 命令包含一个 参数:

   -skip Trash  相当于Windows中的永久删除, 步移动回收站

九、 HDFS Trash Operation

下图是Trash的流程:
这里写图片描述
解释:
The fs.trash.checkpoint.interval determines the number of minutes between trash checkpoints. If zero, the value is set to the value of fs.trash.interval. Zero is the HDP default. The number for fs.trash.checkpoint.interval should be smaller than or equal to fs.trash.interval.

Every time the checkpointer runs, it renames the .Trash/Current directory to a new numeric name. For example, .Trash/Current could be renamed to .Trash/150518175000. When new files or directories are deleted, HDFS creates a new .Trash/Current directory to hold them.

How long the older and now renamed checkpoint directory—with its deleted files and directories—is retained is determined by the fs.trash.interval property in core-site.xml. It determines the number of minutes after which the checkpoint directory gets deleted. If zero, the trash feature is disabled. The HDP default is 360 minutes. It is important to note that it is not the individual files and directories that are older that the fs.trash.interval that are deleted, but it is the checkpoint directory that is older than the fs.trash.interval that is deleted.

The fs.trash.interval may be configured both on the server and the client. If trash is disabled on the server side then the client side configuration is checked. If trash is enabled on the server side then the value configured on the server is used and the client configuration value is ignored.

十、 Overriding HDFS Default Properties

这里写图片描述

十一、 Changing File and Directory Ownership

这里写图片描述

十二、Changing File and Directory Permissions

这里写图片描述

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/wuxintdrh/article/details/53748321

智能推荐

单目双目标定_生成棋盘格每个内角点的空间三维左边-程序员宅基地

文章浏览阅读587次。本文用QT调用OpenCV4.5.1进行相机标定。头文件如下#include <QMainWindow>#include <opencv2/opencv.hpp>#include <iostream>#include <math.h>#include <fstream>#include <vector>using namespace cv;using namespace std;1.进行摄像机的读取,用O._生成棋盘格每个内角点的空间三维左边

cxp文件查看 欧姆龙_cxp格式怎么打开-程序员宅基地

文章浏览阅读1.9k次。cxp格式怎么打开cxp是一种Core Media Player XML-based Playlist 文件,可以用CAXA工艺图表或CX-P5.0打开。北京数码大方科技股份有限公司(CAXA)是中国领先的工业软件和服务公司,是中国最大的CAD和PLM软件供应商,是中国工业云的倡导者和领跑者。主要提供数字化设计(CAD)、数字化制造(MES)、产品全生命周期管理(PLM)和工业云服务,是“中国工业..._cxp 文件

码云WebHook使用_码云 webhook 在哪里-程序员宅基地

文章浏览阅读666次。服务器配置gitee,webhook钩子_码云 webhook 在哪里

python安装教程_pydes安装-程序员宅基地

文章浏览阅读672次。第一步:下载Python安装包在相关浏览器访问Python的官网 中找到适合自己需求Python安装包版本,_pydes安装

【Flink】 FLink TaskManager with id is no longer reachable-程序员宅基地

文章浏览阅读2.4k次。flink报错如下看起来是心跳的原因,为什么会丢失心跳呢?部署在k8s里面,taskmanger还是自己挂了又重启了,具体taskmanger的问题还在定位根据报错找到对应的源码@Override@Override@Override@Override这里报错的id是?resourceId在方法getTaskManagerResourceID 中我们可以看到这个id是如何生成的。地址和rpcPort?_is no longer reachable

Android TEE可信计算环境与TrustZone基础_secure spi-程序员宅基地

文章浏览阅读2.1k次,点赞2次,收藏19次。本文介绍了可信计算的基本概念、可信计算环境(TEE)的产生和应用,并详细介绍了 Android 移动端基于 TrustZone 架构实现的 TEE 的框架设计、安全机制等。_secure spi

随便推点

伽马校正笔记(Gamma Correction)_伽马曲线-程序员宅基地

文章浏览阅读3.2k次,点赞3次,收藏18次。在数字图像系统中,伽马(Gamma)是一个重要的但很少被正确理解的特性。它定义了一个像素的数值和对应的实际亮度之间的关系。_伽马曲线

java爬虫黑马百度云,Java爬虫小Demo java爬取百度风云榜数据-程序员宅基地

文章浏览阅读189次。Java爬虫小Demo java爬取百度风云榜数据 很简单的一个小例子,使用到了java的爬虫框架jsoup ,一起啦看看实现的方法吧!相关推荐:Python爬虫实战 python爬虫爬取百度风云榜榜单信息Pom文件插入依赖的引用:org.jsoupjsoup1.12.1实现方法代码:public String spider() {String url = "http://top.baidu.c..._java 黑马爬虫demo

vue项目中使用lib-flexible解决移动端适配的问题_uniapp lib-flexible-程序员宅基地

文章浏览阅读1.2w次。前言:先说下为什么使用 lib-flexible为了解决移动端适配问题,更多参考:https://www.cnblogs.com/lyzg/p/5058356.html动态改写标签给元素添加data-dpr属性,并且动态改写data-dpr的值给元素添加font-size属性,并且动态改写font-size的值1: 效果(效果更直观)添加lib-flexible前效果(页面不会随视..._uniapp lib-flexible

java爬虫与python爬虫的区别_java爬虫和python爬虫哪个好-程序员宅基地

文章浏览阅读6k次。python优点:1.各种爬虫框架,方便高效的下载网页;2.多线程、进程模型成熟稳定,爬虫是一个典型的多任务处理场景,请求页面时会有较长的延迟,总体来说更多的是等待。多线程或进程会更优化程序效率,提升整个系统下载和分析能力。3.gae 的支持,当初写爬虫的时候刚刚有 gae,而且只支持 python ,利用 gae 创建的爬虫几乎免费,最多的时候我有近千个应用实例在工作。java 和 c++ :相..._爬虫java还是hipython

一次搞懂Java如何调用Kotlin的高级特性_java调用kotlin方法-程序员宅基地

文章浏览阅读3.4k次。虽然 Kotlin 推出很多年了,但是在国内的普及度并没有成压倒性优势,还是有很多新老项目使用Java语言开发的。(Java永不为奴 :sweat_smile::sweat_smile:)如果项目中其他小伙伴使用的Kotlin,而我只会Java,那我怎么调用他Kotlin的方法?其实Kotlin早给我们做好了兼容,很多特性我们都可以使用Java来调用。下面一起看看一些常用的Kotlin特性如何使用Java语言来调用。一、Java调用KT属性与方法Kotlin的属性与方法,在Java中的调用。_java调用kotlin方法

一维条形码 code128 的全面介绍_code128条形码-程序员宅基地

文章浏览阅读2.5w次,点赞6次,收藏23次。0:code128,编码格式:Code128A字符集 包括大写字母、数字、常用标点符号和一些控制符。Code128B字符集 包括大小写字母、数字、常用标点符号。Code128C字符集 为纯数字序列。Code128Auto 是将上述三种字符集最佳优化组合。1:Code128编码规则:开始位 + [FNC1(为EAN128码时加)] + 数据位 _code128条形码

推荐文章

热门文章

相关标签