本文整理汇总了Java中org.apache.hadoop.hdfs.server.namenode.FSEditLogOp.MkdirOp类的典型用法代码示例。如果您正苦于以下问题:Java MkdirOp类的具体用法?Java MkdirOp怎么用?Java MkdirOp使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MkdirOp类属于org.apache.hadoop.hdfs.server.namenode.FSEditLogOp包,在下文中一共展示了MkdirOp类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: logMkDir
import org.apache.hadoop.hdfs.server.namenode.FSEditLogOp.MkdirOp; //导入依赖的package包/类
/**
* Add create directory record to edit log
*/
public void logMkDir(String path, INode newNode) {
PermissionStatus permissions = newNode.getPermissionStatus();
MkdirOp op = MkdirOp.getInstance(cache.get())
.setInodeId(newNode.getId())
.setPath(path)
.setTimestamp(newNode.getModificationTime())
.setPermissionStatus(permissions);
AclFeature f = newNode.getAclFeature();
if (f != null) {
op.setAclEntries(AclStorage.readINodeLogicalAcl(newNode));
}
XAttrFeature x = newNode.getXAttrFeature();
if (x != null) {
op.setXAttrs(x.getXAttrs());
}
logEdit(op);
}
开发者ID:naver,项目名称:hadoop,代码行数:23,代码来源:FSEditLog.java
示例2: createNotification
import org.apache.hadoop.hdfs.server.namenode.FSEditLogOp.MkdirOp; //导入依赖的package包/类
/**
* Converts a Transaction Log operation into a NamespaceNotification
* object.
* @param op the Transaction Log operation.
* @return the NamespaceNotification object or null if the type of
* the operation isn't supported to be transformed into a
* NamespaceNotification.
*/
static NamespaceNotification createNotification(FSEditLogOp op) {
switch (op.opCode) {
case OP_ADD:
return new NamespaceNotification(((AddOp)op).path,
EventType.FILE_ADDED.getByteValue(), op.getTransactionId());
case OP_CLOSE:
return new NamespaceNotification(((CloseOp)op).path,
EventType.FILE_CLOSED.getByteValue(), op.getTransactionId());
case OP_DELETE:
return new NamespaceNotification(((DeleteOp)op).path,
EventType.NODE_DELETED.getByteValue(), op.getTransactionId());
case OP_MKDIR:
return new NamespaceNotification(((MkdirOp)op).path,
EventType.DIR_ADDED.getByteValue(), op.getTransactionId());
default:
return null;
}
}
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:30,代码来源:ServerLogReaderUtil.java
示例3: logMkDir
import org.apache.hadoop.hdfs.server.namenode.FSEditLogOp.MkdirOp; //导入依赖的package包/类
/**
* Add create directory record to edit log
*/
public void logMkDir(String path, INode newNode) {
PermissionStatus permissions = newNode.getPermissionStatus();
MkdirOp op = MkdirOp.getInstance(cache.get())
.reset()
.setInodeId(newNode.getId())
.setPath(path)
.setTimestamp(newNode.getModificationTime())
.setPermissionStatus(permissions);
AclFeature f = newNode.getAclFeature();
if (f != null) {
op.setAclEntries(AclStorage.readINodeLogicalAcl(newNode));
}
XAttrFeature x = newNode.getXAttrFeature();
if (x != null) {
op.setXAttrs(x.getXAttrs());
}
logEdit(op);
}
开发者ID:yncxcw,项目名称:FlexMap,代码行数:24,代码来源:FSEditLog.java
示例4: getMkdirOpPath
import org.apache.hadoop.hdfs.server.namenode.FSEditLogOp.MkdirOp; //导入依赖的package包/类
public static String getMkdirOpPath(FSEditLogOp op) {
if (op.opCode == FSEditLogOpCodes.OP_MKDIR) {
return ((MkdirOp) op).path;
} else {
return null;
}
}
开发者ID:naver,项目名称:hadoop,代码行数:8,代码来源:NameNodeAdapter.java
示例5: createMkdirOp
import org.apache.hadoop.hdfs.server.namenode.FSEditLogOp.MkdirOp; //导入依赖的package包/类
public static FSEditLogOp createMkdirOp(String path) {
MkdirOp op = MkdirOp.getInstance(new FSEditLogOp.OpInstanceCache())
.setPath(path)
.setTimestamp(0)
.setPermissionStatus(new PermissionStatus(
"testuser", "testgroup", FsPermission.getDefault()));
return op;
}
开发者ID:naver,项目名称:hadoop,代码行数:9,代码来源:NameNodeAdapter.java
示例6: logMkDir
import org.apache.hadoop.hdfs.server.namenode.FSEditLogOp.MkdirOp; //导入依赖的package包/类
/**
* Add create directory record to edit log
*/
public void logMkDir(String path, INode newNode) {
MkdirOp op = MkdirOp.getInstance(cache.get())
.setInodeId(newNode.getId())
.setPath(path)
.setTimestamp(newNode.getModificationTime())
.setPermissionStatus(newNode.getPermissionStatus());
logEdit(op);
}
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:12,代码来源:FSEditLog.java
示例7: logMkDir
import org.apache.hadoop.hdfs.server.namenode.FSEditLogOp.MkdirOp; //导入依赖的package包/类
/**
* Add create directory record to edit log
*/
public void logMkDir(String path, INode newNode) {
PermissionStatus permissions = newNode.getPermissionStatus();
MkdirOp op = MkdirOp.getInstance(cache.get())
.setInodeId(newNode.getId())
.setPath(path)
.setTimestamp(newNode.getModificationTime())
.setPermissionStatus(permissions);
AclFeature f = newNode.getAclFeature();
if (f != null) {
op.setAclEntries(AclStorage.readINodeLogicalAcl(newNode));
}
logEdit(op);
}
开发者ID:Seagate,项目名称:hadoop-on-lustre2,代码行数:18,代码来源:FSEditLog.java
注:本文中的org.apache.hadoop.hdfs.server.namenode.FSEditLogOp.MkdirOp类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论