File tree 2 files changed +5
-5
lines changed
google-cloud-bigtable/src
main/java/com/google/cloud/bigtable/data/v2/models
test/java/com/google/cloud/bigtable/data/v2/models
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 43
43
public final class Query implements Serializable {
44
44
private static final long serialVersionUID = -316972783499434755L ;
45
45
46
- // bigtable can server the largest filter size of 20MB .
47
- private static final int MAX_FILTER_SIZE = 20 * 1024 * 1024 ;
46
+ // bigtable can server the largest filter size of 20KB .
47
+ private static final int MAX_FILTER_SIZE = 20 * 1024 ;
48
48
49
49
private final String tableId ;
50
50
private transient ReadRowsRequest .Builder builder = ReadRowsRequest .newBuilder ();
@@ -170,7 +170,7 @@ public Query filter(Filters.Filter filter) {
170
170
171
171
RowFilter rowFilter = filter .toProto ();
172
172
Preconditions .checkArgument (
173
- rowFilter .getSerializedSize () < MAX_FILTER_SIZE , "filter size can't be more than 20MB " );
173
+ rowFilter .getSerializedSize () < MAX_FILTER_SIZE , "filter size can't be more than 20KB " );
174
174
175
175
builder .setFilter (rowFilter );
176
176
return this ;
Original file line number Diff line number Diff line change @@ -123,15 +123,15 @@ public void filterTestWithExceptions() {
123
123
assertThat (actualException ).isInstanceOf (NullPointerException .class );
124
124
125
125
actualException = null ;
126
- int maxFilterSize = 20 * 1024 * 1024 ;
126
+ int maxFilterSize = 20 * 1024 ;
127
127
ByteString largeValue = ByteString .copyFrom (new byte [maxFilterSize + 1 ]);
128
128
129
129
try {
130
130
Query .create (TABLE_ID ).filter (FILTERS .value ().exactMatch (largeValue ));
131
131
} catch (Exception ex ) {
132
132
actualException = ex ;
133
133
}
134
- assertThat (actualException ).hasMessageThat ().contains ("filter size can't be more than 20MB " );
134
+ assertThat (actualException ).hasMessageThat ().contains ("filter size can't be more than 20KB " );
135
135
}
136
136
137
137
@ Test
You can’t perform that action at this time.
0 commit comments