# 平滑加权负载均衡算法

16 篇文章 0 订阅
9 篇文章 0 订阅
7 篇文章 0 订阅

#### 算法描述

1、找出当前权重值最大的服务器 maxServer
2、计算 {W0, W1, W2, …, Wn} 之和 sumBlance
3、将 maxServer.CW = maxServer.CW - sumBlance;
4、重新计算 {S0, S1, S2, …, Sn} 的当前权重 CW，计算公式为 Sn.CW = Sn.CW + Sn.Wn
5、返回 maxServer

### 状态描述：

 配置前权重 选择序号 配置后权重 原始权重 1 5,2,2 0 -4,2,2 5,2,2 2 1,4,4 1 1,-5,4 5,2,2 3 6,-3,6 0 -3,-3,6 5,2,2 4 2,-1,8 2 2,-1,-1 5,2,2 5 7,1,1 0 -2,1,1 5,2,2

### 程序实现：

package com.jike.alg.bigData;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
* @program: jike_study
* @description:加权平滑负载均衡
* @author: dyingstraw
* @create: 2019-07-05 10:01
**/
public class AvgLoadBalance {

/**
* 当前权重
*/
private int currentWeight;
/**
* 原始权重
*/
private int originWeight;
/**
* 服务名
*/
private String name;

public LoadServer( String name,int currentWeight) {
this.currentWeight = currentWeight;
this.originWeight = currentWeight;
this.name = name;
}

public int getCurrentWeight() {
return currentWeight;
}

public void setCurrentWeight(int currentWeight) {
this.currentWeight = currentWeight;
}

public int getOriginWeight() {
return originWeight;
}

public void setOriginWeight(int originWeight) {
this.originWeight = originWeight;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

@Override
public String toString() {
final StringBuilder sb = new StringBuilder("{");
sb.append("\"currentWeight\":")
.append(currentWeight);
sb.append(",\"originWeight\":")
.append(originWeight);
sb.append(",\"name\":\"")
.append(name).append('\"');
sb.append('}');
return sb.toString();
}
}

private Map<String,LoadServer> serverMap = new ConcurrentHashMap<>();
public void initServerWeight(){
}

/**
* 选择最优负载
* @return
*/

StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("\t");
stringBuilder.append(server.getValue().currentWeight+",");
}
stringBuilder.append("\t\t");
System.out.println("\t配置前\t\t配置后\t最优配置名称");

int sumBalance = 0;
/** 求总负载 **/
sumBalance+=server.getValue().originWeight;
/** 求当前时刻最大权重的负载 **/
if (maxServer==null){
maxServer = server.getValue();
}else {
if (server.getValue().getCurrentWeight()>maxServer.getCurrentWeight()){
maxServer = server.getValue();
}
}
}
/** 找到最大负载之后，恒心当前负载 **/
maxServer.setCurrentWeight(maxServer.getCurrentWeight()-sumBalance);

server.getValue().setCurrentWeight(server.getValue().getCurrentWeight()+server.getValue().getOriginWeight());
stringBuilder.append(server.getValue().getCurrentWeight()+",");
}
stringBuilder.append("\t"+maxServer.getName());
System.out.println(stringBuilder);
System.out.println("--------------------------------\n");

return maxServer;

}

public static void main(String[] args) {
balance.initServerWeight();
for (int i =0;i<10;i++){
balance.selectBestServer();
}
}

}


### 执行结果

