private void printTxn(byte[] bytes, String prefix) throws IOException { TxnHeader hdr = new TxnHeader(); Record txn = SerializeUtils.deserializeTxn(bytes, hdr); String txnStr = getDataStrFromTxn(txn); String txns = String.format("%s session 0x%s cxid 0x%s zxid 0x%s %s %s", DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.LONG).format(new Date(hdr.getTime())), Long.toHexString(hdr.getClientId()), Long.toHexString(hdr.getCxid()), Long.toHexString(hdr.getZxid()), TraceFormatter.op2String(hdr.getType()), txnStr); if (prefix != null && !"".equals(prefix.trim())) { System.out.print(prefix + " - "); } if (txns.endsWith("\n")) { System.out.print(txns); } else { System.out.println(txns); } }
private void printTxn(byte[] bytes, String prefix) throws IOException { TxnHeader hdr = new TxnHeader(); Record txn = SerializeUtils.deserializeTxn(bytes, hdr); String txns = String.format("%s session 0x%s cxid 0x%s zxid 0x%s %s %s", DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.LONG).format(new Date(hdr.getTime())), Long.toHexString(hdr.getClientId()), Long.toHexString(hdr.getCxid()), Long.toHexString(hdr.getZxid()), TraceFormatter.op2String(hdr.getType()), txn); if (prefix != null && !"".equals(prefix.trim())) { System.out.print(prefix + " - "); } if (txns.endsWith("\n")) { System.out.print(txns); } else { System.out.println(txns); } }
TxnHeader hdr = new TxnHeader(); try { SerializeUtils.deserializeTxn(p.getData(), hdr);
Record txn = SerializeUtils.deserializeTxn(bytes, hdr); System.out.println(DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.LONG).format(new Date(hdr.getTime()))
throw new IOException(CRC_ERROR); hdr = new TxnHeader(); record = SerializeUtils.deserializeTxn(bytes, hdr); } catch (EOFException e) { LOG.debug("EOF exception " + e);
Record txn = SerializeUtils.deserializeTxn(bytes, hdr); if (logStream.readByte("EOR") != 'B') { System.out.println("Last transaction was partial.");
TxnHeader hdr = new TxnHeader(); try { SerializeUtils.deserializeTxn(p.getData(), hdr);
Record txn = SerializeUtils.deserializeTxn(bytes, hdr); System.out.println(DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.LONG).format(new Date(hdr.getTime()))
case Leader.INFORM: TxnHeader hdr = new TxnHeader(); Record txn = SerializeUtils.deserializeTxn(qp.getData(), hdr); Request request = new Request (hdr.getClientId(), hdr.getCxid(), hdr.getType(), hdr, txn, 0); ObserverZooKeeperServer obs = (ObserverZooKeeperServer)zk; txn = SerializeUtils.deserializeTxn(remainingdata, hdr); QuorumVerifier qv = self.configFromString(new String(((SetDataTxn)txn).getData()));
throw new IOException(CRC_ERROR); hdr = new TxnHeader(); record = SerializeUtils.deserializeTxn(bytes, hdr); } catch (EOFException e) { LOG.debug("EOF excepton " + e);
case Leader.INFORM: TxnHeader hdr = new TxnHeader(); Record txn = SerializeUtils.deserializeTxn(qp.getData(), hdr); Request request = new Request (null, hdr.getClientId(), hdr.getCxid(),
case Leader.PROPOSAL: TxnHeader hdr = new TxnHeader(); Record txn = SerializeUtils.deserializeTxn(qp.getData(), hdr); if (hdr.getZxid() != lastQueued + 1) { LOG.warn("Got zxid 0x"
case Leader.PROPOSAL: TxnHeader hdr = new TxnHeader(); Record txn = SerializeUtils.deserializeTxn(qp.getData(), hdr); if (hdr.getZxid() != lastQueued + 1) { LOG.warn("Got zxid 0x"
PacketInFlight pif = new PacketInFlight(); pif.hdr = new TxnHeader(); pif.rec = SerializeUtils.deserializeTxn(qp.getData(), pif.hdr); if (pif.hdr.getZxid() != lastQueued + 1) { LOG.warn("Got zxid 0x" byte[] remainingdata = new byte[buffer.remaining()]; buffer.get(remainingdata); packet.rec = SerializeUtils.deserializeTxn(remainingdata, packet.hdr); QuorumVerifier qv = self.configFromString(new String(((SetDataTxn)packet.rec).getData())); boolean majorChange = packet.rec = SerializeUtils.deserializeTxn(qp.getData(), packet.hdr);
Record txn = SerializeUtils.deserializeTxn(bytes, hdr); if (logStream.readByte("EOR") != 'B') { LOG.warn("Last transaction was partial.");
PacketInFlight pif = new PacketInFlight(); pif.hdr = new TxnHeader(); pif.rec = SerializeUtils.deserializeTxn(qp.getData(), pif.hdr); if (pif.hdr.getZxid() != lastQueued + 1) { LOG.warn("Got zxid 0x" packet.rec = SerializeUtils.deserializeTxn(qp.getData(), packet.hdr);
Proposal proposal = itr.next(); TxnHeader hdr = new TxnHeader(); Record rec = SerializeUtils.deserializeTxn( proposal.packet.getData(), hdr); if (hdr.getType() == OpCode.create) {
.getArchive(new ByteArrayInputStream(bytes)); hdr = new TxnHeader(); record = SerializeUtils.deserializeTxn(iab, hdr); } catch (EOFException e) { LOG.debug("EOF excepton " + e);
BinaryInputArchive ia = BinaryInputArchive .getArchive(new ByteArrayInputStream(qp.getData())); Record txn = SerializeUtils.deserializeTxn(ia, hdr); if (hdr.getZxid() != lastQueued + 1) { LOG.warn("Got zxid 0x"
BinaryInputArchive ia = BinaryInputArchive .getArchive(new ByteArrayInputStream(qp.getData())); Record txn = SerializeUtils.deserializeTxn(ia, hdr); Request request = new Request (null, hdr.getClientId(), hdr.getCxid(),