Skip to content

Commit

Permalink
Fixed alibaba#98
Browse files Browse the repository at this point in the history
  • Loading branch information
mercyblitz committed Sep 30, 2018
1 parent cfb96d8 commit 85df9e0
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 25 deletions.
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.2.1</version>
<version>0.2.2-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.2.1</version>
<version>0.2.2-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.2.1</version>
<version>0.2.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.2.1</version>
<version>0.2.2-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

import com.alibaba.nacos.config.server.constant.Constants;
import com.alibaba.nacos.config.server.model.SampleResult;
import com.alibaba.nacos.config.server.service.LongPullingService;
import com.alibaba.nacos.config.server.service.LongPollingService;
import com.alibaba.nacos.config.server.service.dump.DumpService;
import com.alibaba.nacos.config.server.service.notify.NotifyService;

Expand All @@ -51,7 +51,7 @@ public class CommunicationController {
private DumpService dumpService;

@Autowired
protected LongPullingService longPullingService;
protected LongPollingService longPollingService;

private String trueStr = "true";

Expand Down Expand Up @@ -92,7 +92,7 @@ public SampleResult getSubClientConfig(HttpServletRequest request,
ModelMap modelMap)
throws IOException, ServletException, Exception {
group = StringUtils.isBlank(group) ? Constants.DEFAULT_GROUP : group;
SampleResult sampleResult = longPullingService.getCollectSubscribleInfo(dataId, group, tenant);
SampleResult sampleResult = longPollingService.getCollectSubscribleInfo(dataId, group, tenant);
return sampleResult;
}

Expand All @@ -106,7 +106,7 @@ public SampleResult getSubClientConfigByIp(HttpServletRequest request,
@RequestParam("ip") String ip,
ModelMap modelMap)
throws IOException, ServletException, Exception {
SampleResult sampleResult = longPullingService.getCollectSubscribleInfoByIp(ip);
SampleResult sampleResult = longPollingService.getCollectSubscribleInfoByIp(ip);
return sampleResult;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import com.alibaba.nacos.config.server.model.ConfigInfoBase;
import com.alibaba.nacos.config.server.service.ConfigService;
import com.alibaba.nacos.config.server.service.DiskUtil;
import com.alibaba.nacos.config.server.service.LongPullingService;
import com.alibaba.nacos.config.server.service.LongPollingService;
import com.alibaba.nacos.config.server.service.PersistService;
import com.alibaba.nacos.config.server.service.trace.ConfigTraceService;
import com.alibaba.nacos.config.server.utils.GroupKey2;
Expand All @@ -60,7 +60,7 @@
public class ConfigServletInner {

@Autowired
private LongPullingService longPullingService;
private LongPollingService longPollingService;

@Autowired
private PersistService persistService;
Expand All @@ -74,8 +74,8 @@ public class ConfigServletInner {
public String doPollingConfig(HttpServletRequest request, HttpServletResponse response, Map<String, String> clientMd5Map, int probeRequestSize) throws IOException, ServletException {

// 长轮询
if (LongPullingService.isSupportLongPulling(request)) {
longPullingService.addLongPullingClient(request, response, clientMd5Map, probeRequestSize);
if (LongPollingService.isSupportLongPulling(request)) {
longPollingService.addLongPullingClient(request, response, clientMd5Map, probeRequestSize);
return HttpServletResponse.SC_OK + "";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import static com.alibaba.nacos.config.server.utils.LogUtil.memoryLog;
import static com.alibaba.nacos.config.server.utils.LogUtil.pullLog;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
Expand Down Expand Up @@ -57,7 +56,7 @@
* @author Nacos
*/
@Service
public class LongPullingService extends AbstractEventListener {
public class LongPollingService extends AbstractEventListener {

private static final int FIXED_POLLING_INTERVAL_MS = 10000;

Expand Down Expand Up @@ -222,8 +221,8 @@ private ClientLongPulling getClientPollingRecord(String clientIp) {

public void addLongPullingClient(HttpServletRequest req, HttpServletResponse rsp, Map<String, String> clientMd5Map, int probeRequestSize) {

String str = req.getHeader(LongPullingService.LONG_PULLING_HEADER);
String noHangUpFlag = req.getHeader(LongPullingService.LONG_PULLING_NO_HANG_UP_HEADER);
String str = req.getHeader(LongPollingService.LONG_PULLING_HEADER);
String noHangUpFlag = req.getHeader(LongPollingService.LONG_PULLING_NO_HANG_UP_HEADER);
String appName = req.getHeader(RequestUtil.CLIENT_APPNAME_HEADER);
String tag = req.getHeader("Vipserver-Tag");
int delayTime=SwitchService.getSwitchInteger(SwitchService.FIXED_DELAY_TIME, 500);
Expand Down Expand Up @@ -285,7 +284,7 @@ static public boolean isSupportLongPulling(HttpServletRequest req) {
}

@SuppressWarnings("PMD.ThreadPoolCreationRule")
public LongPullingService() {
public LongPollingService() {
allSubs = new ConcurrentLinkedQueue<ClientLongPulling>();

scheduler = Executors.newScheduledThreadPool(1, new ThreadFactory() {
Expand Down
2 changes: 1 addition & 1 deletion console/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.2.1</version>
<version>0.2.2-SNAPSHOT</version>
</parent>
<artifactId>nacos-console</artifactId>
<!--<packaging>war</packaging>-->
Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.2.1</version>
<version>0.2.2-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.2.1</version>
<version>0.2.2-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.2.1</version>
<version>0.2.2-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion naming/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.2.1</version>
<version>0.2.2-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<inceptionYear>2018</inceptionYear>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.2.1</version>
<version>0.2.2-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Alibaba NACOS ${project.version}</name>
Expand All @@ -36,7 +36,7 @@
<url>[email protected]:alibaba/nacos.git</url>
<connection>scm:[email protected]:alibaba/nacos.git</connection>
<developerConnection>scm:[email protected]:alibaba/nacos.git</developerConnection>
<tag>nacos-all-0.2.1-RC1</tag>
<tag>nacos-all-0.2.2-SNAPSHOT</tag>
</scm>

<mailingLists>
Expand Down
2 changes: 1 addition & 1 deletion test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.2.1</version>
<version>0.2.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down

0 comments on commit 85df9e0

Please sign in to comment.