"D:\Program Files\Java\jdk1.8.0_121\bin\java.exe" "-javaagent:D:\Program Files\JetBrains\IntelliJ IDEA 2018.2.4\lib\idea_rt.jar=12734:D:\Program Files\JetBrains\IntelliJ IDEA 2018.2.4\bin" -Dfile.encoding=UTF-8 -classpath "D:\Program Files\Java\jdk1.8.0_121\jre\lib\charsets.jar;D:\Program Files\Java\jdk1.8.0_121\jre\lib\deploy.jar;D:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\access-bridge-64.jar;D:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\cldrdata.jar;D:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\dnsns.jar;D:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\jaccess.jar;D:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\jfxrt.jar;D:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\localedata.jar;D:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\nashorn.jar;D:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunec.jar;D:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunjce_provider.jar;D:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunmscapi.jar;D:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunpkcs11.jar;D:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\zipfs.jar;D:\Program Files\Java\jdk1.8.0_121\jre\lib\javaws.jar;D:\Program Files\Java\jdk1.8.0_121\jre\lib\jce.jar;D:\Program Files\Java\jdk1.8.0_121\jre\lib\jfr.jar;D:\Program Files\Java\jdk1.8.0_121\jre\lib\jfxswt.jar;D:\Program Files\Java\jdk1.8.0_121\jre\lib\jsse.jar;D:\Program Files\Java\jdk1.8.0_121\jre\lib\management-agent.jar;D:\Program Files\Java\jdk1.8.0_121\jre\lib\plugin.jar;D:\Program Files\Java\jdk1.8.0_121\jre\lib\resources.jar;D:\Program Files\Java\jdk1.8.0_121\jre\lib\rt.jar;E:\Project\java\jike_study\target\classes;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\thymeleaf\thymeleaf\3.0.11.RELEASE\thymeleaf-3.0.11.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\ognl\ognl\3.1.12\ognl-3.1.12.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\javassist\javassist\3.20.0-GA\javassist-3.20.0-GA.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\attoparser\attoparser\2.0.5.RELEASE\attoparser-2.0.5.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\unbescape\unbescape\1.1.6.RELEASE\unbescape-1.1.6.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;E:\Project\java\jike_study\lib\drools-jsr94-6.2.0.Final.jar;E:\Project\java\jike_study\lib\jboss-interceptors-api_1.1_spec-1.0.1.Final.jar;E:\Project\java\jike_study\lib\jboss-transaction-api_1.1_spec-1.0.1.Final.jar;E:\Project\java\jike_study\lib\kie-api-6.2.0.Final.jar;E:\Project\java\jike_study\lib\drools-persistence-jpa-6.2.0.Final.jar;E:\Project\java\jike_study\lib\kie-ci-6.2.0.Final.jar;E:\Project\java\jike_study\lib\drools-templates-6.2.0.Final.jar;E:\Project\java\jike_study\lib\drools-decisiontables-6.2.0.Final.jar;E:\Project\java\jike_study\lib\kie-internal-6.2.0.Final.jar;E:\Project\java\jike_study\lib\drools-verifier-6.2.0.Final.jar;E:\Project\java\jike_study\lib\aether-connector-basic-1.0.0.v20140518.jar;E:\Project\java\jike_study\lib\aether-spi-1.0.0.v20140518.jar;E:\Project\java\jike_study\lib\aether-transport-file-1.0.0.v20140518.jar;E:\Project\java\jike_study\lib\aether-transport-http-1.0.0.v20140518.jar;E:\Project\java\jike_study\lib\aether-api-1.0.0.v20140518.jar;E:\Project\java\jike_study\lib\aether-transport-wagon-1.0.0.v20140518.jar;E:\Project\java\jike_study\lib\ant-launcher-1.8.2.jar;E:\Project\java\jike_study\lib\aether-impl-1.0.0.v20140518.jar;E:\Project\java\jike_study\lib\drools-compiler-6.2.0.Final.jar;E:\Project\java\jike_study\lib\aether-util-1.0.0.v20140518.jar;E:\Project\java\jike_study\lib\drools-core-6.2.0.Final.jar;E:\Project\java\jike_study\lib\aopalliance-1.0.jar;E:\Project\java\jike_study\lib\cdi-api-1.0-SP4.jar;E:\Project\java\jike_study\lib\commons-codec-1.4.jar;E:\Project\java\jike_study\lib\antlr-runtime-3.5.jar;E:\Project\java\jike_study\lib\ant-1.8.2.jar;E:\Project\java\jike_study\lib\hibernate-jpa-2.0-api-1.0.1.Final.jar;E:\Project\java\jike_study\lib\commons-logging-1.1.1.jar;E:\Project\java\jike_study\lib\dom4j-1.6.1.jar;E:\Project\java\jike_study\lib\httpcore-4.3.3.jar;E:\Project\java\jike_study\lib\javax.inject-1.jar;E:\Project\java\jike_study\lib\jcl-over-slf4j-1.7.2.jar;E:\Project\java\jike_study\lib\httpclient-4.3.6.jar;E:\Project\java\jike_study\lib\itext-2.1.2.jar;E:\Project\java\jike_study\lib\jsr94-1.1.jar;E:\Project\java\jike_study\lib\jsr250-api-1.0.jar;E:\Project\java\jike_study\lib\jsoup-1.7.1.jar;E:\Project\java\jike_study\lib\maven-aether-provider-3.2.2.jar;E:\Project\java\jike_study\lib\maven-artifact-3.2.2.jar;E:\Project\java\jike_study\lib\javassist-3.18.1-GA.jar;E:\Project\java\jike_study\lib\maven-compat-3.2.2.jar;E:\Project\java\jike_study\lib\maven-core-3.2.2.jar;E:\Project\java\jike_study\lib\maven-model-3.2.2.jar;E:\Project\java\jike_study\lib\maven-plugin-api-3.2.2.jar;E:\Project\java\jike_study\lib\ecj-4.3.1.jar;E:\Project\java\jike_study\lib\maven-model-builder-3.2.2.jar;E:\Project\java\jike_study\lib\maven-repository-metadata-3.2.2.jar;E:\Project\java\jike_study\lib\maven-settings-builder-3.2.2.jar;E:\Project\java\jike_study\lib\maven-settings-3.2.2.jar;E:\Project\java\jike_study\lib\guava-13.0.1.jar;E:\Project\java\jike_study\lib\mvel2-2.2.4.Final.jar;E:\Project\java\jike_study\lib\plexus-cipher-1.4.jar;E:\Project\java\jike_study\lib\plexus-classworlds-2.5.1.jar;E:\Project\java\jike_study\lib\org.eclipse.sisu.plexus-0.0.0.M5.jar;E:\Project\java\jike_study\lib\plexus-component-annotations-1.5.5.jar;E:\Project\java\jike_study\lib\plexus-interpolation-1.19.jar;E:\Project\java\jike_study\lib\plexus-sec-dispatcher-1.3.jar;E:\Project\java\jike_study\lib\org.eclipse.sisu.inject-0.0.0.M5.jar;E:\Project\java\jike_study\lib\plexus-utils-3.0.17.jar;E:\Project\java\jike_study\lib\slf4j-api-1.7.2.jar;E:\Project\java\jike_study\lib\protobuf-java-2.5.0.jar;E:\Project\java\jike_study\lib\wagon-http-shared4-2.0.jar;E:\Project\java\jike_study\lib\wagon-provider-api-1.0.jar;E:\Project\java\jike_study\lib\wagon-http-2.0.jar;E:\Project\java\jike_study\lib\sisu-guice-3.1.0-no_aop.jar;E:\Project\java\jike_study\lib\xml-apis-1.3.04.jar;E:\Project\java\jike_study\lib\poi-ooxml-3.10.1.jar;E:\Project\java\jike_study\lib\xmlpull-1.1.3.1.jar;E:\Project\java\jike_study\lib\poi-3.10.1.jar;E:\Project\java\jike_study\lib\stax-api-1.0.1.jar;E:\Project\java\jike_study\lib\xpp3_min-1.1.4c.jar;E:\Project\java\jike_study\lib\xstream-1.4.7.jar;E:\Project\java\jike_study\lib\xmlbeans-2.3.0.jar;E:\Project\java\jike_study\lib\poi-ooxml-schemas-3.10.1.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\arquillian\testng\arquillian-testng-container\1.4.1.Final\arquillian-testng-container-1.4.1.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\arquillian\testng\arquillian-testng-core\1.4.1.Final\arquillian-testng-core-1.4.1.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\arquillian\test\arquillian-test-api\1.4.1.Final\arquillian-test-api-1.4.1.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\arquillian\core\arquillian-core-api\1.4.1.Final\arquillian-core-api-1.4.1.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\arquillian\test\arquillian-test-spi\1.4.1.Final\arquillian-test-spi-1.4.1.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\arquillian\core\arquillian-core-spi\1.4.1.Final\arquillian-core-spi-1.4.1.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\arquillian\container\arquillian-container-test-api\1.4.1.Final\arquillian-container-test-api-1.4.1.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\shrinkwrap\shrinkwrap-api\1.2.6\shrinkwrap-api-1.2.6.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\shrinkwrap\descriptors\shrinkwrap-descriptors-api-base\2.0.0\shrinkwrap-descriptors-api-base-2.0.0.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\arquillian\container\arquillian-container-test-spi\1.4.1.Final\arquillian-container-test-spi-1.4.1.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\arquillian\container\arquillian-container-spi\1.4.1.Final\arquillian-container-spi-1.4.1.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\arquillian\core\arquillian-core-impl-base\1.4.1.Final\arquillian-core-impl-base-1.4.1.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\arquillian\test\arquillian-test-impl-base\1.4.1.Final\arquillian-test-impl-base-1.4.1.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\arquillian\container\arquillian-container-impl-base\1.4.1.Final\arquillian-container-impl-base-1.4.1.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\arquillian\config\arquillian-config-api\1.4.1.Final\arquillian-config-api-1.4.1.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\arquillian\config\arquillian-config-impl-base\1.4.1.Final\arquillian-config-impl-base-1.4.1.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\arquillian\config\arquillian-config-spi\1.4.1.Final\arquillian-config-spi-1.4.1.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\shrinkwrap\descriptors\shrinkwrap-descriptors-spi\2.0.0\shrinkwrap-descriptors-spi-2.0.0.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\arquillian\container\arquillian-container-test-impl-base\1.4.1.Final\arquillian-container-test-impl-base-1.4.1.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\shrinkwrap\shrinkwrap-impl-base\1.2.6\shrinkwrap-impl-base-1.2.6.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\shrinkwrap\shrinkwrap-spi\1.2.6\shrinkwrap-spi-1.2.6.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\arquillian\junit\arquillian-junit-container\1.4.1.Final\arquillian-junit-container-1.4.1.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\arquillian\junit\arquillian-junit-core\1.4.1.Final\arquillian-junit-core-1.4.1.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\thymeleaf\thymeleaf-spring4\3.0.11.RELEASE\thymeleaf-spring4-3.0.11.RELEASE.jar;E:\Project\java\jike_study\lib\opencv-3.4.2-0-sources.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\boot\spring-boot-starter-web\1.5.16.RELEASE\spring-boot-starter-web-1.5.16.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\boot\spring-boot-starter\1.5.16.RELEASE\spring-boot-starter-1.5.16.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\boot\spring-boot\1.5.16.RELEASE\spring-boot-1.5.16.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\1.5.16.RELEASE\spring-boot-autoconfigure-1.5.16.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\boot\spring-boot-starter-logging\1.5.16.RELEASE\spring-boot-starter-logging-1.5.16.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\yaml\snakeyaml\1.17\snakeyaml-1.17.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\hibernate\hibernate-validator\5.3.6.Final\hibernate-validator-5.3.6.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\logging\jboss-logging\3.3.2.Final\jboss-logging-3.3.2.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\com\fasterxml\classmate\1.3.4\classmate-1.3.4.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.8.11.2\jackson-databind-2.8.11.2.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.8.0\jackson-annotations-2.8.0.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.8.11\jackson-core-2.8.11.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\spring-web\4.3.19.RELEASE\spring-web-4.3.19.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\spring-beans\4.3.19.RELEASE\spring-beans-4.3.19.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\spring-webmvc\4.3.19.RELEASE\spring-webmvc-4.3.19.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\spring-expression\4.3.19.RELEASE\spring-expression-4.3.19.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\boot\spring-boot-starter-test\1.5.16.RELEASE\spring-boot-starter-test-1.5.16.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\boot\spring-boot-test\1.5.16.RELEASE\spring-boot-test-1.5.16.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\boot\spring-boot-test-autoconfigure\1.5.16.RELEASE\spring-boot-test-autoconfigure-1.5.16.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\com\jayway\jsonpath\json-path\2.2.0\json-path-2.2.0.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\net\minidev\json-smart\2.2.1\json-smart-2.2.1.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\net\minidev\accessors-smart\1.1\accessors-smart-1.1.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\junit\junit\4.12\junit-4.12.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\assertj\assertj-core\2.6.0\assertj-core-2.6.0.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\mockito\mockito-core\1.10.19\mockito-core-1.10.19.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\objenesis\objenesis\2.1\objenesis-2.1.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\hamcrest\hamcrest-library\1.3\hamcrest-library-1.3.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\skyscreamer\jsonassert\1.4.0\jsonassert-1.4.0.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\com\vaadin\external\google\android-json\0.0.20131108.vaadin1\android-json-0.0.20131108.vaadin1.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\spring-core\4.3.19.RELEASE\spring-core-4.3.19.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\spring-test\4.3.19.RELEASE\spring-test-4.3.19.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\boot\spring-boot-starter-data-jpa\1.5.16.RELEASE\spring-boot-starter-data-jpa-1.5.16.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\boot\spring-boot-starter-jdbc\1.5.16.RELEASE\spring-boot-starter-jdbc-1.5.16.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\apache\tomcat\tomcat-jdbc\8.5.34\tomcat-jdbc-8.5.34.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\apache\tomcat\tomcat-juli\8.5.34\tomcat-juli-8.5.34.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\spring-jdbc\4.3.19.RELEASE\spring-jdbc-4.3.19.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\hibernate\hibernate-core\5.0.12.Final\hibernate-core-5.0.12.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\hibernate\javax\persistence\hibernate-jpa-2.1-api\1.0.0.Final\hibernate-jpa-2.1-api-1.0.0.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\javassist\javassist\3.21.0-GA\javassist-3.21.0-GA.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\jboss\jandex\2.0.0.Final\jandex-2.0.0.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\hibernate\common\hibernate-commons-annotations\5.0.1.Final\hibernate-commons-annotations-5.0.1.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\hibernate\hibernate-entitymanager\5.0.12.Final\hibernate-entitymanager-5.0.12.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\javax\transaction\javax.transaction-api\1.2\javax.transaction-api-1.2.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\data\spring-data-jpa\1.11.15.RELEASE\spring-data-jpa-1.11.15.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\data\spring-data-commons\1.13.15.RELEASE\spring-data-commons-1.13.15.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\spring-orm\4.3.19.RELEASE\spring-orm-4.3.19.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\spring-tx\4.3.19.RELEASE\spring-tx-4.3.19.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\spring-aspects\4.3.19.RELEASE\spring-aspects-4.3.19.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\mysql\mysql-connector-java\5.1.47\mysql-connector-java-5.1.47.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\boot\spring-boot-starter-aop\1.5.16.RELEASE\spring-boot-starter-aop-1.5.16.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\spring-aop\4.3.19.RELEASE\spring-aop-4.3.19.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\aspectj\aspectjweaver\1.8.13\aspectjweaver-1.8.13.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\bytedeco\javacv\1.3.3\javacv-1.3.3.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\bytedeco\javacpp\1.3.3\javacpp-1.3.3.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\bytedeco\javacpp-presets\opencv\3.2.0-1.3\opencv-3.2.0-1.3.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\bytedeco\javacpp-presets\ffmpeg\3.2.1-1.3\ffmpeg-3.2.1-1.3.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\bytedeco\javacpp-presets\flycapture\2.9.3.43-1.3\flycapture-2.9.3.43-1.3.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\bytedeco\javacpp-presets\libdc1394\2.2.4-1.3\libdc1394-2.2.4-1.3.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\bytedeco\javacpp-presets\libfreenect\0.5.3-1.3\libfreenect-0.5.3-1.3.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\bytedeco\javacpp-presets\libfreenect2\0.2.0-1.3\libfreenect2-0.2.0-1.3.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\bytedeco\javacpp-presets\librealsense\1.9.6-1.3\librealsense-1.9.6-1.3.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\bytedeco\javacpp-presets\videoinput\0.200-1.3\videoinput-0.200-1.3.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\bytedeco\javacpp-presets\artoolkitplus\2.3.1-1.3\artoolkitplus-2.3.1-1.3.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\bytedeco\javacpp-presets\flandmark\1.07-1.3\flandmark-1.07-1.3.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\redis\clients\Jedis\3.0.1\jedis-3.0.1.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\apache\commons\commons-pool2\2.4.3\commons-pool2-2.4.3.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\com\alibaba\fastjson\1.1.15\fastjson-1.1.15.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\io\netty\netty-all\4.1.25.Final\netty-all-4.1.25.Final.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\red5\red5-server\1.1.0\red5-server-1.1.0.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.25\jcl-over-slf4j-1.7.25.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\slf4j\log4j-over-slf4j\1.7.25\log4j-over-slf4j-1.7.25.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\ch\qos\logback\logback-classic\1.1.11\logback-classic-1.1.11.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\ch\qos\logback\logback-core\1.1.11\logback-core-1.1.11.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\spring-context\4.3.19.RELEASE\spring-context-4.3.19.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\springframework\spring-context-support\4.3.19.RELEASE\spring-context-support-4.3.19.RELEASE.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\red5\red5-server-common\1.1.0\red5-server-common-1.1.0.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\apache\mina\mina-core\2.0.21\mina-core-2.0.21.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\apache\httpcomponents\httpclient\4.5.6\httpclient-4.5.6.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\apache\httpcomponents\httpcore\4.4.10\httpcore-4.4.10.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\apache\commons\commons-lang3\3.9\commons-lang3-3.9.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\commons-beanutils\commons-beanutils\1.9.3\commons-beanutils-1.9.3.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\bouncycastle\bcprov-jdk15on\1.60\bcprov-jdk15on-1.60.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\red5\red5-io\1.1.0\red5-io-1.1.0.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\apache\tika\tika-parsers\1.16\tika-parsers-1.16.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\apache\tika\tika-core\1.16\tika-core-1.16.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\apache\james\apache-mime4j-core\0.8.1\apache-mime4j-core-0.8.1.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\apache\james\apache-mime4j-dom\0.8.1\apache-mime4j-dom-0.8.1.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\apache\commons\commons-compress\1.14\commons-compress-1.14.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\apache\pdfbox\pdfbox-tools\2.0.6\pdfbox-tools-2.0.6.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\apache\pdfbox\pdfbox-debugger\2.0.6\pdfbox-debugger-2.0.6.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\apache\pdfbox\jempbox\1.8.13\jempbox-1.8.13.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\ccil\cowan\tagsoup\tagsoup\1.2.1\tagsoup-1.2.1.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\ow2\asm\asm\5.0.4\asm-5.0.4.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\com\drewnoakes\metadata-extractor\2.9.1\metadata-extractor-2.9.1.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\com\adobe\xmp\xmpcore\5.1.2\xmpcore-5.1.2.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\de\l3s\boilerpipe\boilerpipe\1.1.0\boilerpipe-1.1.0.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\com\rometools\rome\1.5.1\rome-1.5.1.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\com\rometools\rome-utils\1.5.1\rome-utils-1.5.1.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\com\googlecode\juniversalchardet\juniversalchardet\1.0.3\juniversalchardet-1.0.3.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\commons-io\commons-io\2.5\commons-io-2.5.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\net\sf\ehcache\ehcache-core\2.6.11\ehcache-core-2.6.11.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\mp4parser\isoparser\1.9.31\isoparser-1.9.31.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\red5\red5-service\1.1.0\red5-service-1.1.0.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\commons-daemon\commons-daemon\1.1.0\commons-daemon-1.1.0.jar;D:\Program Files\Apache Software Foundation\apache-maven-3.5.4\.m2\repository\org\apache\mina\mina-integration-beans\2.0.21\mina-integration-beans-2.0.21.jar" com.jike.alg.bigData.AvgLoadBalance
配置前		配置后	最优配置名称
5,2,2,		1,4,4,	101
--------------------------------

