storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [40/50] storm git commit: Merge branch 'master' into security-upmerge
Date Thu, 13 Nov 2014 19:37:35 GMT
Merge branch 'master' into security-upmerge

Conflicts:
	storm-core/src/jvm/backtype/storm/messaging/netty/Client.java
	storm-core/src/jvm/backtype/storm/utils/Utils.java
	storm-core/src/ui/public/templates/component-page-template.html
	storm-core/src/ui/public/templates/index-page-template.html
	storm-core/src/ui/public/templates/topology-page-template.html


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/154ec7b6
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/154ec7b6
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/154ec7b6

Branch: refs/heads/master
Commit: 154ec7b6daec34c6289eaed1846d6bfba809f6ab
Parents: aa6e7ed cfcedcf
Author: Robert (Bobby) Evans <evans@yahoo-inc.com>
Authored: Wed Sep 24 12:55:04 2014 -0500
Committer: Robert (Bobby) Evans <evans@yahoo-inc.com>
Committed: Wed Sep 24 12:55:04 2014 -0500

----------------------------------------------------------------------
 CHANGELOG.md                                    |  14 +
 DEVELOPER.md                                    |   2 +-
 LICENSE                                         |  25 +
 README.markdown                                 |   5 +-
 STORM-UI-REST-API.md                            |   4 +-
 dev-tools/jira-github-join.py                   |   2 +-
 .../multilang/resources/asyncSplitsentence.js   |  32 +
 .../multilang/resources/randomsentence.js       |  75 +++
 .../multilang/resources/splitsentence.js        |  26 +
 .../storm-starter/multilang/resources/storm.js  | 349 +++++++++++
 .../storm/starter/WordCountTopologyNode.java    | 121 ++++
 .../src/jvm/storm/kafka/KafkaUtils.java         |   5 +-
 .../src/jvm/storm/kafka/PartitionManager.java   |   5 +-
 pom.xml                                         |   2 +-
 storm-core/pom.xml                              |  53 +-
 .../src/clj/backtype/storm/daemon/nimbus.clj    |   4 +-
 storm-core/src/clj/backtype/storm/util.clj      |   2 +-
 storm-core/src/dev/resources/storm.js           | 349 +++++++++++
 storm-core/src/dev/resources/tester_bolt.js     |  27 +
 storm-core/src/dev/resources/tester_spout.js    |  58 ++
 .../src/jvm/backtype/storm/StormSubmitter.java  |  17 +
 .../backtype/storm/messaging/netty/Client.java  |  27 +-
 .../storm/security/auth/TBackoffConnect.java    |  10 +-
 .../StormBoundedExponentialBackoffRetry.java    |  74 +++
 .../src/jvm/backtype/storm/utils/Utils.java     |  33 +-
 storm-core/src/ui/public/component.html         |   6 +
 storm-core/src/ui/public/images/spinner.gif     | Bin 0 -> 23470 bytes
 storm-core/src/ui/public/index.html             |   6 +
 .../src/ui/public/js/jquery.blockUI.min.js      |   6 +
 storm-core/src/ui/public/js/script.js           |  11 +
 storm-core/src/ui/public/js/visualization.js    |  16 +-
 .../templates/component-page-template.html      | 593 ++++++++++++++-----
 .../public/templates/index-page-template.html   | 243 ++++++--
 .../templates/topology-page-template.html       | 208 ++++++-
 storm-core/src/ui/public/topology.html          |   6 +
 .../test/clj/backtype/storm/multilang_test.clj  |  55 +-
 .../test/clj/backtype/storm/utils_test.clj      |   3 +-
 ...StormBoundedExponentialBackoffRetryTest.java | 101 ++++
 38 files changed, 2259 insertions(+), 316 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/154ec7b6/README.markdown
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/storm/blob/154ec7b6/STORM-UI-REST-API.md
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/storm/blob/154ec7b6/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/storm/blob/154ec7b6/storm-core/pom.xml
----------------------------------------------------------------------
diff --cc storm-core/pom.xml
index 649b183,4c72498..95b634f
--- a/storm-core/pom.xml
+++ b/storm-core/pom.xml
@@@ -58,22 -53,14 +58,28 @@@
          <dependency>
              <groupId>ring</groupId>
              <artifactId>ring-jetty-adapter</artifactId>
