Java 类org.apache.hadoop.hdfs.server.namenode.FSEditLogOp.MkdirOp 实例源码

项目:hadoop    文件:FSEditLog.java   
/** 
 * 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);
}
项目:aliyun-oss-hadoop-fs    文件:FSEditLog.java   
/** 
 * 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);
}
项目:big-c    文件:FSEditLog.java   
/** 
 * 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);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:FSEditLog.java   
/** 
 * 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);
}
项目:hadoop-EAR    文件:ServerLogReaderUtil.java   
/**
 * 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;
  }
}
项目:FlexMap    文件:FSEditLog.java   
/** 
 * 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);
}
项目:hadoop    文件:NameNodeAdapter.java   
public static String getMkdirOpPath(FSEditLogOp op) {
  if (op.opCode == FSEditLogOpCodes.OP_MKDIR) {
    return ((MkdirOp) op).path;
  } else {
    return null;
  }
}
项目:hadoop    文件:NameNodeAdapter.java   
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;
}
项目:aliyun-oss-hadoop-fs    文件:NameNodeAdapter.java   
public static String getMkdirOpPath(FSEditLogOp op) {
  if (op.opCode == FSEditLogOpCodes.OP_MKDIR) {
    return ((MkdirOp) op).path;
  } else {
    return null;
  }
}
项目:aliyun-oss-hadoop-fs    文件:NameNodeAdapter.java   
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;
}
项目:big-c    文件:NameNodeAdapter.java   
public static String getMkdirOpPath(FSEditLogOp op) {
  if (op.opCode == FSEditLogOpCodes.OP_MKDIR) {
    return ((MkdirOp) op).path;
  } else {
    return null;
  }
}
项目:big-c    文件:NameNodeAdapter.java   
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;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:NameNodeAdapter.java   
public static String getMkdirOpPath(FSEditLogOp op) {
  if (op.opCode == FSEditLogOpCodes.OP_MKDIR) {
    return ((MkdirOp) op).path;
  } else {
    return null;
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:NameNodeAdapter.java   
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;
}
项目:hadoop-plus    文件:FSEditLog.java   
/** 
 * 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);
}
项目:hadoop-plus    文件:NameNodeAdapter.java   
public static String getMkdirOpPath(FSEditLogOp op) {
  if (op.opCode == FSEditLogOpCodes.OP_MKDIR) {
    return ((MkdirOp) op).path;
  } else {
    return null;
  }
}
项目:hadoop-plus    文件:NameNodeAdapter.java   
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;
}
项目:FlexMap    文件:NameNodeAdapter.java   
public static String getMkdirOpPath(FSEditLogOp op) {
  if (op.opCode == FSEditLogOpCodes.OP_MKDIR) {
    return ((MkdirOp) op).path;
  } else {
    return null;
  }
}
项目:FlexMap    文件:NameNodeAdapter.java   
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;
}
项目:hadoop-TCP    文件:FSEditLog.java   
/** 
 * 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);
}
项目:hadoop-TCP    文件:NameNodeAdapter.java   
public static String getMkdirOpPath(FSEditLogOp op) {
  if (op.opCode == FSEditLogOpCodes.OP_MKDIR) {
    return ((MkdirOp) op).path;
  } else {
    return null;
  }
}
项目:hadoop-TCP    文件:NameNodeAdapter.java   
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;
}
项目:hardfs    文件:FSEditLog.java   
/** 
 * 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);
}
项目:hardfs    文件:NameNodeAdapter.java   
public static String getMkdirOpPath(FSEditLogOp op) {
  if (op.opCode == FSEditLogOpCodes.OP_MKDIR) {
    return ((MkdirOp) op).path;
  } else {
    return null;
  }
}
项目:hardfs    文件:NameNodeAdapter.java   
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;
}
项目:hadoop-on-lustre2    文件:FSEditLog.java   
/** 
 * 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);
}
项目:hadoop-on-lustre2    文件:NameNodeAdapter.java   
public static String getMkdirOpPath(FSEditLogOp op) {
  if (op.opCode == FSEditLogOpCodes.OP_MKDIR) {
    return ((MkdirOp) op).path;
  } else {
    return null;
  }
}
项目:hadoop-on-lustre2    文件:NameNodeAdapter.java   
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;
}