Environment details
Cannot delete rows using BigtableTable if the given List object is Immutable.
The workaround i've found is using plain ArrayList() as input but it seems wrong to me (how do we know we must provide mutable objects?)
- Specify the API at the beginning of the title. General, Core, and Other are also allowed as types
- OS type and version: Mac OS tahoe 26.2
- Java version: 8
- Version(s):
<dependency>
<groupId>com.google.cloud.bigtable</groupId>
<artifactId>bigtable-hbase-1.x-shaded</artifactId>
<version>2.13.0</version>
</dependency>
Steps to reproduce
when migrating bigtable-hbase-1.x-shaded from 1.11.0 to 2.13.0
- use a BigtableTable object and use the delete method with an ImmutableList
- the operation fails if the List object does not allow the remove() operation
Code example
// example
// deletes is ImmutableList or Collections.unmodifiableList
table.delete(deletes);
// this will fail all the time
table.delete(Collections.unmodifiableList(deletes));
Stack trace
Any relevant stacktrace here.
java.lang.UnsupportedOperationException
at com.google.common.collect.ImmutableList.remove(ImmutableList.java:569)
at com.google.cloud.bigtable.hbase.BatchExecutor.batchCallback(BatchExecutor.java:303)
at com.google.cloud.bigtable.hbase.BatchExecutor.batch(BatchExecutor.java:237)
at com.google.cloud.bigtable.hbase.AbstractBigtableTable.delete(AbstractBigtableTable.java:422)
External references such as API reference guides
Any additional information below
The issue is still present on the master branch.
Environment details
Cannot delete rows using BigtableTable if the given List object is Immutable.
The workaround i've found is using plain ArrayList() as input but it seems wrong to me (how do we know we must provide mutable objects?)
Steps to reproduce
when migrating bigtable-hbase-1.x-shaded from 1.11.0 to 2.13.0
Code example
Stack trace
External references such as API reference guides
Any additional information below
The issue is still present on the master branch.
java-bigtable-hbase/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/BatchExecutor.java
Line 303 in b658fde