Skip to content

Commit 16825f0

Browse files
committed
Use apache commons for B64 decoding continuation token (only), and added
ability to make the limit on the entropy data call configurable, for internal testing. Defaults to 100, as before.
1 parent b1ba4b9 commit 16825f0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

java_src/com/basho/yokozuna/handler/EntropyData.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static boolean isLive(final Bits liveDocs, final TermsEnum te) throws IOExceptio
184184
}
185185

186186
static BytesRef decodeCont(final String cont) {
187-
final byte[] bytes = DatatypeConverter.parseBase64Binary(cont);
187+
final byte[] bytes = org.apache.commons.codec.binary.Base64.decodeBase64(cont);
188188
return new BytesRef(bytes);
189189
}
190190

src/yz_entropy.erl

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ iterate_entropy_data(Index, Filter, Fun) ->
3434
case yz_solr:ping(Index) of
3535
true ->
3636
Filter2 = [{continuation, none},
37-
{limit, 100}|Filter],
37+
{limit, app_helper:get_env(?YZ_APP_NAME, entropy_data_limit, 100)}|Filter],
3838
ED = yz_solr:entropy_data(Index, Filter2),
3939
iterate_entropy_data(Index, Filter2, Fun, ED);
4040
_ ->

0 commit comments

Comments
 (0)