profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/pixystone/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

pixystone/ant-design 0

:ant: One design language

pixystone/devops 0

Scripts for devops

pixystone/eclipse.jdt.ls 0

Java language server

pixystone/install-to-project-repo 0

A script for installing jars to an in-project Maven repository

pixystone/libpod 0

libpod is a library used to create container pods. Home of Podman.

pixystone/nacos 0

an easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications.

pixystone/pixystone.github.com 0

Pixy's Blog on GitHub

pixystone/python-language-server 0

An implementation of the Language Server Protocol for Python

pixystone/system-design-primer 0

Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

issue openedalibaba/git-repo-go

git-pr命令已经被git-extras包含了,何解?

$ g repo version
WARNING: you cannot use the git-repo alias command 'git-pr', it is overrided by '/usr/local/bin/git-pr' installed
git-repo version 0.7.7
git version 2.25.0

created time in 24 days

PR opened alibaba/nacos

[ISSUE #6386] Stop v1 distro verification when cluster upgraded to v2.

FIX #6386

What is the purpose of the change

XXXXX

Brief changelog

XX

Verifying this change

XXXX

Follow this checklist to help us incorporate your contribution quickly and easily:

  • [ ] Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • [ ] Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • [ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
  • [ ] Run mvn -B clean package apache-rat:check findbugs:findbugs -Dmaven.test.skip=true to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test to make sure integration-test pass.
+9 -0

0 comment

2 changed files

pr created time in 2 months

issue openedalibaba/nacos

[2.0.x] Need to close distro verify for v1 data when cluster upgraded to v2 mode.

The v1 data should all rely to doublewrite tasks.

created time in 2 months

PullRequestReviewEvent

Pull request review commentalibaba/nacos

[ISSUE#6272] Refactor Instance builder to build and handler request from http.

+/*+ * Copyright 1999-2020 Alibaba Group Holding Ltd.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ *      http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++package com.alibaba.nacos.naming.pojo.instance;++import com.alibaba.nacos.api.exception.NacosException;+import com.alibaba.nacos.api.naming.CommonParams;+import com.alibaba.nacos.api.naming.pojo.Instance;+import com.alibaba.nacos.api.naming.pojo.builder.InstanceBuilder;+import com.alibaba.nacos.common.spi.NacosServiceLoader;+import com.alibaba.nacos.common.utils.ConvertUtils;+import com.alibaba.nacos.common.utils.StringUtils;+import com.alibaba.nacos.core.utils.WebUtils;+import com.alibaba.nacos.naming.misc.SwitchDomain;+import com.alibaba.nacos.naming.misc.UtilsAndCommons;++import javax.servlet.http.HttpServletRequest;+import java.util.Collection;++/**+ * Http instance builder.+ *+ * <p>+ * The http openAPI will split each attributes of {@link Instance} as parameters of http parameters. This Builder can+ * set an http request and get necessary parameters to build {@link Instance}.+ * </p>+ *+ * <p>+ * This builder is a wrapper for {@link com.alibaba.nacos.api.naming.pojo.builder.InstanceBuilder} and will inject some+ * extension handler by spi.+ * </p>+ *+ * @author xiweng.yy+ */+public class HttpRequestInstanceBuilder {+    +    private final InstanceBuilder actualBuilder;+    +    private final Collection<InstanceExtensionHandler> handlers;+    +    private final SwitchDomain switchDomain;+    +    private HttpRequestInstanceBuilder(SwitchDomain switchDomain) {+        this.actualBuilder = InstanceBuilder.newBuilder();+        this.handlers = NacosServiceLoader.newServiceInstances(InstanceExtensionHandler.class);+        this.switchDomain = switchDomain;+    }+    +    public static HttpRequestInstanceBuilder newBuilder(SwitchDomain switchDomain) {

Can specify DefaultInstanceEphemeral value instead of switchDomain

KomachiSion

comment created time in 3 months

PullRequestReviewEvent

Pull request review commentalibaba/nacos

[ISSUE#6272] Refactor Instance builder to build and handler request from http.

 public void patchInstance(String namespaceId, String serviceName, InstancePatchO         if (null != patchObject.getHealthy()) {             instance.setHealthy(patchObject.getHealthy());         }-        if (null != patchObject.getApp()) {

Why?

KomachiSion

comment created time in 3 months

PullRequestReviewEvent

Pull request review commentalibaba/nacos

[ISSUE#6272] Refactor Instance builder to build and handler request from http.

 public long getHeartBeatInterval(String namespaceId, String serviceName, String         };         return serviceManager.batchOperate(namespace, instanceOperationInfo, operateFunction);     }+    +    private com.alibaba.nacos.naming.core.Instance parseInstance(Instance apiInstance) {+        com.alibaba.nacos.naming.core.Instance result = new com.alibaba.nacos.naming.core.Instance();

Can use InstanceUpgradeHelper instead.

KomachiSion

comment created time in 3 months

PullRequestReviewEvent

Pull request review commentalibaba/nacos

[ISSUE#6272] Refactor Instance builder to build and handler request from http.

+/*+ * Copyright 1999-2020 Alibaba Group Holding Ltd.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ *      http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++package com.alibaba.nacos.naming.pojo.instance;++import com.alibaba.nacos.api.naming.pojo.Instance;+import com.alibaba.nacos.api.naming.pojo.builder.InstanceBuilder;+import com.alibaba.nacos.common.spi.NacosServiceLoader;+import com.alibaba.nacos.naming.healthcheck.RsInfo;++import javax.servlet.http.HttpServletRequest;+import java.util.Collection;++/**+ * Client beatInfo instance builder.+ *+ * @author xiweng.yy+ */+public class BeatInfoInstanceBuilder {+    +    private final InstanceBuilder actualBuilder;+    +    private final Collection<InstanceExtensionHandler> handlers;+    +    private BeatInfoInstanceBuilder() {+        this.actualBuilder = InstanceBuilder.newBuilder();+        this.handlers = NacosServiceLoader.newServiceInstances(InstanceExtensionHandler.class);+    }+    +    public static BeatInfoInstanceBuilder newBuilder() {+        return new BeatInfoInstanceBuilder();+    }+    +    /**+     * Build a new {@link Instance} and chain handled by {@link InstanceExtensionHandler}.+     *+     * @return new instance+     */+    public Instance build() {+        Instance result = actualBuilder.build();+        for (InstanceExtensionHandler each : handlers) {+            each.handleExtensionInfo(result);+        }+        setInstanceId(result);+        return result;+    }+    +    public BeatInfoInstanceBuilder setRequest(HttpServletRequest request) {+        for (InstanceExtensionHandler each : handlers) {+            each.configExtensionInfoFromRequest(request);+        }+        return this;+    }+    +    public BeatInfoInstanceBuilder setBeatInfo(RsInfo beatInfo) {+        setAttributesToBuilder(beatInfo);+        return this;+    }+    +    private void setAttributesToBuilder(RsInfo beatInfo) {+        actualBuilder.setPort(beatInfo.getPort());+        actualBuilder.setIp(beatInfo.getIp());+        actualBuilder.setWeight(beatInfo.getWeight());+        actualBuilder.setMetadata(beatInfo.getMetadata());+        actualBuilder.setClusterName(beatInfo.getCluster());+        actualBuilder.setServiceName(beatInfo.getServiceName());

beatInfo may not have service name set before.

KomachiSion

comment created time in 3 months

PullRequestReviewEvent

Pull request review commentalibaba/nacos

[ISSUE#6272] Refactor Instance builder to build and handler request from http.

+/*+ * Copyright 1999-2020 Alibaba Group Holding Ltd.+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ *      http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++package com.alibaba.nacos.naming.pojo.instance;++import com.alibaba.nacos.api.naming.pojo.Instance;+import com.alibaba.nacos.common.utils.StringUtils;+import com.alibaba.nacos.core.utils.WebUtils;++import javax.servlet.http.HttpServletRequest;++/**+ * Instance extension handler for app field.+ *+ * @author xiweng.yy+ */+public class AppExtensionHandler implements InstanceExtensionHandler {+    +    private static final String APP_FIELD = "app";+    +    private static final String DEFAULT_APP = "DEFAULT";

Default value can be empty to reduce meta size.

KomachiSion

comment created time in 3 months

PullRequestReviewEvent