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

智能推荐

AsyncHttpClient_asynchttpclient包下载-程序员宅基地

文章浏览阅读455次。一、下载二、在应用中引用android-async-http开源项目方法1:找到下载文件的源码library\src\main\java的com包黏贴到项目中的src目录下方法2:把android-async-http-master\releases下面最新的jar包放到应用到libs下,然后在引入的包中点击右键选择add as library..._asynchttpclient包下载

CSS网格教程:网格布局模块/网格容器/网格项目_请简单描述一下如何将一个容器设置为网格容器-程序员宅基地

文章浏览阅读823次。属性可以用作 grid-row-start、grid-column-start、grid-row-end 和 grid-column-end 属性的简写属性。如果所有列都应当有相同的宽度,则设置为 "auto"。默认情况下,容器在每一行的每一列都有一个网格项目,但是可以设置网格项目的样式,让它们跨越多个列和/或行。属性是 grid-column-start 和 grid-column-end 属性的简写属性。属性是 grid-row-start 和 grid-row-end 属性的简写属性。_请简单描述一下如何将一个容器设置为网格容器

JPA 多表分页查询-程序员宅基地

文章浏览阅读571次。业务场景:大学生毕业后统计毕业去向。学生实体和毕业去向实体一对一关系。实体:@Entity@Data@Table(name = "t_s_student")public class TSStudent implements Serializable { /**主键*/ @Id @GeneratedValue(generator =..._jpa多表分页查询

Android 查看并解决重复依赖,零基础android入门_android exclude-程序员宅基地

文章浏览阅读2.5k次。exclude group: ‘com.squareup.okhttp3’exclude group: ‘com.squareup.okio’exclude group: ‘com.google.code.gson’//exclude(module: ‘gson’) // 防止版本冲突}Android 获取所有依赖库的几种方式方式一:通过 dependencies 命令./gradlew :app:dependencies注意:这里的 app 是指工程下的 app 目录,如果你工程下_android exclude

简析过拟合与欠拟合_过拟合和欠拟合图像-程序员宅基地

文章浏览阅读1.6w次,点赞2次,收藏39次。欠拟合与过拟合问题是机器学习中的经典问题,尽管相关的讨论和预防方法非常多,但目前在许多任务中仍经常会出现过拟合等问题,还没有找到一个十分通用、有效的解决方法。不过总体上看,现在人们常用的一些很简洁的方法基本上能够较好地解决欠拟合与过拟合问题,总结如下。欠拟合与过拟合的概念的成因比较简单,观点统一,这里不再介绍。现在常用的判断方法是从训练集中随机选一部分作为一个验证集,采用K折交叉验证的方式,用..._过拟合和欠拟合图像

单页面应用路由实现原理:以 React-Router 为例_使用单页面路由,底层是通过什么技术实现-程序员宅基地

文章浏览阅读425次。前言2 年前我刚接触 react-router,觉得这玩意儿很神奇,只定义几个 Route 和 Link,就可以控制整个 React 应用的路由。不过那时候只想着怎么用它,也写过 2 篇与之相关的文章#17#73(现在看来,那时候的文章写得实在是太差了)今天,我们来认真研究一番,希望能解决以下 3 个问题。单页面应用路由的实现原理是什么? react-router 是如何跟 rea..._使用单页面路由,底层是通过什么技术实现

随便推点

【开源工程】之YUVPlayer1.6-程序员宅基地

文章浏览阅读3.1k次,点赞3次,收藏8次。下载地址:https://download.csdn.net/download/listener51/10937110说明在YuvPlayer1.5的基础上优化部分代码,更改像素的显示方法如YUVPlayer1.5亮度跟色度是同时显示在同一个画板里,但是对于其他格式的YUV,三平面并不能很好显示:因此改为3平面分别显示,方便扩展:...

CentOS 6.5的安装详解(图文详解)-程序员宅基地

文章浏览阅读415次。第一步 点击"Install or upgrade an existing system"第二步 磁盘硬件检测界面,一般都正常,不需检测,选择"skip",没必要在这一步浪费几分钟时间第三步发现当地安装媒介界面,Enter第四步进入CentOS6.5引导界面,点击“Next”第五步安装语言选择界面,最好是选择"English(English)",点击“N...

MFC深入浅出-CObject类_cobjectlist mfc-程序员宅基地

文章浏览阅读207次。CObject类 CObject 是大多数MFC类的根类或基类。CObject类有很多有用的特性:对运行时类信息的支持,对动态创建的支持,对串行化的支持,对象诊断输出,等等。MFC从CObject派生出许多类,具备其中的一个或者多个特性。程序员也可以从CObject类派生出自己的类,利用CObject类的这些特性。 本章将讨论 MFC如何设计CObject类的这些特性。首先,..._cobjectlist mfc

jenkins项目构建类型 -----Pipeline流水线项目构建_jenkins中使用jenkins pipline构建npm项目配置步骤-程序员宅基地

文章浏览阅读2.4k次。学习笔记_jenkins中使用jenkins pipline构建npm项目配置步骤

JFrame的使用方法-程序员宅基地

文章浏览阅读2.3w次,点赞38次,收藏245次。JFrame的使用方法JFram是一个GUI的最顶级容器,基本上所有的GUI的组件都在其上面使用。使用方法1.创建一个JFrame对象JFrame jf = new JFrame("我是标题鸭!!!");当然标题的设置也可以使用setTitle();jf.setTitle("我是标题鸭!!!");2.设置窗体的大小和位置在默认情况下,窗体出现在屏幕的最左上角jf.setS..._jfram

机器学习实战 | 自动化特征工程工具Featuretools应用-程序员宅基地

文章浏览阅读1.3w次,点赞7次,收藏70次。本篇讲解使用自动化特征工程工具Featuretools,对数据进行自动化特征工程的方法,并借助于BigMart Sales数据集来演示自动化特征工程的相关应用。_featuretools

推荐文章

热门文章

相关标签