.addEntries(Entry.getDefaultInstance()) .addEntries(Entry.getDefaultInstance()) .build();
@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.bigtable.v2.MutateRowsRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.bigtable.v2.MutateRowsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged(); onChanged(); bitField0_ = (bitField0_ & ~0x00000004); } else { ensureEntriesIsMutable(); entries_.addAll(other.entries_); onChanged(); entriesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEntriesFieldBuilder() : null; } else { this.mergeUnknownFields(other.unknownFields); onChanged(); return this;
if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged(); onChanged(); bitField0_ = (bitField0_ & ~0x00000004); } else { ensureEntriesIsMutable(); entries_.addAll(other.entries_); onChanged(); entriesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEntriesFieldBuilder() : null; } else { this.mergeUnknownFields(other.unknownFields); onChanged(); return this;
MutateRowsRequest lastRequest = currentRequest; Builder builder = lastRequest.toBuilder().clearEntries(); List<Integer> newOriginalIndexes = Lists.newArrayList(); builder.addEntries(lastRequest.getEntries((int) entry.getIndex())); currentRequest = builder.build(); originalIndexes = newOriginalIndexes; boolean isRetryable = builder.getEntriesCount() > 0; throw new MutateRowsException(null, allFailures, isRetryable);
if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged(); bitField0_ = (bitField0_ & ~0x00000002); } else { ensureEntriesIsMutable(); entries_.addAll(other.entries_); onChanged(); entriesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEntriesFieldBuilder() : null; } else { entriesBuilder_.addAllMessages(other.entries_); onChanged(); return this;
/** * Handle an RPC level failure by generating a {@link FailedMutation} for each expected entry. The * newly generated {@link FailedMutation}s will be combined with the permanentFailures to give the * caller the whole picture since the first call. This method will always throw a {@link * MutateRowsException}. */ private void handleAttemptError(Throwable rpcError) { ApiException entryError = createSyntheticErrorForRpcFailure(rpcError); ImmutableList.Builder<FailedMutation> allFailures = ImmutableList.builder(); MutateRowsRequest lastRequest = currentRequest; allFailures.addAll(permanentFailures); Builder builder = lastRequest.toBuilder().clearEntries(); List<Integer> newOriginalIndexes = Lists.newArrayList(); for (int i = 0; i < currentRequest.getEntriesCount(); i++) { int origIndex = getOriginalIndex(i); FailedMutation failedMutation = FailedMutation.create(origIndex, entryError); allFailures.add(failedMutation); if (!failedMutation.getError().isRetryable()) { permanentFailures.add(failedMutation); } else { // Schedule the mutation entry for the next RPC by adding it to the request builder and // recording its original index newOriginalIndexes.add(origIndex); builder.addEntries(lastRequest.getEntries(i)); } } currentRequest = builder.build(); originalIndexes = newOriginalIndexes; throw new MutateRowsException(rpcError, allFailures.build(), entryError.isRetryable()); }
/** * * * <pre> * The row keys and corresponding mutations to be applied in bulk. * Each entry is applied as an atomic mutation, but the entries may be * applied in arbitrary order (even between entries for the same row). * At least one entry must be specified, and in total the entries can * contain at most 100000 mutations. * </pre> * * <code>repeated .google.bigtable.v2.MutateRowsRequest.Entry entries = 2;</code> */ public Builder addEntries(int index, com.google.bigtable.v2.MutateRowsRequest.Entry value) { if (entriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEntriesIsMutable(); entries_.add(index, value); onChanged(); } else { entriesBuilder_.addMessage(index, value); } return this; } /**
/** * * * <pre> * The row keys and corresponding mutations to be applied in bulk. * Each entry is applied as an atomic mutation, but the entries may be * applied in arbitrary order (even between entries for the same row). * At least one entry must be specified, and in total the entries can * contain at most 100000 mutations. * </pre> * * <code>repeated .google.bigtable.v2.MutateRowsRequest.Entry entries = 2;</code> */ public Builder setEntries(int index, com.google.bigtable.v2.MutateRowsRequest.Entry value) { if (entriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEntriesIsMutable(); entries_.set(index, value); onChanged(); } else { entriesBuilder_.setMessage(index, value); } return this; } /**
/** * <pre> * The row keys and corresponding mutations to be applied in bulk. * Each entry is applied as an atomic mutation, but the entries may be * applied in arbitrary order (even between entries for the same row). * At least one entry must be specified, and in total the entries can * contain at most 100000 mutations. * </pre> * * <code>repeated .google.bigtable.v2.MutateRowsRequest.Entry entries = 2;</code> */ public Builder setEntries( int index, com.google.bigtable.v2.MutateRowsRequest.Entry value) { if (entriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEntriesIsMutable(); entries_.set(index, value); onChanged(); } else { entriesBuilder_.setMessage(index, value); } return this; } /**
/** * * * <pre> * The row keys and corresponding mutations to be applied in bulk. * Each entry is applied as an atomic mutation, but the entries may be * applied in arbitrary order (even between entries for the same row). * At least one entry must be specified, and in total the entries can * contain at most 100000 mutations. * </pre> * * <code>repeated .google.bigtable.v2.MutateRowsRequest.Entry entries = 2;</code> */ public Builder addAllEntries( java.lang.Iterable<? extends com.google.bigtable.v2.MutateRowsRequest.Entry> values) { if (entriesBuilder_ == null) { ensureEntriesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entries_); onChanged(); } else { entriesBuilder_.addAllMessages(values); } return this; } /**
/** * * * <pre> * The row keys and corresponding mutations to be applied in bulk. * Each entry is applied as an atomic mutation, but the entries may be * applied in arbitrary order (even between entries for the same row). * At least one entry must be specified, and in total the entries can * contain at most 100000 mutations. * </pre> * * <code>repeated .google.bigtable.v2.MutateRowsRequest.Entry entries = 2;</code> */ public Builder addEntries(com.google.bigtable.v2.MutateRowsRequest.Entry value) { if (entriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEntriesIsMutable(); entries_.add(value); onChanged(); } else { entriesBuilder_.addMessage(value); } return this; } /**
/** * * * <pre> * The row keys and corresponding mutations to be applied in bulk. * Each entry is applied as an atomic mutation, but the entries may be * applied in arbitrary order (even between entries for the same row). * At least one entry must be specified, and in total the entries can * contain at most 100000 mutations. * </pre> * * <code>repeated .google.bigtable.v2.MutateRowsRequest.Entry entries = 2;</code> */ public Builder addEntries( int index, com.google.bigtable.v2.MutateRowsRequest.Entry.Builder builderForValue) { if (entriesBuilder_ == null) { ensureEntriesIsMutable(); entries_.add(index, builderForValue.build()); onChanged(); } else { entriesBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * The row keys and corresponding mutations to be applied in bulk. * Each entry is applied as an atomic mutation, but the entries may be * applied in arbitrary order (even between entries for the same row). * At least one entry must be specified, and in total the entries can * contain at most 100000 mutations. * </pre> * * <code>repeated .google.bigtable.v2.MutateRowsRequest.Entry entries = 2;</code> */ public Builder addEntries( com.google.bigtable.v2.MutateRowsRequest.Entry.Builder builderForValue) { if (entriesBuilder_ == null) { ensureEntriesIsMutable(); entries_.add(builderForValue.build()); onChanged(); } else { entriesBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * <pre> * The row keys and corresponding mutations to be applied in bulk. * Each entry is applied as an atomic mutation, but the entries may be * applied in arbitrary order (even between entries for the same row). * At least one entry must be specified, and in total the entries can * contain at most 100000 mutations. * </pre> * * <code>repeated .google.bigtable.v2.MutateRowsRequest.Entry entries = 2;</code> */ public Builder addEntries( int index, com.google.bigtable.v2.MutateRowsRequest.Entry value) { if (entriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEntriesIsMutable(); entries_.add(index, value); onChanged(); } else { entriesBuilder_.addMessage(index, value); } return this; } /**
/** * <pre> * The row keys and corresponding mutations to be applied in bulk. * Each entry is applied as an atomic mutation, but the entries may be * applied in arbitrary order (even between entries for the same row). * At least one entry must be specified, and in total the entries can * contain at most 100000 mutations. * </pre> * * <code>repeated .google.bigtable.v2.MutateRowsRequest.Entry entries = 2;</code> */ public Builder addEntries(com.google.bigtable.v2.MutateRowsRequest.Entry value) { if (entriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEntriesIsMutable(); entries_.add(value); onChanged(); } else { entriesBuilder_.addMessage(value); } return this; } /**
/** * * * <pre> * The row keys and corresponding mutations to be applied in bulk. * Each entry is applied as an atomic mutation, but the entries may be * applied in arbitrary order (even between entries for the same row). * At least one entry must be specified, and in total the entries can * contain at most 100000 mutations. * </pre> * * <code>repeated .google.bigtable.v2.MutateRowsRequest.Entry entries = 2;</code> */ public Builder setEntries( int index, com.google.bigtable.v2.MutateRowsRequest.Entry.Builder builderForValue) { if (entriesBuilder_ == null) { ensureEntriesIsMutable(); entries_.set(index, builderForValue.build()); onChanged(); } else { entriesBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * The row keys and corresponding mutations to be applied in bulk. * Each entry is applied as an atomic mutation, but the entries may be * applied in arbitrary order (even between entries for the same row). * At least one entry must be specified, and in total the entries can * contain at most 100000 mutations. * </pre> * * <code>repeated .google.bigtable.v2.MutateRowsRequest.Entry entries = 2;</code> */ public Builder removeEntries(int index) { if (entriesBuilder_ == null) { ensureEntriesIsMutable(); entries_.remove(index); onChanged(); } else { entriesBuilder_.remove(index); } return this; } /**
/** * <pre> * The row keys and corresponding mutations to be applied in bulk. * Each entry is applied as an atomic mutation, but the entries may be * applied in arbitrary order (even between entries for the same row). * At least one entry must be specified, and in total the entries can * contain at most 100000 mutations. * </pre> * * <code>repeated .google.bigtable.v2.MutateRowsRequest.Entry entries = 2;</code> */ public Builder setEntries( int index, com.google.bigtable.v2.MutateRowsRequest.Entry.Builder builderForValue) { if (entriesBuilder_ == null) { ensureEntriesIsMutable(); entries_.set(index, builderForValue.build()); onChanged(); } else { entriesBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * <pre> * The row keys and corresponding mutations to be applied in bulk. * Each entry is applied as an atomic mutation, but the entries may be * applied in arbitrary order (even between entries for the same row). * At least one entry must be specified, and in total the entries can * contain at most 100000 mutations. * </pre> * * <code>repeated .google.bigtable.v2.MutateRowsRequest.Entry entries = 2;</code> */ public Builder addAllEntries( java.lang.Iterable<? extends com.google.bigtable.v2.MutateRowsRequest.Entry> values) { if (entriesBuilder_ == null) { ensureEntriesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, entries_); onChanged(); } else { entriesBuilder_.addAllMessages(values); } return this; } /**