Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Commit

Permalink
Maintenance (#180)
Browse files Browse the repository at this point in the history
* remove sudo param from travisci config; closes #179

* upgrade gradle wrapper and netflixoss plugin

* change info log statements to debug
add experimental api for evaluating assignable VMs
fix javadoc for disabling VMs; closes 178
  • Loading branch information
corindwyer authored Apr 30, 2019
1 parent 5f49f98 commit 3c1d8fc
Show file tree
Hide file tree
Showing 11 changed files with 423 additions and 399 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: java
jdk:
- oraclejdk8
sudo: false
install: ./installViaTravis.sh
script: ./buildViaTravis.sh
env:
Expand Down
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ buildscript {
}
}
dependencies {
classpath 'com.netflix.nebula:gradle-netflixoss-project-plugin:3.5.2'
classpath 'com.netflix.nebula:gradle-netflixoss-project-plugin:5.0.0'
}
}

Expand Down Expand Up @@ -58,4 +58,8 @@ subprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}

test {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ void purgeInactiveVMs(Set<String> excludeVms) {
vmCollection.remove(avm);
if (avm.getCurrVMId() != null)
vmIdToHostnameMap.remove(avm.getCurrVMId(), avm.getHostname());
logger.info("Removed inactive host " + avm.getHostname());
logger.debug("Removed inactive host " + avm.getHostname());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ private void assignResourceSets(TaskRequest request) {
}

void expireLease(String leaseId) {
logger.info("Got request to expire lease on " + hostname);
logger.debug("Got request to expire lease on " + hostname);
leasesToExpire.offer(leaseId);
}

Expand Down
465 changes: 253 additions & 212 deletions fenzo-core/src/main/java/com/netflix/fenzo/TaskScheduler.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,7 @@ private TaskSchedulingService(Builder builder) {
* new leases.
*/
public void start() {
executorService.scheduleWithFixedDelay(new Runnable() {
@Override
public void run() {
TaskSchedulingService.this.scheduleOnce();
}
}, 0, loopIntervalMillis, TimeUnit.MILLISECONDS);
executorService.scheduleWithFixedDelay(TaskSchedulingService.this::scheduleOnce, 0, loopIntervalMillis, TimeUnit.MILLISECONDS);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ public void setTotalResources(Map<VMResource, Double> totalResourcesMap) {
for (QueueBucket b : sortedBuckets.getSortedList()) {
b.setTotalResources(tierResources);
}
logger.info("Re-sorting buckets in tier " + tierNumber + " after totals changed");
logger.debug("Re-sorting buckets in tier " + tierNumber + " after totals changed");
sortedBuckets.resort();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,7 @@ private TaskScheduler getScheduler(VMTaskFitnessCalculator fitnessCalculator) {
return new TaskScheduler.Builder()
.withFitnessCalculator(fitnessCalculator)
.withLeaseOfferExpirySecs(1000000)
.withLeaseRejectAction(new Action1<VirtualMachineLease>() {
@Override
public void call(VirtualMachineLease virtualMachineLease) {
logger.info("Rejecting lease on " + virtualMachineLease.hostname());
}
})
.withLeaseRejectAction(virtualMachineLease -> logger.info("Rejecting lease on " + virtualMachineLease.hostname()))
.build();
}

Expand Down
326 changes: 158 additions & 168 deletions fenzo-core/src/test/java/com/netflix/fenzo/TaskSchedulingServiceTest.java

Large diffs are not rendered by default.

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Mar 12 15:36:03 PDT 2015
#Thu May 17 12:49:38 PDT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

0 comments on commit 3c1d8fc

Please sign in to comment.