@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.v2.Column)) { return super.equals(obj); } com.google.bigtable.v2.Column other = (com.google.bigtable.v2.Column) obj; boolean result = true; result = result && getQualifier().equals(other.getQualifier()); result = result && getCellsList().equals(other.getCellsList()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + QUALIFIER_FIELD_NUMBER; hash = (53 * hash) + getQualifier().hashCode(); if (getCellsCount() > 0) { hash = (37 * hash) + CELLS_FIELD_NUMBER; hash = (53 * hash) + getCellsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * The unique key which identifies this column within its family. This is the * same key that's used to identify the column in, for example, a RowFilter * which sets its `column_qualifier_regex_filter` field. * May contain any byte string, including the empty string, up to 16kiB in * length. * </pre> * * <code>bytes qualifier = 1;</code> */ public Builder clearQualifier() { qualifier_ = getDefaultInstance().getQualifier(); onChanged(); return this; }
for (final Column column : family.getColumnsList()) { result.put(column.getQualifier().toString(UTF8_CHARSET), new ByteArrayByteIterator(column.getCells(0).getValue().toByteArray())); if (debug) { System.out.println( "Result for field: " + column.getQualifier().toString(UTF8_CHARSET) + " is: " + column.getCells(0).getValue().toString(UTF8_CHARSET));
@java.lang.Override public com.google.bigtable.v2.Column getDefaultInstanceForType() { return com.google.bigtable.v2.Column.getDefaultInstance(); }
@java.lang.Override public com.google.bigtable.v2.Column buildPartial() { com.google.bigtable.v2.Column result = new com.google.bigtable.v2.Column(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.qualifier_ = qualifier_; if (cellsBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002)) { cells_ = java.util.Collections.unmodifiableList(cells_); bitField0_ = (bitField0_ & ~0x00000002); } result.cells_ = cells_; } else { result.cells_ = cellsBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; }
/** Helper function to get a table's data. */ private List<KV<ByteString, ByteString>> getTableData(String tableName) throws IOException { // Add empty range to avoid TARGET_NOT_SET error RowRange range = RowRange.newBuilder() .setStartKeyClosed(ByteString.EMPTY) .setEndKeyOpen(ByteString.EMPTY) .build(); RowSet rowSet = RowSet.newBuilder().addRowRanges(range).build(); ReadRowsRequest.Builder readRowsRequestBuilder = ReadRowsRequest.newBuilder().setTableName(tableName).setRows(rowSet); ResultScanner<Row> scanner = session.getDataClient().readRows(readRowsRequestBuilder.build()); Row currentRow; List<KV<ByteString, ByteString>> tableData = new ArrayList<>(); while ((currentRow = scanner.next()) != null) { ByteString key = currentRow.getKey(); ByteString value = currentRow.getFamilies(0).getColumns(0).getCells(0).getValue(); tableData.add(KV.of(key, value)); } scanner.close(); return tableData; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + QUALIFIER_FIELD_NUMBER; hash = (53 * hash) + getQualifier().hashCode(); if (getCellsCount() > 0) { hash = (37 * hash) + CELLS_FIELD_NUMBER; hash = (53 * hash) + getCellsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(com.google.bigtable.v2.Column other) { if (other == com.google.bigtable.v2.Column.getDefaultInstance()) return this; if (other.getQualifier() != com.google.protobuf.ByteString.EMPTY) { setQualifier(other.getQualifier());
for (final Column column : family.getColumnsList()) { rowResult.put(column.getQualifier().toString(UTF8_CHARSET), new ByteArrayByteIterator(column.getCells(0).getValue().toByteArray())); if (debug) { System.out.println( "Result for field: " + column.getQualifier().toString(UTF8_CHARSET) + " is: " + column.getCells(0).getValue().toString(UTF8_CHARSET));
/** * * * <pre> * Must not be empty. Sorted in order of increasing "qualifier". * </pre> * * <code>repeated .google.bigtable.v2.Column columns = 2;</code> */ public com.google.bigtable.v2.Column.Builder addColumnsBuilder() { return getColumnsFieldBuilder() .addBuilder(com.google.bigtable.v2.Column.getDefaultInstance()); } /**
public com.google.bigtable.v2.Column buildPartial() { com.google.bigtable.v2.Column result = new com.google.bigtable.v2.Column(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.qualifier_ = qualifier_; if (cellsBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002)) { cells_ = java.util.Collections.unmodifiableList(cells_); bitField0_ = (bitField0_ & ~0x00000002); } result.cells_ = cells_; } else { result.cells_ = cellsBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; }
private Row convertResponse(ReadModifyWriteRowResponse response) { ImmutableList.Builder<RowCell> cells = ImmutableList.builder(); for (Family family : response.getRow().getFamiliesList()) { for (Column column : family.getColumnsList()) { for (Cell cell : column.getCellsList()) { cells.add( RowCell.create( family.getName(), column.getQualifier(), cell.getTimestampMicros(), cell.getLabelsList(), cell.getValue())); } } } return Row.create(response.getRow().getKey(), cells.build()); } }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + QUALIFIER_FIELD_NUMBER; hash = (53 * hash) + getQualifier().hashCode(); if (getCellsCount() > 0) { hash = (37 * hash) + CELLS_FIELD_NUMBER; hash = (53 * hash) + getCellsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * <pre> * The unique key which identifies this column within its family. This is the * same key that's used to identify the column in, for example, a RowFilter * which sets its `column_qualifier_regex_filter` field. * May contain any byte string, including the empty string, up to 16kiB in * length. * </pre> * * <code>bytes qualifier = 1;</code> */ public Builder clearQualifier() { qualifier_ = getDefaultInstance().getQualifier(); onChanged(); return this; }
public static Builder newBuilder(com.google.bigtable.v2.Column prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
/** * * * <pre> * Must not be empty. Sorted in order of increasing "qualifier". * </pre> * * <code>repeated .google.bigtable.v2.Column columns = 2;</code> */ public com.google.bigtable.v2.Column.Builder addColumnsBuilder(int index) { return getColumnsFieldBuilder() .addBuilder(index, com.google.bigtable.v2.Column.getDefaultInstance()); } /**