File tree Expand file tree Collapse 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 Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 4343public final class Query implements Serializable {
4444 private static final long serialVersionUID = -316972783499434755L ;
4545
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 ;
4848
4949 private final String tableId ;
5050 private transient ReadRowsRequest .Builder builder = ReadRowsRequest .newBuilder ();
@@ -170,7 +170,7 @@ public Query filter(Filters.Filter filter) {
170170
171171 RowFilter rowFilter = filter .toProto ();
172172 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 " );
174174
175175 builder .setFilter (rowFilter );
176176 return this ;
Original file line number Diff line number Diff line change @@ -123,15 +123,15 @@ public void filterTestWithExceptions() {
123123 assertThat (actualException ).isInstanceOf (NullPointerException .class );
124124
125125 actualException = null ;
126- int maxFilterSize = 20 * 1024 * 1024 ;
126+ int maxFilterSize = 20 * 1024 ;
127127 ByteString largeValue = ByteString .copyFrom (new byte [maxFilterSize + 1 ]);
128128
129129 try {
130130 Query .create (TABLE_ID ).filter (FILTERS .value ().exactMatch (largeValue ));
131131 } catch (Exception ex ) {
132132 actualException = ex ;
133133 }
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 " );
135135 }
136136
137137 @ Test
You can’t perform that action at this time.
0 commit comments