配置前		配置后	最优配置名称
1,4,4,		6,-3,6,	102
--------------------------------

配置前		配置后	最优配置名称
6,-3,6,		2,-1,8,	101
--------------------------------

配置前		配置后	最优配置名称
2,-1,8,		7,1,1,	103
--------------------------------

配置前		配置后	最优配置名称
7,1,1,		3,3,3,	101
--------------------------------

配置前		配置后	最优配置名称
3,3,3,		-1,5,5,	101
--------------------------------

配置前		配置后	最优配置名称
-1,5,5,		4,-2,7,	102
--------------------------------

配置前		配置后	最优配置名称
4,-2,7,		9,0,0,	103
--------------------------------

配置前		配置后	最优配置名称
9,0,0,		5,2,2,	101
--------------------------------

配置前		配置后	最优配置名称
5,2,2,		1,4,4,	101
--------------------------------

Process finished with exit code 0


• 0
点赞
• 0
收藏
觉得还不错? 一键收藏
• 0
评论
01-21 514
08-08
08-27
04-17 1434
09-05 929
10-11 8万+
06-01 1131
02-15 974
06-30 468
03-29 1395
10-12 408

### “相关推荐”对你有帮助么？

• 非常没帮助
• 没帮助
• 一般
• 有帮助
• 非常有帮助

1.余额是钱包充值的虚拟货币，按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载，可以购买VIP、付费专栏及课程。