-
Notifications
You must be signed in to change notification settings - Fork 32
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
base: master
Are you sure you want to change the base?
Add sync fitting #773
Conversation
@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
|
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>
Signed-off-by: Lan Lou <loul@vmware.com>
There was a problem hiding this 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; |
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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); | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why remove those code ?
There was a problem hiding this comment.
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.
flowgate-api/pom.xml
Outdated
@@ -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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change back.
flowgate-api/pom.xml
Outdated
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version> | ||
<guava.version>30.0-jre</guava.version> |
There was a problem hiding this comment.
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.
flowgate-api/pom.xml
Outdated
@@ -112,7 +111,7 @@ | |||
<dependency> | |||
<groupId>com.google.guava</groupId> | |||
<artifactId>guava</artifactId> | |||
<version>${guava.version}</version> | |||
<version>28.0-jre</version> |
There was a problem hiding this comment.
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?
flowgate-api/pom.xml
Outdated
@@ -183,11 +182,6 @@ | |||
<artifactId>woodstox-core</artifactId> | |||
<version>5.0.2</version> | |||
</dependency> | |||
<dependency> |
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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 * * * ?", |
There was a problem hiding this comment.
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?
Signed-off-by: Lan Lou <loul@vmware.com>
Signed-off-by: Lan Lou <loul@vmware.com>
Signed-off-by: Lan Lou <loul@vmware.com>
Signed off.