@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 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 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());
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()); } }
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));
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));
@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 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()); return result; }
@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; }
@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; }
/** * * * <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 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());
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());
@Override public BigtableRow apply(Row row) { ByteBuffer key = ByteBuffer.wrap(toByteArray(row.getKey())); List<BigtableCell> cells = new ArrayList<>(); for (Family family : row.getFamiliesList()) { String familyName = family.getName(); for (Column column : family.getColumnsList()) { ByteBuffer qualifier = ByteBuffer.wrap(toByteArray(column.getQualifier())); for (Cell cell : column.getCellsList()) { long timestamp = cell.getTimestampMicros(); ByteBuffer value = ByteBuffer.wrap(toByteArray(cell.getValue())); cells.add(new BigtableCell(familyName, qualifier, timestamp, value)); } } } return new BigtableRow(key, cells); } }
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()); } }
/** * This method converts instances of {@link ReadModifyWriteRowResponse} to {@link Row}. * * @param response an instance of {@link ReadModifyWriteRowResponse} type. * @return an instance of {@link Row}. */ private Row transformResponse(ReadModifyWriteRowResponse response) { ImmutableList.Builder<RowCell> rowCells = ImmutableList.builder(); for (Family family : response.getRow().getFamiliesList()) { for (Column column : family.getColumnsList()) { for (Cell cell : column.getCellsList()) { rowCells.add( RowCell.create( family.getName(), column.getQualifier(), cell.getTimestampMicros(), cell.getLabelsList(), cell.getValue())); } } } return Row.create(response.getRow().getKey(), rowCells.build()); } }
byte[] columnQualifier = ByteStringer.extract(column.getQualifier());
public static FlatRow convert(Row row) { FlatRow.Builder builder = FlatRow.newBuilder().withRowKey(row.getKey()); for (Family family : row.getFamiliesList()) { String familyName = family.getName(); for (Column column : family.getColumnsList()) { ByteString qualifier = column.getQualifier(); for (Cell cell : column.getCellsList()) { builder.addCell(familyName, qualifier, cell.getTimestampMicros(), cell.getValue(), cell.getLabelsList()); } } } return builder.build(); }