org.apache.hadoop.hdfs.server.namenode.FSEditLogOp.MkdirOp Java Examples
The following examples show how to use
org.apache.hadoop.hdfs.server.namenode.FSEditLogOp.MkdirOp.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FSEditLog.java From hadoop with Apache License 2.0 | 6 votes |
/** * 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); }
Example #2
Source File: FSEditLog.java From big-c with Apache License 2.0 | 6 votes |
/** * 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); }
Example #3
Source File: NameNodeAdapter.java From hadoop with Apache License 2.0 | 5 votes |
public static String getMkdirOpPath(FSEditLogOp op) { if (op.opCode == FSEditLogOpCodes.OP_MKDIR) { return ((MkdirOp) op).path; } else { return null; } }
Example #4
Source File: NameNodeAdapter.java From hadoop with Apache License 2.0 | 5 votes |
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; }
Example #5
Source File: NameNodeAdapter.java From big-c with Apache License 2.0 | 5 votes |
public static String getMkdirOpPath(FSEditLogOp op) { if (op.opCode == FSEditLogOpCodes.OP_MKDIR) { return ((MkdirOp) op).path; } else { return null; } }
Example #6
Source File: NameNodeAdapter.java From big-c with Apache License 2.0 | 5 votes |
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; }