@Override void fromXml(Stanza st) throws InvalidXmlException { this.path = st.getValue("PATH"); List<Stanza> blocks = st.getChildren("BLOCK"); int size = blocks.size(); Preconditions.checkState(size == 1 || size == 2); this.penultimateBlock = size == 2 ? FSEditLogOp.blockFromXml(blocks.get(0)) : null; this.lastBlock = FSEditLogOp.blockFromXml(blocks.get(size - 1)); readRpcIdsFromXml(st); } }
@Override void fromXml(Stanza st) throws InvalidXmlException { this.path = st.getValue("PATH"); List<Stanza> blocks = st.hasChildren("BLOCK") ? st.getChildren("BLOCK") : new ArrayList<Stanza>(); this.blocks = new Block[blocks.size()]; for (int i = 0; i < blocks.size(); i++) { this.blocks[i] = FSEditLogOp.blockFromXml(blocks.get(i)); } readRpcIdsFromXml(st); } }
@Override void fromXml(Stanza st) throws InvalidXmlException { this.src = st.getValue("SRC"); this.clientName = st.getValue("CLIENTNAME"); this.clientMachine = st.getValue("CLIENTMACHINE"); this.newLength = Long.parseLong(st.getValue("NEWLENGTH")); this.timestamp = Long.parseLong(st.getValue("TIMESTAMP")); if (st.hasChildren("BLOCK")) this.truncateBlock = FSEditLogOp.blockFromXml(st); }
@Override void fromXml(Stanza st) throws InvalidXmlException { this.length = Integer.parseInt(st.getValue("LENGTH")); this.inodeId = Long.parseLong(st.getValue("INODEID")); this.path = st.getValue("PATH"); this.replication = Short.parseShort(st.getValue("REPLICATION")); this.mtime = Long.parseLong(st.getValue("MTIME")); this.atime = Long.parseLong(st.getValue("ATIME")); this.blockSize = Long.parseLong(st.getValue("BLOCKSIZE")); this.clientName = st.getValue("CLIENT_NAME"); this.clientMachine = st.getValue("CLIENT_MACHINE"); this.overwrite = Boolean.parseBoolean(st.getValueOrNull("OVERWRITE")); if (st.hasChildren("BLOCK")) { List<Stanza> blocks = st.getChildren("BLOCK"); this.blocks = new Block[blocks.size()]; for (int i = 0; i < blocks.size(); i++) { this.blocks[i] = FSEditLogOp.blockFromXml(blocks.get(i)); } } else { this.blocks = new Block[0]; } this.permissions = permissionStatusFromXml(st); aclEntries = readAclEntriesFromXml(st); if (st.hasChildren("ERASURE_CODING_POLICY_ID")) { this.erasureCodingPolicyId = Byte.parseByte(st.getValue( "ERASURE_CODING_POLICY_ID")); } readRpcIdsFromXml(st); } }
@Override void fromXml(Stanza st) throws InvalidXmlException { this.path = st.getValue("PATH"); List<Stanza> blocks = st.getChildren("BLOCK"); int size = blocks.size(); Preconditions.checkState(size == 1 || size == 2); this.penultimateBlock = size == 2 ? FSEditLogOp.blockFromXml(blocks.get(0)) : null; this.lastBlock = FSEditLogOp.blockFromXml(blocks.get(size - 1)); readRpcIdsFromXml(st); } }
@Override void fromXml(Stanza st) throws InvalidXmlException { this.path = st.getValue("PATH"); List<Stanza> blocks = st.getChildren("BLOCK"); int size = blocks.size(); Preconditions.checkState(size == 1 || size == 2); this.penultimateBlock = size == 2 ? FSEditLogOp.blockFromXml(blocks.get(0)) : null; this.lastBlock = FSEditLogOp.blockFromXml(blocks.get(size - 1)); readRpcIdsFromXml(st); } }
@Override void fromXml(Stanza st) throws InvalidXmlException { this.path = st.getValue("PATH"); List<Stanza> blocks = st.getChildren("BLOCK"); this.blocks = new Block[blocks.size()]; for (int i = 0; i < blocks.size(); i++) { this.blocks[i] = FSEditLogOp.blockFromXml(blocks.get(i)); } readRpcIdsFromXml(st); } }
@Override void fromXml(Stanza st) throws InvalidXmlException { this.path = st.getValue("PATH"); List<Stanza> blocks = st.getChildren("BLOCK"); this.blocks = new Block[blocks.size()]; for (int i = 0; i < blocks.size(); i++) { this.blocks[i] = FSEditLogOp.blockFromXml(blocks.get(i)); } readRpcIdsFromXml(st); } }
@Override void fromXml(Stanza st) throws InvalidXmlException { this.src = st.getValue("SRC"); this.clientName = st.getValue("CLIENTNAME"); this.clientMachine = st.getValue("CLIENTMACHINE"); this.newLength = Long.parseLong(st.getValue("NEWLENGTH")); this.timestamp = Long.parseLong(st.getValue("TIMESTAMP")); if (st.hasChildren("BLOCK")) this.truncateBlock = FSEditLogOp.blockFromXml(st); }
@Override void fromXml(Stanza st) throws InvalidXmlException { this.src = st.getValue("SRC"); this.clientName = st.getValue("CLIENTNAME"); this.clientMachine = st.getValue("CLIENTMACHINE"); this.newLength = Long.parseLong(st.getValue("NEWLENGTH")); this.timestamp = Long.parseLong(st.getValue("TIMESTAMP")); if (st.hasChildren("BLOCK")) this.truncateBlock = FSEditLogOp.blockFromXml(st); }
@Override void fromXml(Stanza st) throws InvalidXmlException { this.length = Integer.parseInt(st.getValue("LENGTH")); this.inodeId = Long.parseLong(st.getValue("INODEID")); this.path = st.getValue("PATH"); this.replication = Short.valueOf(st.getValue("REPLICATION")); this.mtime = Long.parseLong(st.getValue("MTIME")); this.atime = Long.parseLong(st.getValue("ATIME")); this.blockSize = Long.parseLong(st.getValue("BLOCKSIZE")); this.clientName = st.getValue("CLIENT_NAME"); this.clientMachine = st.getValue("CLIENT_MACHINE"); this.overwrite = Boolean.parseBoolean(st.getValueOrNull("OVERWRITE")); if (st.hasChildren("BLOCK")) { List<Stanza> blocks = st.getChildren("BLOCK"); this.blocks = new Block[blocks.size()]; for (int i = 0; i < blocks.size(); i++) { this.blocks[i] = FSEditLogOp.blockFromXml(blocks.get(i)); } } else { this.blocks = new Block[0]; } this.permissions = permissionStatusFromXml(st); aclEntries = readAclEntriesFromXml(st); readRpcIdsFromXml(st); } }
@Override void fromXml(Stanza st) throws InvalidXmlException { this.length = Integer.parseInt(st.getValue("LENGTH")); this.inodeId = Long.parseLong(st.getValue("INODEID")); this.path = st.getValue("PATH"); this.replication = Short.valueOf(st.getValue("REPLICATION")); this.mtime = Long.parseLong(st.getValue("MTIME")); this.atime = Long.parseLong(st.getValue("ATIME")); this.blockSize = Long.parseLong(st.getValue("BLOCKSIZE")); this.clientName = st.getValue("CLIENT_NAME"); this.clientMachine = st.getValue("CLIENT_MACHINE"); this.overwrite = Boolean.parseBoolean(st.getValueOrNull("OVERWRITE")); if (st.hasChildren("BLOCK")) { List<Stanza> blocks = st.getChildren("BLOCK"); this.blocks = new Block[blocks.size()]; for (int i = 0; i < blocks.size(); i++) { this.blocks[i] = FSEditLogOp.blockFromXml(blocks.get(i)); } } else { this.blocks = new Block[0]; } this.permissions = permissionStatusFromXml(st); aclEntries = readAclEntriesFromXml(st); readRpcIdsFromXml(st); } }