storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [2/6] storm git commit: Few fixes
Date Fri, 02 Jun 2017 15:55:06 GMT
Few fixes


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

Branch: refs/heads/master
Commit: 2570f4e18f27d601a784f8d722078b74eadfe5d5
Parents: c46b49a
Author: Sumedh Shekhar <sumedhhere@gmail.com>
Authored: Tue May 30 02:03:49 2017 +0530
Committer: Sumedh Shekhar <sumedhhere@gmail.com>
Committed: Tue May 30 02:03:49 2017 +0530

----------------------------------------------------------------------
 bin/storm.py                                          |  2 +-
 .../java/org/apache/storm/daemon/drpc/DRPCServer.java | 14 +++++++-------
 .../storm/daemon/drpc/webapp/DRPCApplication.java     | 10 +++++-----
 .../storm/daemon/drpc/webapp/DRPCExceptionMapper.java |  2 +-
 .../apache/storm/daemon/drpc/webapp/DRPCResource.java |  4 ++--
 .../org/apache/storm/daemon/drpc/DRPCServerTest.java  | 12 ++++++------
 6 files changed, 22 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/2570f4e1/bin/storm.py
----------------------------------------------------------------------
diff --git a/bin/storm.py b/bin/storm.py
index 3ba8c85..521895b 100755
--- a/bin/storm.py
+++ b/bin/storm.py
@@ -796,7 +796,7 @@ def drpc():
     allextrajars = get_wildcard_dir(STORM_WEBAPP_LIB_DIR)
     allextrajars.append(CLUSTER_CONF_DIR)
     exec_storm_class(
-        "org.apache.storm.daemon.drpc.DrpcServer",
+        "org.apache.storm.daemon.drpc.DRPCServer",
         jvmtype="-server",
         daemonName="drpc",
         jvmopts=jvmopts,

http://git-wip-us.apache.org/repos/asf/storm/blob/2570f4e1/storm-webapp/src/main/java/org/apache/storm/daemon/drpc/DRPCServer.java
----------------------------------------------------------------------
diff --git a/storm-webapp/src/main/java/org/apache/storm/daemon/drpc/DRPCServer.java b/storm-webapp/src/main/java/org/apache/storm/daemon/drpc/DRPCServer.java
index 1f13903..472df8d 100644
--- a/storm-webapp/src/main/java/org/apache/storm/daemon/drpc/DRPCServer.java
+++ b/storm-webapp/src/main/java/org/apache/storm/daemon/drpc/DRPCServer.java
@@ -27,7 +27,7 @@ import java.util.Map;
 
 import org.apache.storm.Config;
 import org.apache.storm.DaemonConfig;
-import org.apache.storm.daemon.drpc.webapp.DrpcApplication;
+import org.apache.storm.daemon.drpc.webapp.DRPCApplication;
 import org.apache.storm.daemon.drpc.webapp.ReqContextFilter;
 import org.apache.storm.generated.DistributedRPC;
 import org.apache.storm.generated.DistributedRPCInvocations;
@@ -49,8 +49,8 @@ import org.glassfish.jersey.servlet.ServletContainer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class DrpcServer implements AutoCloseable {
-    private static final Logger LOG = LoggerFactory.getLogger(DrpcServer.class);
+public class DRPCServer implements AutoCloseable {
+    private static final Logger LOG = LoggerFactory.getLogger(DRPCServer.class);
     private static final Meter meterShutdownCalls = StormMetricsRegistry.registerMeter("drpc:num-shutdown-calls");
    
     //TODO in the future this might be better in a common webapp location
@@ -103,7 +103,7 @@ public class DrpcServer implements AutoCloseable {
             final Boolean httpsNeedClientAuth = (Boolean) (conf.get(DaemonConfig.DRPC_HTTPS_NEED_CLIENT_AUTH));
 
             //TODO a better way to do this would be great.
-            DrpcApplication.setup(drpc);
+            DRPCApplication.setup(drpc);
             ret = UIHelpers.jettyCreateServer(drpcHttpPort, null, httpsPort);
             
             UIHelpers.configSsl(ret, httpsPort, httpsKsPath, httpsKsPassword, httpsKsType,
httpsKeyPassword,
@@ -115,7 +115,7 @@ public class DrpcServer implements AutoCloseable {
 
             ServletHolder jerseyServlet = context.addServlet(ServletContainer.class, "/*");
             jerseyServlet.setInitOrder(1);
-            jerseyServlet.setInitParameter("javax.ws.rs.Application", DrpcApplication.class.getName());
+            jerseyServlet.setInitParameter("javax.ws.rs.Application", DRPCApplication.class.getName());
             
             UIHelpers.configFilters(context, filterConfigurations);
             addRequestContextFilter(context, Config.DRPC_HTTP_CREDS_PLUGIN, conf);
@@ -134,7 +134,7 @@ public class DrpcServer implements AutoCloseable {
      * Constructor.
      * @param conf Drpc conf dor the servers
      */
-    public DrpcServer(Map<String, Object> conf) {
+    public DRPCServer(Map<String, Object> conf) {
         drpc = new DRPC(conf);
         DRPCThrift thrift = new DRPCThrift(drpc);
         handlerServer = mkHandlerServer(thrift, ObjectReader.getInt(conf.get(Config.DRPC_PORT),
null), conf);
@@ -219,7 +219,7 @@ public class DrpcServer implements AutoCloseable {
     public static void main(String [] args) throws Exception {
         Utils.setupDefaultUncaughtExceptionHandler();
         Map<String, Object> conf = Utils.readStormConfig();
-        try (DrpcServer server = new DrpcServer(conf)) {
+        try (DRPCServer server = new DRPCServer(conf)) {
             Utils.addShutdownHookWithForceKillIn1Sec(() -> server.close());
             StormMetricsRegistry.startMetricsReporters(conf);
             server.start();

http://git-wip-us.apache.org/repos/asf/storm/blob/2570f4e1/storm-webapp/src/main/java/org/apache/storm/daemon/drpc/webapp/DRPCApplication.java
----------------------------------------------------------------------
diff --git a/storm-webapp/src/main/java/org/apache/storm/daemon/drpc/webapp/DRPCApplication.java
b/storm-webapp/src/main/java/org/apache/storm/daemon/drpc/webapp/DRPCApplication.java
index 5dc31ab..0074b05 100644
--- a/storm-webapp/src/main/java/org/apache/storm/daemon/drpc/webapp/DRPCApplication.java
+++ b/storm-webapp/src/main/java/org/apache/storm/daemon/drpc/webapp/DRPCApplication.java
@@ -27,18 +27,18 @@ import javax.ws.rs.core.Application;
 import org.apache.storm.daemon.drpc.DRPC;
 
 @ApplicationPath("")
-public class DrpcApplication extends Application {
+public class DRPCApplication extends Application {
     private static DRPC _drpc;
     private final Set<Object> singletons = new HashSet<Object>();
 
     /**
      * Constructor.
-     * Creates new instance of DrpcResource, DrpcExceptionMapper and AuthorizationExceptionMapper
+     * Creates new instance of DRPCResource, DRPCExceptionMapper and AuthorizationExceptionMapper
      * and adds them to a set which can be retrieved later.
      */
-    public DrpcApplication() {
-        singletons.add(new DrpcResource(_drpc));
-        singletons.add(new DrpcExceptionMapper());
+    public DRPCApplication() {
+        singletons.add(new DRPCResource(_drpc));
+        singletons.add(new DRPCExceptionMapper());
         singletons.add(new AuthorizationExceptionMapper());
     }
     

http://git-wip-us.apache.org/repos/asf/storm/blob/2570f4e1/storm-webapp/src/main/java/org/apache/storm/daemon/drpc/webapp/DRPCExceptionMapper.java
----------------------------------------------------------------------
diff --git a/storm-webapp/src/main/java/org/apache/storm/daemon/drpc/webapp/DRPCExceptionMapper.java
b/storm-webapp/src/main/java/org/apache/storm/daemon/drpc/webapp/DRPCExceptionMapper.java
index 829e1db..98876a9 100644
--- a/storm-webapp/src/main/java/org/apache/storm/daemon/drpc/webapp/DRPCExceptionMapper.java
+++ b/storm-webapp/src/main/java/org/apache/storm/daemon/drpc/webapp/DRPCExceptionMapper.java
@@ -30,7 +30,7 @@ import org.apache.storm.generated.DRPCExecutionException;
 import org.json.simple.JSONValue;
 
 @Provider
-public class DrpcExceptionMapper implements ExceptionMapper<DRPCExecutionException>
{
+public class DRPCExceptionMapper implements ExceptionMapper<DRPCExecutionException>
{
 
     @Override
     public Response toResponse(DRPCExecutionException ex) {

http://git-wip-us.apache.org/repos/asf/storm/blob/2570f4e1/storm-webapp/src/main/java/org/apache/storm/daemon/drpc/webapp/DRPCResource.java
----------------------------------------------------------------------
diff --git a/storm-webapp/src/main/java/org/apache/storm/daemon/drpc/webapp/DRPCResource.java
b/storm-webapp/src/main/java/org/apache/storm/daemon/drpc/webapp/DRPCResource.java
index 04c190f..9ced5be 100644
--- a/storm-webapp/src/main/java/org/apache/storm/daemon/drpc/webapp/DRPCResource.java
+++ b/storm-webapp/src/main/java/org/apache/storm/daemon/drpc/webapp/DRPCResource.java
@@ -32,11 +32,11 @@ import org.apache.storm.metric.StormMetricsRegistry;
 import org.apache.thrift.TException;
 
 @Path("/drpc/")
-public class DrpcResource {
+public class DRPCResource {
     private static final Meter meterHttpRequests = StormMetricsRegistry.registerMeter("drpc:num-execute-http-requests");
     private final DRPC drpc;
 
-    public DrpcResource(DRPC drpc) {
+    public DRPCResource(DRPC drpc) {
         this.drpc = drpc;
     }
     

http://git-wip-us.apache.org/repos/asf/storm/blob/2570f4e1/storm-webapp/src/test/java/org/apache/storm/daemon/drpc/DRPCServerTest.java
----------------------------------------------------------------------
diff --git a/storm-webapp/src/test/java/org/apache/storm/daemon/drpc/DRPCServerTest.java b/storm-webapp/src/test/java/org/apache/storm/daemon/drpc/DRPCServerTest.java
index d37bade..9ab623f 100644
--- a/storm-webapp/src/test/java/org/apache/storm/daemon/drpc/DRPCServerTest.java
+++ b/storm-webapp/src/test/java/org/apache/storm/daemon/drpc/DRPCServerTest.java
@@ -44,8 +44,8 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 
-public class DrpcServerTest {
-    private static final Logger LOG = LoggerFactory.getLogger(DrpcServerTest.class);
+public class DRPCServerTest {
+    private static final Logger LOG = LoggerFactory.getLogger(DRPCServerTest.class);
     private static final ExecutorService exec = Executors.newCachedThreadPool();
     
     @AfterClass
@@ -87,7 +87,7 @@ public class DrpcServerTest {
     @Test
     public void testGoodThrift() throws Exception {
         Map<String, Object> conf = getConf(0, 0, null);
-        try (DrpcServer server = new DrpcServer(conf)) {
+        try (DRPCServer server = new DRPCServer(conf)) {
             server.start();
             try (DRPCClient client = new DRPCClient(conf, "localhost", server.getDrpcPort());
                  DRPCInvocationsClient invoke = new DRPCInvocationsClient(conf, "localhost",
server.getDrpcInvokePort())) {
@@ -106,7 +106,7 @@ public class DrpcServerTest {
     @Test
     public void testFailedThrift() throws Exception {
         Map<String, Object> conf = getConf(0, 0, null);
-        try (DrpcServer server = new DrpcServer(conf)) {
+        try (DRPCServer server = new DRPCServer(conf)) {
             server.start();
             try (DRPCClient client = new DRPCClient(conf, "localhost", server.getDrpcPort());
                     DRPCInvocationsClient invoke = new DRPCInvocationsClient(conf, "localhost",
server.getDrpcInvokePort())) {
@@ -145,7 +145,7 @@ public class DrpcServerTest {
     public void testGoodHttpGet() throws Exception {
         LOG.info("STARTING HTTP GET TEST...");
         Map<String, Object> conf = getConf(0, 0, 0);
-        try (DrpcServer server = new DrpcServer(conf)) {
+        try (DRPCServer server = new DRPCServer(conf)) {
             server.start();
             //TODO need a better way to do this
             Thread.sleep(2000);
@@ -166,7 +166,7 @@ public class DrpcServerTest {
     public void testFailedHttpGet() throws Exception {
         LOG.info("STARTING HTTP GET (FAIL) TEST...");
         Map<String, Object> conf = getConf(0, 0, 0);
-        try (DrpcServer server = new DrpcServer(conf)) {
+        try (DRPCServer server = new DRPCServer(conf)) {
             server.start();
             //TODO need a better way to do this
             Thread.sleep(2000);


Mime
View raw message