Skip to content

Commit

Permalink
Merge branch 'master' into min-delay-after-download
Browse files Browse the repository at this point in the history
  • Loading branch information
aecio authored Sep 4, 2019
2 parents 76f9912 + 8f6acbb commit ede43cb
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: java

jdk:
- oraclejdk8
- openjdk8

env:
- TERM=dumb
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@
- Upgrade gradle-node-plugin to version 1.3.1
- Upgrade npm version to 6.10.2
- Upgrade ache-dashboard npm dependencies
- Upgrade gradle wrapper to version 5.6.1
- Update Dockerfile to use openjdk:11-jdk (Java 11)
- Minimum delay between request now considers the time when the dowload is
actually finihsed, not the time when the URL was initially scheduled to be
downloaded (which disregards other processing times between scheduling and actual download)
- Refactoring of FethcedResultHandler to simply notify the LinkStorage that
the download finished and to delegate data processing to other handlers
for the appropriate link type


## Version 0.11.0

- Removed dependency on Weka and reimplemented all machine-learning code using SMILE.
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
#
# https://github.com/ViDA-NYU/ache
#
FROM openjdk:8-jdk
FROM openjdk:11-jdk

ADD . /ache-src
WORKDIR /ache-src
RUN /ache-src/gradlew installDist && mv /ache-src/build/install/ache /ache && rm -rf /ache-src/ /root/.gradle

# Makes JVM aware of memory limit available to the container (cgroups)
ENV JAVA_OPTS='-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap'
ENV JAVA_OPTS='-XX:+UseContainerSupport -XX:MaxRAMPercentage=80'

ENTRYPOINT ["/ache/bin/ache"]

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Tue Jan 08 17:48:37 EST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.1-bin.zip
6 changes: 3 additions & 3 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
warn () {
echo "$*"
}

die ( ) {
die () {
echo
echo "$*"
echo
Expand Down Expand Up @@ -155,7 +155,7 @@ if $cygwin ; then
fi

# Escape application args
save ( ) {
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
Expand Down
12 changes: 4 additions & 8 deletions src/main/java/focusedCrawler/link/backlink/MozAuthenticator.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import java.net.URLEncoder;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.Base64;
import java.util.Date;

import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import javax.xml.bind.DatatypeConverter;

public class MozAuthenticator {

Expand All @@ -29,10 +29,6 @@ public class MozAuthenticator {
*/
private long expiresInterval = 300;

public MozAuthenticator() {

}

/**
* Constructor to set all the variables
*
Expand Down Expand Up @@ -83,7 +79,7 @@ public String getAuthenticationStr() {

// base64-encode the hmac
@SuppressWarnings("deprecation")
String urlSafeSignature = URLEncoder.encode(EncodeBase64(rawHmac));
String urlSafeSignature = URLEncoder.encode(encodeBase64(rawHmac));

String authenticationStr = "AccessID=" + accessID + "&Expires=" + expires + "&Signature="
+ urlSafeSignature;
Expand All @@ -97,8 +93,8 @@ public String getAuthenticationStr() {
* @param rawData
* @return
*/
public String EncodeBase64(byte[] rawData) {
return DatatypeConverter.printBase64Binary(rawData);
private String encodeBase64(byte[] rawData) {
return Base64.getEncoder().encodeToString(rawData);
}

/**
Expand Down

0 comments on commit ede43cb

Please sign in to comment.