Java 类org.apache.hadoop.hdfs.server.namenode.snapshot.INodeFileUnderConstructionWithSnapshot 实例源码

项目:hadoop-plus    文件:INodeFileUnderConstruction.java   
@Override
public INodeFileUnderConstruction recordModification(final Snapshot latest,
    final INodeMap inodeMap) throws QuotaExceededException {
  if (isInLatestSnapshot(latest)) {
    INodeFileUnderConstructionWithSnapshot newFile = getParent()
        .replaceChild4INodeFileUcWithSnapshot(this, inodeMap)
        .recordModification(latest, inodeMap);
    return newFile;
  } else {
    return this;
  }
}
项目:hadoop-plus    文件:INodeDirectory.java   
/** Replace a child {@link INodeFile} with an {@link INodeFileUnderConstructionWithSnapshot}. */
INodeFileUnderConstructionWithSnapshot replaceChild4INodeFileUcWithSnapshot(
    final INodeFileUnderConstruction child, final INodeMap inodeMap) {
  Preconditions.checkArgument(!(child instanceof INodeFileUnderConstructionWithSnapshot),
      "Child file is already an INodeFileUnderConstructionWithSnapshot, child=" + child);
  final INodeFileUnderConstructionWithSnapshot newChild
      = new INodeFileUnderConstructionWithSnapshot(child, null);
  replaceChildFile(child, newChild, inodeMap);
  return newChild;
}
项目:hadoop-TCP    文件:INodeFileUnderConstruction.java   
@Override
public INodeFileUnderConstruction recordModification(final Snapshot latest,
    final INodeMap inodeMap) throws QuotaExceededException {
  if (isInLatestSnapshot(latest)) {
    INodeFileUnderConstructionWithSnapshot newFile = getParent()
        .replaceChild4INodeFileUcWithSnapshot(this, inodeMap)
        .recordModification(latest, inodeMap);
    return newFile;
  } else {
    return this;
  }
}
项目:hadoop-TCP    文件:INodeDirectory.java   
/** Replace a child {@link INodeFile} with an {@link INodeFileUnderConstructionWithSnapshot}. */
INodeFileUnderConstructionWithSnapshot replaceChild4INodeFileUcWithSnapshot(
    final INodeFileUnderConstruction child, final INodeMap inodeMap) {
  Preconditions.checkArgument(!(child instanceof INodeFileUnderConstructionWithSnapshot),
      "Child file is already an INodeFileUnderConstructionWithSnapshot, child=" + child);
  final INodeFileUnderConstructionWithSnapshot newChild
      = new INodeFileUnderConstructionWithSnapshot(child, null);
  replaceChildFile(child, newChild, inodeMap);
  return newChild;
}
项目:hardfs    文件:INodeFileUnderConstruction.java   
@Override
public INodeFileUnderConstruction recordModification(final Snapshot latest,
    final INodeMap inodeMap) throws QuotaExceededException {
  if (isInLatestSnapshot(latest)) {
    INodeFileUnderConstructionWithSnapshot newFile = getParent()
        .replaceChild4INodeFileUcWithSnapshot(this, inodeMap)
        .recordModification(latest, inodeMap);
    return newFile;
  } else {
    return this;
  }
}
项目:hardfs    文件:INodeDirectory.java   
/** Replace a child {@link INodeFile} with an {@link INodeFileUnderConstructionWithSnapshot}. */
INodeFileUnderConstructionWithSnapshot replaceChild4INodeFileUcWithSnapshot(
    final INodeFileUnderConstruction child, final INodeMap inodeMap) {
  Preconditions.checkArgument(!(child instanceof INodeFileUnderConstructionWithSnapshot),
      "Child file is already an INodeFileUnderConstructionWithSnapshot, child=" + child);
  final INodeFileUnderConstructionWithSnapshot newChild
      = new INodeFileUnderConstructionWithSnapshot(child, null);
  replaceChildFile(child, newChild, inodeMap);
  return newChild;
}