Commit ade97932 authored by lichenchong's avatar lichenchong
Browse files

Update statistic controller.

parent 6aef03ee
Loading
Loading
Loading
Loading
+358 −356
Original line number Diff line number Diff line
@@ -70,8 +70,7 @@ public class KineticStatController {
        this.dcThread.start();
        if (!useHeartbeatListener) {
            broadcastToDiscoverNodes(this.dcThread);
		}else
		{
        } else {
            new MyHeartbeatListner(this.dcThread);
        }
    }
@@ -236,7 +235,7 @@ public class KineticStatController {
                                    nodes.get(node).getLatestNodeStat());
                        } catch (Exception e) {
                            e.printStackTrace();
							nodes.get(node).clinetReconnect();
                            nodes.get(node).clientReconnect();
                        }

                        nodeStatItem = kineticStatModel.getAvgNodeStat(node);
@@ -334,7 +333,7 @@ class KineticNode {
                .createInstance(adminClientConfig);
    }

	public void clinetReconnect() {
    public void clientReconnect() {
        try {
            adminClient.close();
            adminClient = KineticAdminClientFactory
@@ -375,12 +374,15 @@ class KineticNode {
                case PUT:
                    totalPutTimes = stat.getCount();
                    totalPutBytes = stat.getBytes();
                    break;
                case GET:
                    totalGetTimes = stat.getCount();
                    totalGetBytes = stat.getBytes();
                    break;
                case DELETE:
                    totalDeleteTimes = stat.getCount();
                    totalDeleteBytes = stat.getBytes();
                    break;
                default:
                    continue;
                }