Repository: eagle Updated Branches: refs/heads/master fa713a48e -> 877d3e77b
http://git-wip-us.apache.org/repos/asf/eagle/blob/877d3e77/eagle-topology-check/eagle-topology-app/src/main/resources/META-INF/providers/org.apache.eagle.topology.TopologyCheckAppProvider.xml ---------------------------------------------------------------------- diff --git a/eagle-topology-check/eagle-topology-app/src/main/resources/META-INF/providers/org.apache.eagle.topology.TopologyCheckAppProvider.xml b/eagle-topology-check/eagle-topology-app/src/main/resources/META-INF/providers/org.apache.eagle.topology.TopologyCheckAppProvider.xml index 8aa5d8e..4bdb1c4 100644 --- a/eagle-topology-check/eagle-topology-app/src/main/resources/META-INF/providers/org.apache.eagle.topology.TopologyCheckAppProvider.xml +++ b/eagle-topology-check/eagle-topology-app/src/main/resources/META-INF/providers/org.apache.eagle.topology.TopologyCheckAppProvider.xml @@ -128,6 +128,38 @@ <value></value> </property> + <!-- system instance properties--> + <property> + <name>dataSourceConfig.system.enabled</name> + <displayName>System Topology Check Enabled</displayName> + <description>System topology status check enabled</description> + <value>false</value> + <required>true</required> + </property> + <property> + <name>dataSourceConfig.system.topic</name> + <displayName>System Topology Source Topic</displayName> + <description>System Topology Source Topic</description> + <value>topology_system_${siteId}</value> + </property> + <property> + <name>dataSourceConfig.system.zkConnection</name> + <displayName>System Topology Source Kafka Zookeeper Quorum</displayName> + <value>localhost:2181</value> + <description>System Topology Source Kafka Zookeeper Quorum</description> + </property> + <property> + <name>dataSourceConfig.system.schemeCls</name> + <displayName>System Topology Source Kafka schemeCls</displayName> + <value>storm.kafka.StringScheme</value> + <description>System Topology Source Kafka schemeCls</description> + </property> + <property> + <name>dataSourceConfig.system.dataSendBatchSize</name> + <displayName>System Topology Data Send Batch Size </displayName> + <value>1</value> + <description>System Topology Data Send Batch Size</description> + </property> <!-- data sink configurations --> <property> http://git-wip-us.apache.org/repos/asf/eagle/blob/877d3e77/eagle-topology-check/eagle-topology-entity/src/main/java/org/apache/eagle/topology/TopologyConstants.java ---------------------------------------------------------------------- diff --git a/eagle-topology-check/eagle-topology-entity/src/main/java/org/apache/eagle/topology/TopologyConstants.java b/eagle-topology-check/eagle-topology-entity/src/main/java/org/apache/eagle/topology/TopologyConstants.java index 488d3f9..189af22 100644 --- a/eagle-topology-check/eagle-topology-entity/src/main/java/org/apache/eagle/topology/TopologyConstants.java +++ b/eagle-topology-check/eagle-topology-entity/src/main/java/org/apache/eagle/topology/TopologyConstants.java @@ -22,6 +22,7 @@ import java.util.regex.Pattern; public class TopologyConstants { + public static final String SYSTEM_INSTANCE_SERVICE_NAME = "SystemServiceInstance"; public static final String HDFS_INSTANCE_SERVICE_NAME = "HdfsServiceInstance"; public static final String HBASE_INSTANCE_SERVICE_NAME = "HbaseServiceInstance"; public static final String MR_INSTANCE_SERVICE_NAME = "MRServiceInstance"; @@ -47,6 +48,7 @@ public class TopologyConstants { public static final String HISTORY_SERVER_ROLE = "historyserver"; public static final String REGIONSERVER_ROLE = "regionserver"; public static final String HMASTER_ROLE = "hmaster"; + public static final String SYSTEM_ROLE = "system"; // Status definitions for namenode public static final String NAME_NODE_ACTIVE_STATUS = "active"; http://git-wip-us.apache.org/repos/asf/eagle/blob/877d3e77/eagle-topology-check/eagle-topology-entity/src/main/java/org/apache/eagle/topology/entity/SystemServiceTopologyAPIEntity.java ---------------------------------------------------------------------- diff --git a/eagle-topology-check/eagle-topology-entity/src/main/java/org/apache/eagle/topology/entity/SystemServiceTopologyAPIEntity.java b/eagle-topology-check/eagle-topology-entity/src/main/java/org/apache/eagle/topology/entity/SystemServiceTopologyAPIEntity.java new file mode 100644 index 0000000..119cb46 --- /dev/null +++ b/eagle-topology-check/eagle-topology-entity/src/main/java/org/apache/eagle/topology/entity/SystemServiceTopologyAPIEntity.java @@ -0,0 +1,122 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 org.apache.eagle.topology.entity; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.apache.eagle.log.entity.meta.*; +import org.apache.eagle.topology.TopologyConstants; + + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) +@Table("hadoop_topology") +@ColumnFamily("f") +@Prefix("systemservicestatus") +@Service(TopologyConstants.SYSTEM_INSTANCE_SERVICE_NAME) +@TimeSeries(false) +public class SystemServiceTopologyAPIEntity extends TopologyBaseAPIEntity { + @Column("a") + private String status; + @Column("b") + private String totalMemoryMB; + @Column("c") + private String usedMemoryMB; + @Column("d") + private String totalDiskGB; + @Column("e") + private String usedDiskGB; + @Column("f") + private long lastUpdateTime; + @Column("g") + private String cores; + + private String host; + + public String getHost() { + return host; + } + + public void setHost(String host) { + this.host = host; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + valueChanged("status"); + } + + public String getTotalMemoryMB() { + return totalMemoryMB; + } + + public void setTotalMemoryMB(String totalMemoryMB) { + this.totalMemoryMB = totalMemoryMB; + valueChanged("totalMemoryMB"); + } + + public String getUsedMemoryMB() { + return usedMemoryMB; + } + + public void setUsedMemoryMB(String usedMemoryMB) { + this.usedMemoryMB = usedMemoryMB; + valueChanged("usedMemoryMB"); + } + + public String getTotalDiskGB() { + return totalDiskGB; + } + + public void setTotalDiskGB(String totalDiskGB) { + this.totalDiskGB = totalDiskGB; + valueChanged("totalDiskGB"); + } + + public String getUsedDiskGB() { + return usedDiskGB; + } + + public void setUsedDiskGB(String usedDiskGB) { + this.usedDiskGB = usedDiskGB; + valueChanged("usedDiskGB"); + } + + public long getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + valueChanged("lastUpdateTime"); + } + + public String getCores() { + return cores; + } + + public void setCores(String cores) { + this.cores = cores; + valueChanged("cores"); + } + +} + http://git-wip-us.apache.org/repos/asf/eagle/blob/877d3e77/eagle-topology-check/eagle-topology-entity/src/main/java/org/apache/eagle/topology/entity/TopologyEntityRepository.java ---------------------------------------------------------------------- diff --git a/eagle-topology-check/eagle-topology-entity/src/main/java/org/apache/eagle/topology/entity/TopologyEntityRepository.java b/eagle-topology-check/eagle-topology-entity/src/main/java/org/apache/eagle/topology/entity/TopologyEntityRepository.java index f064edf..4313b10 100644 --- a/eagle-topology-check/eagle-topology-entity/src/main/java/org/apache/eagle/topology/entity/TopologyEntityRepository.java +++ b/eagle-topology-check/eagle-topology-entity/src/main/java/org/apache/eagle/topology/entity/TopologyEntityRepository.java @@ -26,5 +26,7 @@ public class TopologyEntityRepository extends EntityRepository { entitySet.add(HdfsServiceTopologyAPIEntity.class); entitySet.add(MRServiceTopologyAPIEntity.class); entitySet.add(JournalNodeServiceAPIEntity.class); + // for system metric + entitySet.add(SystemServiceTopologyAPIEntity.class); } }
