JAV-429 Modify the startup policy of SDK#331
Conversation
| /** | ||
| *Created by on 2017/11/22. | ||
| */ | ||
| public class Sha { |
There was a problem hiding this comment.
it seems guava already has this utils?
There was a problem hiding this comment.
yes,use guava is better
| } | ||
|
|
||
| @Override | ||
| public ServiceCenter getServiceCenter() { |
There was a problem hiding this comment.
left these methods empty not good.
There was a problem hiding this comment.
ok,i'll use some information to mark
| } | ||
|
|
||
| @Override | ||
| public boolean syncSchemasAll(Microservice microservice) { |
There was a problem hiding this comment.
if there are 600 schemas, will this request too big?
There was a problem hiding this comment.
so how to deal with such a scene? if local schema is not same with SC's
| if (Const.SERVICECENTER_RUNMODE_DEV.equals(srClient.getServiceCenter().getRunMode())) { | ||
| LOGGER.warn("The current servicecenter environment runmode is {}", Const.SERVICECENTER_RUNMODE_DEV); | ||
| return true; | ||
| } else if (Const.SERVICECENTER_RUNMODE_PROD.equals(srClient.getServiceCenter().getRunMode())) { |
There was a problem hiding this comment.
already return, no need else
| return true; | ||
| } | ||
|
|
||
| private boolean serviceCenterEnv() { |
There was a problem hiding this comment.
serviceCenterEnv is not clear
it seems that to determine if it is dev mode.
There was a problem hiding this comment.
Use String instead of boolean to do the return value type, and then judge?
There was a problem hiding this comment.
only in the dev can perform changes currently, so determine if it is dev mode in the method,we can only care about it'll return true or false
There was a problem hiding this comment.
yes.
but method name is serviceCenterEnv, not relative to dev mode.
There was a problem hiding this comment.
ok,i've changed the metnod's name to serviceCenterEnvIsDev
| * | ||
| * 同步本地schema | ||
| */ | ||
| boolean syncSchemasAll(Microservice microservice); |
There was a problem hiding this comment.
we need a batch api to determine if some schemas exist.
There was a problem hiding this comment.
this time i use the batch upload interface that SC provided,if not good enough, we can use the better plan
|
Changes Unknown when pulling cb2941a on wWX495170:master into ** on ServiceComb:master**. |
|
@wWX495170 Can you rebase the change to resolve the conflicts? |
weichao666
left a comment
There was a problem hiding this comment.
JAV-429 Modify the startup policy of SDK
weichao666
left a comment
There was a problem hiding this comment.
JAV-429 Modify the startup policy of SDK
JAV-429 Modify the startup policy of SDK
added schema summary,
added batch registration,
added to determine whether the servicecenter environment's runmode is dev,