diff options
author | Harald Musum <musum@verizonmedia.com> | 2019-04-25 10:49:00 +0200 |
---|---|---|
committer | Harald Musum <musum@verizonmedia.com> | 2019-04-25 10:49:00 +0200 |
commit | 7cc7ddf6388a658493b6a73230aaf2f20b106f20 (patch) | |
tree | ab90f252248526c879d7daf47848f767540991c7 | |
parent | 55f1cf267369fa1c88631bf994a02fc0b77a0660 (diff) |
Avoid using JNI instance of XXHashFactory (fails due to bundled libraries not working)
-rw-r--r-- | config-proxy/src/main/java/com/yahoo/vespa/config/proxy/UrlDownloadRpcServer.java | 2 | ||||
-rw-r--r-- | configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileDBRegistry.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/UrlDownloadRpcServer.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/UrlDownloadRpcServer.java index 3c24cb58cff..8c25593dde0 100644 --- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/UrlDownloadRpcServer.java +++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/UrlDownloadRpcServer.java @@ -114,7 +114,7 @@ public class UrlDownloadRpcServer { } private static String urlToDirName(String uri) { - return String.valueOf(XXHashFactory.nativeInstance().hash64().hash(ByteBuffer.wrap(Utf8.toBytes(uri)), 0)); + return String.valueOf(XXHashFactory.fastestJavaInstance().hash64().hash(ByteBuffer.wrap(Utf8.toBytes(uri)), 0)); } private static void setIfModifiedSince(HttpURLConnection connection, File downloadDir) throws IOException { diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileDBRegistry.java b/configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileDBRegistry.java index fc3f55cc6aa..a10b8d9c6fb 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileDBRegistry.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileDBRegistry.java @@ -61,7 +61,7 @@ public class FileDBRegistry implements FileRegistry { } private static String uriToRelativeFile(String uri) { - String relative = "uri/" + String.valueOf(XXHashFactory.nativeInstance().hash64().hash(ByteBuffer.wrap(Utf8.toBytes(uri)), 0)); + String relative = "uri/" + XXHashFactory.fastestJavaInstance().hash64().hash(ByteBuffer.wrap(Utf8.toBytes(uri)), 0); if (uri.endsWith(".json")) { relative += ".json"; } else if (uri.endsWith(".json.lz4")) { |