Github user jerrypeng commented on a diff in the pull request:
https://github.com/apache/storm/pull/921#discussion_r46720776
--- Diff: storm-core/src/jvm/backtype/storm/scheduler/TopologyDetails.java
---
@@ -433,4 +461,49 @@ private void initConfigs() {
public Double getTopologyWorkerMaxHeapSize() {
return this.topologyWorkerMaxHeapSize;
}
+
+ /**
+ * Get the user that submitted this topology
+ */
+ public String getTopologySubmitter() {
+ String user = (String)
this.topologyConf.get(Config.TOPOLOGY_SUBMITTER_USER);
+ if (user == null || user.equals("")) {
+ LOG.debug("Topology {} submitted by anonymous user",
this.getName());
+ user = "anonymous";
+ }
+ return user;
+ }
+
+ /**
+ * get teh priority of this topology
+ */
+ public int getTopologyPriority() {
+ return this.topologyPriority;
+ }
+
+ /**
+ * Get the timestamp of when this topology was launched
+ */
+ public int getLaunchTime() {
+ return this.launchTime;
+ }
+
+ /**
+ * Get how long this topology has been executing
+ */
+ public int getUpTime() {
+ return Time.currentTimeSecs() - this.launchTime;
+ }
+
+ @Override
+ public String toString() {
+ return "Name: " + this.getName() + " id: " + this.getId() + "
Priority: " + this.getTopologyPriority()
+ + " Uptime: " + this.getUpTime() + " CPU: " +
this.getTotalRequestedCpu()
+ + " Memory: " + (this.getTotalRequestedMemOffHeap() +
this.getTotalRequestedMemOnHeap());
+ }
+
+ @Override
+ public int hashCode() {
--- End diff --
will change
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---