Java 类org.apache.hadoop.hdfs.protocol.proto.XAttrProtos.XAttrEditLogProto 实例源码

项目:hadoop    文件:FSEditLogOp.java   
@Override
public void writeFields(DataOutputStream out) throws IOException {
  FSImageSerialization.writeLong(inodeId, out);
  FSImageSerialization.writeString(path, out);
  FSImageSerialization.writeShort(replication, out);
  FSImageSerialization.writeLong(mtime, out);
  FSImageSerialization.writeLong(atime, out);
  FSImageSerialization.writeLong(blockSize, out);
  new ArrayWritable(Block.class, blocks).write(out);
  permissions.write(out);

  if (this.opCode == OP_ADD) {
    AclEditLogUtil.write(aclEntries, out);
    XAttrEditLogProto.Builder b = XAttrEditLogProto.newBuilder();
    b.addAllXAttrs(PBHelper.convertXAttrProto(xAttrs));
    b.build().writeDelimitedTo(out);
    FSImageSerialization.writeString(clientName,out);
    FSImageSerialization.writeString(clientMachine,out);
    FSImageSerialization.writeBoolean(overwrite, out);
    FSImageSerialization.writeByte(storagePolicyId, out);
    // write clientId and callId
    writeRpcIds(rpcClientId, rpcCallId, out);
  }
}
项目:big-c    文件:FSEditLogOp.java   
@Override
public void writeFields(DataOutputStream out) throws IOException {
  FSImageSerialization.writeLong(inodeId, out);
  FSImageSerialization.writeString(path, out);
  FSImageSerialization.writeShort(replication, out);
  FSImageSerialization.writeLong(mtime, out);
  FSImageSerialization.writeLong(atime, out);
  FSImageSerialization.writeLong(blockSize, out);
  new ArrayWritable(Block.class, blocks).write(out);
  permissions.write(out);

  if (this.opCode == OP_ADD) {
    AclEditLogUtil.write(aclEntries, out);
    XAttrEditLogProto.Builder b = XAttrEditLogProto.newBuilder();
    b.addAllXAttrs(PBHelper.convertXAttrProto(xAttrs));
    b.build().writeDelimitedTo(out);
    FSImageSerialization.writeString(clientName,out);
    FSImageSerialization.writeString(clientMachine,out);
    FSImageSerialization.writeBoolean(overwrite, out);
    FSImageSerialization.writeByte(storagePolicyId, out);
    // write clientId and callId
    writeRpcIds(rpcClientId, rpcCallId, out);
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:FSEditLogOp.java   
@Override
public void writeFields(DataOutputStream out) throws IOException {
  FSImageSerialization.writeLong(inodeId, out);
  FSImageSerialization.writeString(path, out);
  FSImageSerialization.writeShort(replication, out);
  FSImageSerialization.writeLong(mtime, out);
  FSImageSerialization.writeLong(atime, out);
  FSImageSerialization.writeLong(blockSize, out);
  new ArrayWritable(Block.class, blocks).write(out);
  permissions.write(out);

  if (this.opCode == OP_ADD) {
    AclEditLogUtil.write(aclEntries, out);
    XAttrEditLogProto.Builder b = XAttrEditLogProto.newBuilder();
    b.addAllXAttrs(PBHelper.convertXAttrProto(xAttrs));
    b.build().writeDelimitedTo(out);
    FSImageSerialization.writeString(clientName,out);
    FSImageSerialization.writeString(clientMachine,out);
    FSImageSerialization.writeBoolean(overwrite, out);
    FSImageSerialization.writeByte(storagePolicyId, out);
    // write clientId and callId
    writeRpcIds(rpcClientId, rpcCallId, out);
  }
}
项目:FlexMap    文件:FSEditLogOp.java   
@Override
public void writeFields(DataOutputStream out) throws IOException {
  FSImageSerialization.writeLong(inodeId, out);
  FSImageSerialization.writeString(path, out);
  FSImageSerialization.writeShort(replication, out);
  FSImageSerialization.writeLong(mtime, out);
  FSImageSerialization.writeLong(atime, out);
  FSImageSerialization.writeLong(blockSize, out);
  new ArrayWritable(Block.class, blocks).write(out);
  permissions.write(out);

  if (this.opCode == OP_ADD) {
    AclEditLogUtil.write(aclEntries, out);
    XAttrEditLogProto.Builder b = XAttrEditLogProto.newBuilder();
    b.addAllXAttrs(PBHelper.convertXAttrProto(xAttrs));
    b.build().writeDelimitedTo(out);
    FSImageSerialization.writeString(clientName,out);
    FSImageSerialization.writeString(clientMachine,out);
    FSImageSerialization.writeBoolean(overwrite, out);
    FSImageSerialization.writeByte(storagePolicyId, out);
    // write clientId and callId
    writeRpcIds(rpcClientId, rpcCallId, out);
  }
}
项目:hadoop    文件:FSEditLogOp.java   
private static List<XAttr> readXAttrsFromEditLog(DataInputStream in,
    int logVersion) throws IOException {
  if (!NameNodeLayoutVersion.supports(NameNodeLayoutVersion.Feature.XATTRS,
      logVersion)) {
    return null;
  }
  XAttrEditLogProto proto = XAttrEditLogProto.parseDelimitedFrom(in);
  return PBHelper.convertXAttrs(proto.getXAttrsList());
}
项目:hadoop    文件:FSEditLogOp.java   
@Override
public 
void writeFields(DataOutputStream out) throws IOException {
  FSImageSerialization.writeLong(inodeId, out);
  FSImageSerialization.writeString(path, out);
  FSImageSerialization.writeLong(timestamp, out); // mtime
  FSImageSerialization.writeLong(timestamp, out); // atime, unused at this
  permissions.write(out);
  AclEditLogUtil.write(aclEntries, out);
  XAttrEditLogProto.Builder b = XAttrEditLogProto.newBuilder();
  b.addAllXAttrs(PBHelper.convertXAttrProto(xAttrs));
  b.build().writeDelimitedTo(out);
}
项目:hadoop    文件:FSEditLogOp.java   
@Override
void readFields(DataInputStream in, int logVersion) throws IOException {
  XAttrEditLogProto p = XAttrEditLogProto.parseDelimitedFrom(in);
  src = p.getSrc();
  xAttrs = PBHelper.convertXAttrs(p.getXAttrsList());
  readRpcIds(in, logVersion);
}
项目:hadoop    文件:FSEditLogOp.java   
@Override
public void writeFields(DataOutputStream out) throws IOException {
  XAttrEditLogProto.Builder b = XAttrEditLogProto.newBuilder();
  if (src != null) {
    b.setSrc(src);
  }
  b.addAllXAttrs(PBHelper.convertXAttrProto(xAttrs));
  b.build().writeDelimitedTo(out);
  // clientId and callId
  writeRpcIds(rpcClientId, rpcCallId, out);
}
项目:hadoop    文件:FSEditLogOp.java   
@Override
void readFields(DataInputStream in, int logVersion) throws IOException {
  XAttrEditLogProto p = XAttrEditLogProto.parseDelimitedFrom(in);
  src = p.getSrc();
  xAttrs = PBHelper.convertXAttrs(p.getXAttrsList());
  readRpcIds(in, logVersion);
}
项目:hadoop    文件:FSEditLogOp.java   
@Override
public void writeFields(DataOutputStream out) throws IOException {
  XAttrEditLogProto.Builder b = XAttrEditLogProto.newBuilder();
  if (src != null) {
    b.setSrc(src);
  }
  b.addAllXAttrs(PBHelper.convertXAttrProto(xAttrs));
  b.build().writeDelimitedTo(out);
  // clientId and callId
  writeRpcIds(rpcClientId, rpcCallId, out);
}
项目:big-c    文件:FSEditLogOp.java   
private static List<XAttr> readXAttrsFromEditLog(DataInputStream in,
    int logVersion) throws IOException {
  if (!NameNodeLayoutVersion.supports(NameNodeLayoutVersion.Feature.XATTRS,
      logVersion)) {
    return null;
  }
  XAttrEditLogProto proto = XAttrEditLogProto.parseDelimitedFrom(in);
  return PBHelper.convertXAttrs(proto.getXAttrsList());
}
项目:big-c    文件:FSEditLogOp.java   
@Override
public 
void writeFields(DataOutputStream out) throws IOException {
  FSImageSerialization.writeLong(inodeId, out);
  FSImageSerialization.writeString(path, out);
  FSImageSerialization.writeLong(timestamp, out); // mtime
  FSImageSerialization.writeLong(timestamp, out); // atime, unused at this
  permissions.write(out);
  AclEditLogUtil.write(aclEntries, out);
  XAttrEditLogProto.Builder b = XAttrEditLogProto.newBuilder();
  b.addAllXAttrs(PBHelper.convertXAttrProto(xAttrs));
  b.build().writeDelimitedTo(out);
}
项目:big-c    文件:FSEditLogOp.java   
@Override
void readFields(DataInputStream in, int logVersion) throws IOException {
  XAttrEditLogProto p = XAttrEditLogProto.parseDelimitedFrom(in);
  src = p.getSrc();
  xAttrs = PBHelper.convertXAttrs(p.getXAttrsList());
  readRpcIds(in, logVersion);
}
项目:big-c    文件:FSEditLogOp.java   
@Override
public void writeFields(DataOutputStream out) throws IOException {
  XAttrEditLogProto.Builder b = XAttrEditLogProto.newBuilder();
  if (src != null) {
    b.setSrc(src);
  }
  b.addAllXAttrs(PBHelper.convertXAttrProto(xAttrs));
  b.build().writeDelimitedTo(out);
  // clientId and callId
  writeRpcIds(rpcClientId, rpcCallId, out);
}
项目:big-c    文件:FSEditLogOp.java   
@Override
void readFields(DataInputStream in, int logVersion) throws IOException {
  XAttrEditLogProto p = XAttrEditLogProto.parseDelimitedFrom(in);
  src = p.getSrc();
  xAttrs = PBHelper.convertXAttrs(p.getXAttrsList());
  readRpcIds(in, logVersion);
}
项目:big-c    文件:FSEditLogOp.java   
@Override
public void writeFields(DataOutputStream out) throws IOException {
  XAttrEditLogProto.Builder b = XAttrEditLogProto.newBuilder();
  if (src != null) {
    b.setSrc(src);
  }
  b.addAllXAttrs(PBHelper.convertXAttrProto(xAttrs));
  b.build().writeDelimitedTo(out);
  // clientId and callId
  writeRpcIds(rpcClientId, rpcCallId, out);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:FSEditLogOp.java   
private static List<XAttr> readXAttrsFromEditLog(DataInputStream in,
    int logVersion) throws IOException {
  if (!NameNodeLayoutVersion.supports(NameNodeLayoutVersion.Feature.XATTRS,
      logVersion)) {
    return null;
  }
  XAttrEditLogProto proto = XAttrEditLogProto.parseDelimitedFrom(in);
  return PBHelper.convertXAttrs(proto.getXAttrsList());
}
项目:hadoop-2.6.0-cdh5.4.3    文件:FSEditLogOp.java   
@Override
public 
void writeFields(DataOutputStream out) throws IOException {
  FSImageSerialization.writeLong(inodeId, out);
  FSImageSerialization.writeString(path, out);
  FSImageSerialization.writeLong(timestamp, out); // mtime
  FSImageSerialization.writeLong(timestamp, out); // atime, unused at this
  permissions.write(out);
  AclEditLogUtil.write(aclEntries, out);
  XAttrEditLogProto.Builder b = XAttrEditLogProto.newBuilder();
  b.addAllXAttrs(PBHelper.convertXAttrProto(xAttrs));
  b.build().writeDelimitedTo(out);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:FSEditLogOp.java   
@Override
void readFields(DataInputStream in, int logVersion) throws IOException {
  XAttrEditLogProto p = XAttrEditLogProto.parseDelimitedFrom(in);
  src = p.getSrc();
  xAttrs = PBHelper.convertXAttrs(p.getXAttrsList());
  readRpcIds(in, logVersion);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:FSEditLogOp.java   
@Override
public void writeFields(DataOutputStream out) throws IOException {
  XAttrEditLogProto.Builder b = XAttrEditLogProto.newBuilder();
  if (src != null) {
    b.setSrc(src);
  }
  b.addAllXAttrs(PBHelper.convertXAttrProto(xAttrs));
  b.build().writeDelimitedTo(out);
  // clientId and callId
  writeRpcIds(rpcClientId, rpcCallId, out);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:FSEditLogOp.java   
@Override
void readFields(DataInputStream in, int logVersion) throws IOException {
  XAttrEditLogProto p = XAttrEditLogProto.parseDelimitedFrom(in);
  src = p.getSrc();
  xAttrs = PBHelper.convertXAttrs(p.getXAttrsList());
  readRpcIds(in, logVersion);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:FSEditLogOp.java   
@Override
public void writeFields(DataOutputStream out) throws IOException {
  XAttrEditLogProto.Builder b = XAttrEditLogProto.newBuilder();
  if (src != null) {
    b.setSrc(src);
  }
  b.addAllXAttrs(PBHelper.convertXAttrProto(xAttrs));
  b.build().writeDelimitedTo(out);
  // clientId and callId
  writeRpcIds(rpcClientId, rpcCallId, out);
}
项目:FlexMap    文件:FSEditLogOp.java   
private static List<XAttr> readXAttrsFromEditLog(DataInputStream in,
    int logVersion) throws IOException {
  if (!NameNodeLayoutVersion.supports(NameNodeLayoutVersion.Feature.XATTRS,
      logVersion)) {
    return null;
  }
  XAttrEditLogProto proto = XAttrEditLogProto.parseDelimitedFrom(in);
  return PBHelper.convertXAttrs(proto.getXAttrsList());
}
项目:FlexMap    文件:FSEditLogOp.java   
@Override
public 
void writeFields(DataOutputStream out) throws IOException {
  FSImageSerialization.writeLong(inodeId, out);
  FSImageSerialization.writeString(path, out);
  FSImageSerialization.writeLong(timestamp, out); // mtime
  FSImageSerialization.writeLong(timestamp, out); // atime, unused at this
  permissions.write(out);
  AclEditLogUtil.write(aclEntries, out);
  XAttrEditLogProto.Builder b = XAttrEditLogProto.newBuilder();
  b.addAllXAttrs(PBHelper.convertXAttrProto(xAttrs));
  b.build().writeDelimitedTo(out);
}
项目:FlexMap    文件:FSEditLogOp.java   
@Override
void readFields(DataInputStream in, int logVersion) throws IOException {
  XAttrEditLogProto p = XAttrEditLogProto.parseDelimitedFrom(in);
  src = p.getSrc();
  xAttrs = PBHelper.convertXAttrs(p.getXAttrsList());
  readRpcIds(in, logVersion);
}
项目:FlexMap    文件:FSEditLogOp.java   
@Override
public void writeFields(DataOutputStream out) throws IOException {
  XAttrEditLogProto.Builder b = XAttrEditLogProto.newBuilder();
  if (src != null) {
    b.setSrc(src);
  }
  b.addAllXAttrs(PBHelper.convertXAttrProto(xAttrs));
  b.build().writeDelimitedTo(out);
  // clientId and callId
  writeRpcIds(rpcClientId, rpcCallId, out);
}
项目:FlexMap    文件:FSEditLogOp.java   
@Override
void readFields(DataInputStream in, int logVersion) throws IOException {
  XAttrEditLogProto p = XAttrEditLogProto.parseDelimitedFrom(in);
  src = p.getSrc();
  xAttrs = PBHelper.convertXAttrs(p.getXAttrsList());
  readRpcIds(in, logVersion);
}
项目:FlexMap    文件:FSEditLogOp.java   
@Override
public void writeFields(DataOutputStream out) throws IOException {
  XAttrEditLogProto.Builder b = XAttrEditLogProto.newBuilder();
  if (src != null) {
    b.setSrc(src);
  }
  b.addAllXAttrs(PBHelper.convertXAttrProto(xAttrs));
  b.build().writeDelimitedTo(out);
  // clientId and callId
  writeRpcIds(rpcClientId, rpcCallId, out);
}