+             <exclusions>
+                 <exclusion>
+                     <groupId>org.mortbay.jetty</groupId>
+                     <artifactId>servlet-api</artifactId>
+                 </exclusion>
+             </exclusions>
          </dependency>
          <dependency>
 +            <groupId>ring</groupId>
 +            <artifactId>ring-anti-forgery</artifactId>
 +            <version>1.0.0</version>
 +        </dependency>
 +
 +        <dependency>
 +            <groupId>org.eclipse.jetty</groupId>
 +            <artifactId>jetty-servlet</artifactId>
 +        </dependency>
 +        <dependency>
 +            <groupId>org.eclipse.jetty</groupId>
 +            <artifactId>jetty-servlets</artifactId>
 +        </dependency>
 +        <dependency>
              <groupId>org.clojure</groupId>
              <artifactId>tools.logging</artifactId>
          </dependency>

http://git-wip-us.apache.org/repos/asf/storm/blob/154ec7b6/storm-core/src/clj/backtype/storm/daemon/nimbus.clj
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/storm/blob/154ec7b6/storm-core/src/clj/backtype/storm/util.clj
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/storm/blob/154ec7b6/storm-core/src/jvm/backtype/storm/StormSubmitter.java
----------------------------------------------------------------------
diff --cc storm-core/src/jvm/backtype/storm/StormSubmitter.java
index d5da103,282c828..54cc701
--- a/storm-core/src/jvm/backtype/storm/StormSubmitter.java
+++ b/storm-core/src/jvm/backtype/storm/StormSubmitter.java
@@@ -158,6 -71,22 +158,23 @@@ public class StormSubmitter 
      }    
  
      /**
+      * Submits a topology to run on the cluster. A topology runs forever or until 
+      * explicitly killed.
+      *
+      * @param name the name of the storm.
+      * @param stormConf the topology-specific configuration. See {@link Config}. 
+      * @param topology the processing to execute.
+      * @param opts to manipulate the starting of the topology.
+      * @throws AlreadyAliveException if a topology with this name is already running
+      * @throws InvalidTopologyException if an invalid topology was submitted
++     * @throws AuthorizationException if authorization is failed
+      */
+     public static void submitTopology(String name, Map stormConf, StormTopology topology,
SubmitOptions opts) 
 -            throws AlreadyAliveException, InvalidTopologyException {
++            throws AlreadyAliveException, InvalidTopologyException, AuthorizationException
{
+         submitTopology(name, stormConf, topology, opts, null);
+     }
+ 
+     /**
       * Submits a topology to run on the cluster. A topology runs forever or until
       * explicitly killed.
       *

http://git-wip-us.apache.org/repos/asf/storm/blob/154ec7b6/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java
----------------------------------------------------------------------
diff --cc storm-core/src/jvm/backtype/storm/messaging/netty/Client.java
index 5440259,fed684e..4c4b092
--- a/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java
+++ b/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java
@@@ -28,19 -40,6 +28,20 @@@ import java.util.concurrent.TimeUnit
  import java.util.concurrent.atomic.AtomicLong;
  import java.util.concurrent.atomic.AtomicReference;
  
 +import org.jboss.netty.bootstrap.ClientBootstrap;
 +import org.jboss.netty.channel.Channel;
 +import org.jboss.netty.channel.ChannelFactory;
 +import org.jboss.netty.channel.ChannelFuture;
 +import org.jboss.netty.channel.ChannelFutureListener;
 +import org.slf4j.Logger;
 +import org.slf4j.LoggerFactory;
 +
 +import backtype.storm.Config;
 +import backtype.storm.messaging.IConnection;
 +import backtype.storm.messaging.TaskMessage;
++import backtype.storm.utils.StormBoundedExponentialBackoffRetry;
 +import backtype.storm.utils.Utils;
 +
  public class Client implements IConnection {
      private static final Logger LOG = LoggerFactory.getLogger(Client.class);
      private static final String PREFIX = "Netty-Client-";

http://git-wip-us.apache.org/repos/asf/storm/blob/154ec7b6/storm-core/src/jvm/backtype/storm/security/auth/TBackoffConnect.java
----------------------------------------------------------------------
diff --cc storm-core/src/jvm/backtype/storm/security/auth/TBackoffConnect.java
index b50ae6e,0000000..eaed61f
mode 100644,000000..100644
--- a/storm-core/src/jvm/backtype/storm/security/auth/TBackoffConnect.java
+++ b/storm-core/src/jvm/backtype/storm/security/auth/TBackoffConnect.java
@@@ -1,77 -1,0 +1,77 @@@
 +/**
 + * 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 backtype.storm.security.auth;
 +
 +import java.io.IOException;
 +import java.util.Random;
 +import org.apache.thrift.transport.TTransport;
 +import org.apache.thrift.transport.TTransportException;
 +import org.slf4j.Logger;
 +import org.slf4j.LoggerFactory;
- import backtype.storm.utils.Utils.BoundedExponentialBackoffRetry;
++import backtype.storm.utils.StormBoundedExponentialBackoffRetry;
 +
 +public class TBackoffConnect {
 +    private static final Logger LOG = LoggerFactory.getLogger(TBackoffConnect.class);
 +    private int _completedRetries = 0;
 +    private int _retryTimes;
-     private BoundedExponentialBackoffRetry waitGrabber;
++    private StormBoundedExponentialBackoffRetry waitGrabber;
 +
 +    public TBackoffConnect(int retryTimes, int retryInterval, int retryIntervalCeiling)
{
 +
 +        _retryTimes = retryTimes;
-         waitGrabber = new BoundedExponentialBackoffRetry(retryInterval,
-                                                          retryTimes,
-                                                          retryIntervalCeiling);
++        waitGrabber = new StormBoundedExponentialBackoffRetry(retryInterval,
++                                                              retryIntervalCeiling,
++                                                              retryTimes);
 +    }
 +
 +    public TTransport doConnectWithRetry(ITransportPlugin transportPlugin, TTransport underlyingTransport,
String host) throws IOException {
 +        boolean connected = false;
 +        TTransport transportResult = null;
 +        while(!connected) {
 +            try {
 +                transportResult = transportPlugin.connect(underlyingTransport, host);
 +                connected = true;
 +            } catch (TTransportException ex) {
 +                retryNext(ex);
 +            }
 +        }
 +        return transportResult;
 +    }
 +
 +    private void retryNext(TTransportException ex) {
 +        if(!canRetry()) {
 +            throw new RuntimeException(ex);
 +        }
 +        try {
 +            int sleeptime = waitGrabber.getSleepTimeMs(_completedRetries, 0);
 +
 +            LOG.debug("Failed to connect. Retrying... (" + Integer.toString( _completedRetries)
+ ") in " + Integer.toString(sleeptime) + "ms");
 +
 +            Thread.sleep(sleeptime);
 +        } catch (InterruptedException e) {
 +            LOG.info("Nimbus connection retry interrupted.");
 +        }
 +
 +        _completedRetries++;
 +    }
 +
 +    private boolean canRetry() {
 +        return (_completedRetries < _retryTimes);
 +    }
 +}

http://git-wip-us.apache.org/repos/asf/storm/blob/154ec7b6/storm-core/src/jvm/backtype/storm/utils/Utils.java
----------------------------------------------------------------------
diff --cc storm-core/src/jvm/backtype/storm/utils/Utils.java
index 6d31d28,0e44479..6e8458a
--- a/storm-core/src/jvm/backtype/storm/utils/Utils.java
+++ b/storm-core/src/jvm/backtype/storm/utils/Utils.java
@@@ -47,15 -46,11 +47,14 @@@ import backtype.storm.serialization.Def
  import backtype.storm.serialization.SerializationDelegate;
  import org.apache.curator.framework.CuratorFramework;
  import org.apache.curator.framework.CuratorFrameworkFactory;
- import org.apache.curator.retry.ExponentialBackoffRetry;
  import org.apache.commons.lang.StringUtils;
  import org.apache.thrift.TException;
 +import org.apache.zookeeper.ZooDefs;
 +import org.apache.zookeeper.data.ACL;
 +import org.apache.zookeeper.data.Id;
 +import org.json.simple.JSONValue;
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
 -import org.json.simple.JSONValue;
  import org.yaml.snakeyaml.Yaml;
  import org.yaml.snakeyaml.constructor.SafeConstructor;
  
@@@ -347,27 -338,9 +346,8 @@@ public class Utils 
          return UUID.randomUUID().getLeastSignificantBits();
      }
      
-     public static class BoundedExponentialBackoffRetry extends ExponentialBackoffRetry {
- 
-         protected final int maxRetryInterval;
- 
-         public BoundedExponentialBackoffRetry(int baseSleepTimeMs, 
-                 int maxRetries, int maxSleepTimeMs) {
-             super(baseSleepTimeMs, maxRetries);
-             this.maxRetryInterval = maxSleepTimeMs;
-         }
- 
-         public int getMaxRetryInterval() {
-             return this.maxRetryInterval;
-         }
- 
-         @Override
-         public int getSleepTimeMs(int count, long elapsedMs)
-         {
-             return Math.min(maxRetryInterval,
-                     super.getSleepTimeMs(count, elapsedMs));
-         }
- 
 -    
+     public static CuratorFramework newCurator(Map conf, List<String> servers, Object
port, String root) {
+         return newCurator(conf, servers, port, root, null);
      }
  
      public static CuratorFramework newCurator(Map conf, List<String> servers, Object
port, String root, ZookeeperAuthInfo auth) {
@@@ -376,33 -349,26 +356,34 @@@
              serverPorts.add(zkServer + ":" + Utils.getInt(port));
          }
          String zkStr = StringUtils.join(serverPorts, ",") + root;
 -        CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder()
 -                .connectString(zkStr)
 -                .connectionTimeoutMs(Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_CONNECTION_TIMEOUT)))
 -                .sessionTimeoutMs(Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_SESSION_TIMEOUT)))
 -                .retryPolicy(new StormBoundedExponentialBackoffRetry(
 -                            Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_RETRY_INTERVAL)),
 -                            Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_RETRY_INTERVAL_CEILING)),
 -                            Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_RETRY_TIMES))));
 -        if(auth!=null && auth.scheme!=null) {
 +        CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder();
 +
 +        setupBuilder(builder, zkStr, conf, auth);
 +        
 +        return builder.build();
 +    }
 +
 +    protected static void setupBuilder(CuratorFrameworkFactory.Builder builder, String zkStr,
Map conf, ZookeeperAuthInfo auth)
 +    {
 +        builder.connectString(zkStr)
 +            .connectionTimeoutMs(Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_CONNECTION_TIMEOUT)))
 +            .sessionTimeoutMs(Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_SESSION_TIMEOUT)))
-             .retryPolicy(new BoundedExponentialBackoffRetry(
-                             Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_RETRY_INTERVAL)),
-                             Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_RETRY_TIMES)),
-                             Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_RETRY_INTERVAL_CEILING))));
++            .retryPolicy(new StormBoundedExponentialBackoffRetry(
++                        Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_RETRY_INTERVAL)),
++                        Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_RETRY_INTERVAL_CEILING)),
++                        Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_RETRY_TIMES))));
++
 +        if(auth!=null && auth.scheme!=null && auth.payload!=null) {
              builder = builder.authorization(auth.scheme, auth.payload);
          }
 -        return builder.build();
      }
  
 -    public static CuratorFramework newCurator(Map conf, List<String> servers, Object
port) {
 -        return newCurator(conf, servers, port, "");
 +    public static CuratorFramework newCurator(Map conf, List<String> servers, Object
port, ZookeeperAuthInfo auth) {
 +        return newCurator(conf, servers, port, "", auth);
      }
  
 -    public static CuratorFramework newCuratorStarted(Map conf, List<String> servers,
Object port, String root) {
 -        CuratorFramework ret = newCurator(conf, servers, port, root);
 +    public static CuratorFramework newCuratorStarted(Map conf, List<String> servers,
Object port, String root, ZookeeperAuthInfo auth) {
 +        CuratorFramework ret = newCurator(conf, servers, port, root, auth);
          ret.start();
          return ret;
      }

http://git-wip-us.apache.org/repos/asf/storm/blob/154ec7b6/storm-core/src/ui/public/component.html
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/storm/blob/154ec7b6/storm-core/src/ui/public/index.html
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/storm/blob/154ec7b6/storm-core/src/ui/public/js/script.js
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/storm/blob/154ec7b6/storm-core/src/ui/public/templates/index-page-template.html
----------------------------------------------------------------------
diff --cc storm-core/src/ui/public/templates/index-page-template.html
index dfe9446,d249fac..800b579
--- a/storm-core/src/ui/public/templates/index-page-template.html
+++ b/storm-core/src/ui/public/templates/index-page-template.html
@@@ -31,48 -75,103 +75,115 @@@
  </table>
  </script>
  <script id="topology-summary-template" type="text/html">
- <table class="zebra-striped" id="topology-summary-table">
- <thead><tr>
-     <th><span class="tip right" title="The name given to the topology by when it
was submitted. Click the name to view the Topology's information.">Name</span></th>
-     <th><span class="tip right" title="The unique ID given to a Topology each time
it is launched.">Id</span></th>
-     <th><span class="tip above" title="The user that submitted the Topology, if
authentication is enabled.">Owner</span></th>
-     <th><span class="tip above" title="The status can be one of ACTIVE, INACTIVE,
KILLED, or REBALANCING.">Status</span></th>
-     <th><span class="tip above" title="The time since the Topology was submitted.">Uptime</span></th>
-     <th><span class="tip above" title="The number of Workers (processes).">Num
workers</span></th>
-     <th><span class="tip above" title="Executors are threads in a Worker process.">Num
executors</span></th>
-     <th><span class="tip above" title="A Task is an instance of a Bolt or Spout.
The number of Tasks is almost always equal to the number of Executors.">Num tasks</span></th>
-     <th><span class="tip left" title="This shows information from the scheduler
about the latest attempt to schedule the Topology on the cluster.">Scheduler Info</span></th>
- </tr></thead>
- <tbody>
- {{#topologies}}
- <tr>
-   <td><a href="/topology.html?id={{id}}">{{name}}</a></td>
-   <td>{{id}}</td>
-   <td>{{owner}}</td>
-   <td>{{status}}</td>
-   <td>{{uptime}}</td>
-   <td>{{workersTotal}}</td>
-   <td>{{executorsTotal}}</td>
-   <td>{{tasksTotal}}</td>
-   <td>{{schedulerInfo}}</td>
- </tr>
- {{/topologies}}
- </tbody>
- </table>
+   <table class="zebra-striped" id="topology-summary-table">
+     <thead>
+       <tr>
+         <th>
+           <span class="tip right" title="The name given to the topology by when it was
submitted. Click the name to view the Topology's information.">
+             Name
+           </span>
+         </th>
+         <th>
+           <span class="tip right" title="The unique ID given to a Topology each time
it is launched.">
+             Id
+           </span>
+         </th>
+         <th>
++          <span class="tip above" title="The user that submitted the Topology, if authentication
is enabled.">
++            Owner
++          </span>
++        </th>
++        <th>
+           <span class="tip above" title="The status can be one of ACTIVE, INACTIVE, KILLED,
or REBALANCING.">
+             Status
+           </span>
+         </th>
+         <th>
+           <span class="tip above" title="The time since the Topology was submitted.">
+             Uptime
+           </span>
+         </th>
+         <th>
+           <span class="tip above" title="The number of Workers (processes).">
+             Num workers
+           </span>
+         </th>
+         <th>
+           <span class="tip above" title="Executors are threads in a Worker process.">
+             Num executors
+           </span>
+         </th>
+         <th>
+           <span class="tip above" title="A Task is an instance of a Bolt or Spout. The
number of Tasks is almost always equal to the number of Executors.">
+             Num tasks
+           </span>
+         </th>
++        <th>
++          <span class="tip left" title="This shows information from the scheduler about
the latest attempt to schedule the Topology on the cluster.">
++            Scheduler Info
++          </span>
++        </th>
+       </tr>
+     </thead>
+     <tbody>
+       {{#topologies}}
+       <tr>
+         <td><a href="/topology.html?id={{id}}">{{name}}</a></td>
+         <td>{{id}}</td>
++        <td>{{owner}}</td>
+         <td>{{status}}</td>
+         <td>{{uptime}}</td>
+         <td>{{workersTotal}}</td>
+         <td>{{executorsTotal}}</td>
+         <td>{{tasksTotal}}</td>
++        <td>{{schedulerInfo}}</td>
+       </tr>
+       {{/topologies}}
+     </tbody>
+   </table>
  </script>
  <script id="supervisor-summary-template" type="text/html">
- <table class="zebra-striped" id="supervisor-summary-table"><thead><tr><th><span
class="tip right" title="A unique identifier given to a Supervisor when it joins the cluster.">Id</span></th><th><span
class="tip above" title="The hostname reported by the remote host. (Note that this hostname
is not the result of a reverse lookup at the Nimbus node.)">Host</span></th><th><span
class="tip above" title="The length of time a Supervisor has been registered to the cluster.">Uptime</span></th><th><span
class="tip above" title="Slots are Workers (processes).">Slots</span></th><th><span
class="tip left" title="Slots are Workers (processes).">Used slots</span></th></tr></thead>
- <tbody>
- {{#supervisors}}
- <tr>
-   <td>{{id}}</td>
-   <td>{{host}}</td>
-   <td>{{uptime}}</td>
-   <td>{{slotsTotal}}</td>
-   <td>{{slotsUsed}}</td>
- </tr>
- {{/supervisors}}
- </tbody>
+ <table class="zebra-striped" id="supervisor-summary-table">
+   <thead>
+     <tr>
+       <th>
+         <span class="tip right" title="A unique identifier given to a Supervisor when
it joins the cluster.">
+           Id
+         </span>
+       </th>
+       <th>
+         <span class="tip above" title="The hostname reported by the remote host. (Note
that this hostname is not the result of a reverse lookup at the Nimbus node.)">
+           Host
+         </span>
+       </th>
+       <th>
+         <span class="tip above" title="The length of time a Supervisor has been registered
to the cluster.">
+           Uptime
+         </span>
+       </th>
+       <th>
+         <span class="tip above" title="Slots are Workers (processes).">
+           Slots
+         </span>
+       </th>
+       <th>
+         <span class="tip left" title="Slots are Workers (processes).">
+           Used slots
+         </span>
+       </th>
+     </tr>
+   </thead>
+   <tbody>
+     {{#supervisors}}
+     <tr>
+       <td>{{id}}</td>
+       <td>{{host}}</td>
+       <td>{{uptime}}</td>
+       <td>{{slotsTotal}}</td>
+       <td>{{slotsUsed}}</td>
+     </tr>
+     {{/supervisors}}
+   </tbody>
  </table>
  </script>
  

http://git-wip-us.apache.org/repos/asf/storm/blob/154ec7b6/storm-core/src/ui/public/templates/topology-page-template.html
----------------------------------------------------------------------
diff --cc storm-core/src/ui/public/templates/topology-page-template.html
index d442107,b977071..f8676db
--- a/storm-core/src/ui/public/templates/topology-page-template.html
+++ b/storm-core/src/ui/public/templates/topology-page-template.html
@@@ -16,17 -16,45 +16,55 @@@
  -->
  <script id="topology-summary-template" type="text/html">
    <table id="topology-summary-table">
-     <thead><tr>
-       <th><span class="tip right" title="The name given to the topology by when
it was submitted.">Name</span></th>
-       <th><span class="tip right" title="The unique ID given to a Topology each
time it is launched.">Id</span></th>
-       <th><span class="tip above" title="The user that submitted the Topology,
if authentication is enabled.">Owner</span></th>
-       <th><span class="tip above" title="The status can be one of ACTIVE, INACTIVE,
KILLED, or REBALANCING.">Status</span></th>
-       <th><span class="tip above" title="The time since the Topology was submitted.">Uptime</span></th>
-       <th><span class="tip above" title="The number of Workers (processes).">Num
workers</span></th>
-       <th><span class="tip above" title="Executors are threads in a Worker process.">Num
executors</span></th>
-       <th><span class="tip above" title="A Task is an instance of a Bolt or Spout.
The number of Tasks is almost always equal to the number of Executors.">Num tasks</span></th>
-       <th><span class="tip left" title="This shows information from the scheduler
about the latest attempt to schedule the Topology on the cluster.">Scheduler Info</span></th>
-     </tr></thead>
+     <thead>
+       <tr>
+         <th>
+           <span class="tip right" title="The name given to the topology by when it was
submitted.">
+             Name
+           </span>
+         </th>
+         <th>
+           <span class="tip right" title="The unique ID given to a Topology each time
it is launched.">
+             Id
+           </span>
+         </th>
+         <th>
++          <span class="tip above" title="The user that submitted the Topology, if authentication
is enabled.">
++            Owner
++          </span>
++        </th>
++        <th>
+           <span class="tip above" title="The status can be one of ACTIVE, INACTIVE, KILLED,
or REBALANCING.">
+             Status
+           </span>
+         </th>
+         <th>
+           <span class="tip above" title="The time since the Topology was submitted.">
+             Uptime
+           </span>
+         </th>
+         <th>
+           <span class="tip above" title="The number of Workers (processes).">
+             Num workers
+           </span>
+         </th>
+         <th>
+           <span class="tip above" title="Executors are threads in a Worker process.">
+             Num executors
+           </span>
+         </th>
+         <th>
+           <span class="tip above" title="A Task is an instance of a Bolt or Spout. The
number of Tasks is almost always equal to the number of Executors.">
+             Num tasks
+           </span>
+         </th>
++        <th>
++          <span class="tip left" title="This shows information from the scheduler about
the latest attempt to schedule the Topology on the cluster.">
++            Scheduler Info
++          </span>
++        </th>
+       </tr>
+     </thead>
      <tbody>
        <tr>
          <td>{{name}}</td>
@@@ -36,8 -63,7 +74,8 @@@
          <td>{{uptime}}</td>
          <td>{{workersTotal}}</td>
          <td>{{executorsTotal}}</td>
-         <td>{{schedulerInfo}}</td>
          <td>{{tasksTotal}}</td>
++        <td>{{schedulerInfo}}</td>
        </tr>
      </tbody>
    </table>

http://git-wip-us.apache.org/repos/asf/storm/blob/154ec7b6/storm-core/src/ui/public/topology.html
----------------------------------------------------------------------
diff --cc storm-core/src/ui/public/topology.html
index 805b6b4,9d53144..f1e6b0c
--- a/storm-core/src/ui/public/topology.html
+++ b/storm-core/src/ui/public/topology.html
@@@ -52,10 -55,12 +54,14 @@@
  <p id="toggle-switch" style="display: block;" class="js-only"></p>
  <div id="json-response-error">
  </div>
 +<div id="anti-forgery-token" class="anti-forgery-token">
 +</div>
  </body>
  <script>
+ $(document).ajaxStop($.unblockUI);
+ $(document).ajaxStart(function(){
+     $.blockUI({ message: '<img src="images/spinner.gif" /> <h3>Loading topology
summary...</h3>'});
+ });
  $(document).ready(function() {
      var topologyId = $.url().param("id");
      var window = $.url().param("window");

http://git-wip-us.apache.org/repos/asf/storm/blob/154ec7b6/storm-core/test/clj/backtype/storm/utils_test.clj
----------------------------------------------------------------------


Mime
View raw message