@Override Table toPb() { Table tablePb = super.toPb(); tablePb.setNumBytes(getNumBytes()); tablePb.setLocation(getLocation()); return tablePb; }
@Override Table toPb() { Table tablePb = super.toPb(); if (getNumRows() != null) { tablePb.setNumRows(BigInteger.valueOf(getNumRows())); } tablePb.setNumBytes(getNumBytes()); tablePb.setLocation(getLocation()); if (getStreamingBuffer() != null) { tablePb.setStreamingBuffer(getStreamingBuffer().toPb()); } if (getTimePartitioning() != null) { tablePb.setTimePartitioning(getTimePartitioning().toPb()); } if (getClustering() != null) { tablePb.setClustering(getClustering().toPb()); } return tablePb; }
long addRow(TableRow row, String id) { rows.add(row); ids.add(id); long rowSize = row.toString().length(); Long tableSize = table.getNumBytes(); if (tableSize == null) { table.setNumBytes(rowSize); } else { table.setNumBytes(tableSize + rowSize); } return rowSize; }
@Override Table toPb() { Table tablePb = super.toPb(); if (numRows != null) { tablePb.setNumRows(BigInteger.valueOf(numRows)); } tablePb.setNumBytes(numBytes); tablePb.setLocation(location); if (streamingBuffer != null) { tablePb.setStreamingBuffer(streamingBuffer.toPb()); } return tablePb; }
@Override Table toPb() { Table tablePb = super.toPb(); tablePb.setNumBytes(getNumBytes()); tablePb.setLocation(getLocation()); return tablePb; }
@Override Table toPb() { Table tablePb = super.toPb(); if (numRows != null) { tablePb.setNumRows(BigInteger.valueOf(numRows)); } tablePb.setNumBytes(numBytes); tablePb.setLocation(location); if (streamingBuffer != null) { tablePb.setStreamingBuffer(streamingBuffer.toPb()); } if (timePartitioning != null) { tablePb.setTimePartitioning(timePartitioning.toPb()); } return tablePb; }
@Override Table toPb() { Table tablePb = super.toPb(); if (getNumRows() != null) { tablePb.setNumRows(BigInteger.valueOf(getNumRows())); } tablePb.setNumBytes(getNumBytes()); tablePb.setLocation(getLocation()); if (getStreamingBuffer() != null) { tablePb.setStreamingBuffer(getStreamingBuffer().toPb()); } if (getTimePartitioning() != null) { tablePb.setTimePartitioning(getTimePartitioning().toPb()); } if (getClustering() != null) { tablePb.setClustering(getClustering().toPb()); } return tablePb; }
.setDatasetId("somedataset") .setTableId("sometable")); sometable.setNumBytes(1024L * 1024L); FakeDatasetService fakeDatasetService = new FakeDatasetService(); fakeDatasetService.createDataset("non-executing-project", "somedataset", "", "", null);