@Override public byte[] encodeTransaction() throws SQLException { Transaction tx = getCurrentTransaction(); assert (tx != null); try { byte[] encodedTxBytes = CODEC.encode(tx); encodedTxBytes = Arrays.copyOf(encodedTxBytes, encodedTxBytes.length + 1); encodedTxBytes[encodedTxBytes.length - 1] = getProvider().getCode(); return encodedTxBytes; } catch (IOException e) { throw new SQLException(e); } }
private byte[] getEncodedTx() throws IOException { if (encodedTx == null) { encodedTx = txCodec.encode(tx); } return encodedTx; }
private byte[] getEncodedTx() throws IOException { if (encodedTx == null) { encodedTx = txCodec.encode(tx); } return encodedTx; }
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }
public void addToOperation(OperationWithAttributes op, Transaction tx) throws IOException { op.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); }
@Override public byte[] encodeTransaction() throws SQLException { Transaction tx = getCurrentTransaction(); assert (tx != null); try { byte[] encodedTxBytes = CODEC.encode(tx); encodedTxBytes = Arrays.copyOf(encodedTxBytes, encodedTxBytes.length + 1); encodedTxBytes[encodedTxBytes.length - 1] = getProvider().getCode(); return encodedTxBytes; } catch (IOException e) { throw new SQLException(e); } }
@Override public byte[] encodeTransaction() throws SQLException { Transaction tx = getCurrentTransaction(); assert (tx != null); try { byte[] encodedTxBytes = CODEC.encode(tx); encodedTxBytes = Arrays.copyOf(encodedTxBytes, encodedTxBytes.length + 1); encodedTxBytes[encodedTxBytes.length - 1] = getProvider().getCode(); return encodedTxBytes; } catch (IOException e) { throw new SQLException(e); } }
scan.setCacheBlocks(false); scan.setAttribute(TxConstants.TX_OPERATION_ATTRIBUTE_KEY, new TransactionCodec().encode(tx)); job.setNumReduceTasks(0);
responder.sendByteArray(HttpResponseStatus.OK, TX_CODEC.encode(transaction), EmptyHttpHeaders.INSTANCE); } catch (IOException e) {
responder.sendByteArray(HttpResponseStatus.OK, TX_CODEC.encode(transaction), EmptyHttpHeaders.INSTANCE); } catch (IOException e) {
responder.sendByteArray(HttpResponseStatus.OK, TX_CODEC.encode(transaction), EmptyHttpHeaders.INSTANCE); } catch (IOException e) {
scan.addFamily(QueueEntryRow.COLUMN_FAMILY); Transaction tx = TxUtils.createDummyTransaction(txSnapshot); setScanAttribute(scan, TxConstants.TX_OPERATION_ATTRIBUTE_KEY, txCodec.encode(tx)); ResultScanner scanner = table.getScanner(scan); int configCnt = 0;
record.put("transaction", ByteBuffer.wrap(TRANSACTION_CODEC.encode(getTransaction())));
record.put("transaction", ByteBuffer.wrap(TRANSACTION_CODEC.encode(getTransaction())));
FileSystem fs = txFile.getFileSystem(configuration); try (FSDataOutputStream fsDataOutputStream = fs.create(txFile, false)) { fsDataOutputStream.write(new TransactionCodec().encode(transaction));
FileSystem fs = txFile.getFileSystem(configuration); try (FSDataOutputStream fsDataOutputStream = fs.create(txFile, false)) { fsDataOutputStream.write(new TransactionCodec().encode(transaction));