Skip to content

Add sync fitting #773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Add sync fitting #773

wants to merge 8 commits into from

Conversation

RayCiel
Copy link

@RayCiel RayCiel commented Apr 30, 2021

Signed off.

@vmwclabot
Copy link

@RayCiel, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <john.doe@email.org> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.

delete error/logs

fix bugs

fix bugs

add test & fix bugs

delete useless logs

signed off by

Signed-off-by: Lan Lou <loul@vmware.com>

merge commit and signed off

Signed-off-by: Lan Lou <loul@vmware.com>

add sync fitting

delete error/logs

fix bugs

fix bugs

add test & fix bugs

delete useless logs

signed off by

Signed-off-by: Lan Lou <loul@vmware.com>
Lan Lou added 2 commits April 30, 2021 15:28
Signed-off-by: Lan Lou <loul@vmware.com>
Signed-off-by: Lan Lou <loul@vmware.com>
Copy link
Contributor

@yixingjia yixingjia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don't commit binary files

@@ -18,6 +18,9 @@ public ServiceKeyConfig() {
}

public String getServiceKey() {
return serviceKey;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check those code before create the pr.

@@ -65,10 +77,10 @@ public void executeAsync(EventMessage message) {
logger.warn("Drop none aggregator message " + message.getType());
return;
}
logger.info(message.getContent());
//logger.info("message: " + message.getContent());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? why remove the log info?

@@ -92,6 +104,19 @@ public void executeAsync(EventMessage message) {
case EventMessageUtil.CleanRealtimeData:
cleanRealtimeData();
break;
case EventMessageUtil.SYNC_FITTING:
List<List<Double>> results = syncFitting(false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

@@ -103,7 +128,247 @@ public void executeAsync(EventMessage message) {
}
}
}

public List<Double> doubleToList(double[] arr_double) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you move those math related code into a separate file?

try {
MetricDatas = new ArrayList<>();

CsvReader csvReader = new CsvReader("testData.csv");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should change to api for the when you submit pr

@@ -7,10 +7,10 @@
<include resource="org/springframework/boot/logging/logback/base.xml" />
<appender name="fileInfoLog"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>/log/aggregator-info.log</File>
<File>aggregator-info.log</File>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change back the settings, please don't submit code which only works in your env.

@@ -494,26 +496,6 @@ public void testOpenManageJobExecute1() throws JobExecutionException, JsonProces
openmanageJob.execute(null);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove those code ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some code submitted after I first pull the flowgate. I will check and add them.

@@ -30,9 +30,8 @@
<jwt.version>3.3.0</jwt.version>
<commons-io.version>2.4</commons-io.version>
<jackson.version>2.10.0</jackson.version>
<tomcat.version>9.0.41</tomcat.version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change back.

<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
<guava.version>30.0-jre</guava.version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't overwrite other commit.

@@ -112,7 +111,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
<version>28.0-jre</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? why we change from parameter to a hardcode value?

@@ -183,11 +182,6 @@
<artifactId>woodstox-core</artifactId>
<version>5.0.2</version>
</dependency>
<dependency>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we remove this?

@@ -60,7 +60,8 @@ public static void init(
if(!isInitialized) {
InitializeConfigureData.roleNameAndPrivilegeMap = roleNameAndPrivilegeMap;
InitializeConfigureData.privilegeResourceMap = privilegeResourceMap;
serviceKey = System.getenv(FlowgateConstant.serviceKey);
serviceKey = "loul";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the any hacks before submit code.

@@ -13,13 +13,11 @@
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double check this file, I believe most of the code are delete by mistake.

@@ -23,7 +23,7 @@ logging.config=classpath:logback-spring.xml
#######redis setting#######
spring.redis.host=localhost
spring.redis.port=6379
spring.redis.password=REDISPASSWD_CHANGE
#spring.redis.password=REDISPASSWD_CHANGE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change back all the hackings!

@@ -21,7 +20,7 @@

<appender name="fileErrorLog"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>/log/flowgate-api-error.log</File>
<File>flowgate-api-error.log</File>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change back all the hackings!

@@ -64,6 +64,7 @@
import com.vmware.flowgate.common.MetricKeyName;
import com.vmware.flowgate.common.MetricName;
import com.vmware.flowgate.common.MountingSide;
import com.vmware.flowgate.common.RealtimeDataUnit;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double check this file.

@@ -5,7 +5,7 @@ server.port=49610

########couchbase config######
spring.couchbase.env.timeouts.query=30000
spring.couchbase.bootstrap-hosts=localhost
spring.couchbase.bootstrap-hosts=database-build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change back.

@@ -0,0 +1,22 @@
#Copyright 2019 VMware, Inc.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this file?

@@ -12,7 +12,7 @@

public static int defaultPageNumber = 1;

public static String serviceKey = "FLOWGATESERVICEKEY";
public static String serviceKey = "serviceKey";//"FLOWGATESERVICEKEY";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change back.

@@ -13,7 +13,7 @@
public class PredefinedSDDCJobs {
public static final List<JobConfig> ALLJobs = Arrays.asList(
new JobConfig("AGGREGATOR-PREDEFINED-AGGREGATOR-JOB-DISPATCHER", "AggregateJobDispatcher", "AggregateJobs",
"Hourly", "AggregatorJob", "", "0 23 * * * ?",
"FiveMinutes", "AggregatorJob", "", "0 0/5 * * * ?",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we change this part?

Lan Lou added 2 commits May 19, 2021 11:40
Signed-off-by: Lan Lou <loul@vmware.com>
Signed-off-by: Lan Lou <loul@vmware.com>
Lan Lou added 3 commits July 8, 2021 18:04
Signed-off-by: Lan Lou <loul@vmware.com>
Signed-off-by: Lan Lou <loul@vmware.com>
Signed-off-by: Lan Lou <loul@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants