storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ptgo...@apache.org
Subject [38/50] [abbrv] git commit: Moving chunk size out of configuration into private constant
Date Thu, 20 Mar 2014 21:23:01 GMT
Moving chunk size out of configuration into private constant


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

Branch: refs/heads/master
Commit: 70174deaa758fc1e3f3a881445e8750ae7218b3d
Parents: 0210941
Author: supercargo <adam@acuitysds.com>
Authored: Fri Feb 28 12:35:44 2014 -0500
Committer: supercargo <adam@acuitysds.com>
Committed: Fri Feb 28 12:35:44 2014 -0500

----------------------------------------------------------------------
 conf/defaults.yaml                                    | 1 -
 storm-core/src/jvm/backtype/storm/Config.java         | 6 ------
 storm-core/src/jvm/backtype/storm/StormSubmitter.java | 6 +++---
 3 files changed, 3 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/70174dea/conf/defaults.yaml
----------------------------------------------------------------------
diff --git a/conf/defaults.yaml b/conf/defaults.yaml
index d0b87a0..2dbba24 100644
--- a/conf/defaults.yaml
+++ b/conf/defaults.yaml
@@ -35,7 +35,6 @@ storm.zookeeper.retry.intervalceiling.millis: 30000
 storm.cluster.mode: "distributed" # can be distributed or local
 storm.local.mode.zmq: false
 storm.thrift.transport: "backtype.storm.security.auth.SimpleTransportPlugin"
-storm.thrift.chunk.size: 307200
 storm.messaging.transport: "backtype.storm.messaging.netty.Context"
 
 ### nimbus.* configs are for the master

http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/70174dea/storm-core/src/jvm/backtype/storm/Config.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/Config.java b/storm-core/src/jvm/backtype/storm/Config.java
index 1a308c2..281ae52 100644
--- a/storm-core/src/jvm/backtype/storm/Config.java
+++ b/storm-core/src/jvm/backtype/storm/Config.java
@@ -137,12 +137,6 @@ public class Config extends HashMap<String, Object> {
     public static final Object STORM_THRIFT_TRANSPORT_PLUGIN_SCHEMA = String.class;
 
     /**
-     * The chunk size in bytes to use when sending binary blobs over the Thrift protocol
-     */
-    public static final String STORM_THRIFT_CHUNK_SIZE = "storm.thrift.chunk.size";
-    public static final Object STORM_THRIFT_CHUNK_SIZE_SCHEMA = Number.class;
-    
-    /**
      * The serializer class for ListDelegate (tuple payload). 
      * The default serializer will be ListDelegateSerializer
      */

http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/70174dea/storm-core/src/jvm/backtype/storm/StormSubmitter.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/StormSubmitter.java b/storm-core/src/jvm/backtype/storm/StormSubmitter.java
index b5081e8..26a0a78 100644
--- a/storm-core/src/jvm/backtype/storm/StormSubmitter.java
+++ b/storm-core/src/jvm/backtype/storm/StormSubmitter.java
@@ -37,6 +37,8 @@ import org.json.simple.JSONValue;
 public class StormSubmitter {
     public static Logger LOG = LoggerFactory.getLogger(StormSubmitter.class);    
 
+    private static final int THRIFT_CHUNK_SIZE_BYTES = 307200;
+    
     private static Nimbus.Iface localNimbus = null;
 
     public static void setLocalNimbus(Nimbus.Iface localNimbusHandler) {
@@ -148,13 +150,11 @@ public class StormSubmitter {
             throw new RuntimeException("Must submit topologies using the 'storm' client script
so that StormSubmitter knows which jar to upload.");
         }
         NimbusClient client = NimbusClient.getConfiguredClient(conf);
-        
-        int thriftChunkSize = ((Number) conf.get(Config.STORM_THRIFT_CHUNK_SIZE)).intValue();
 
         try {
             String uploadLocation = client.getClient().beginFileUpload();
             LOG.info("Uploading topology jar " + localJar + " to assigned location: " + uploadLocation);
-            BufferFileInputStream is = new BufferFileInputStream(localJar, thriftChunkSize);
+            BufferFileInputStream is = new BufferFileInputStream(localJar, THRIFT_CHUNK_SIZE_BYTES);
             while(true) {
                 byte[] toSubmit = is.read();
                 if(toSubmit.length==0) break;


Mime
View raw message