You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2016/01/11 22:01:57 UTC

[2/2] storm git commit: Merge branch 'STORM_SQL_StormPY' of https://github.com/hmcl/storm-apache into PULL-1001

Merge branch 'STORM_SQL_StormPY' of https://github.com/hmcl/storm-apache into PULL-1001

Conflicts:
	bin/storm.py

This closes #1001 Small merge conflict in imports, simple to fix.


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

Branch: refs/heads/master
Commit: c55a028a7ff120d36289a2fdab6e266913efd394
Parents: a4f9f8b e9f7bf0
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Mon Jan 11 15:01:03 2016 -0600
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Mon Jan 11 15:01:03 2016 -0600

----------------------------------------------------------------------
 bin/storm.py | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/c55a028a/bin/storm.py
----------------------------------------------------------------------
diff --cc bin/storm.py
index 80fd958,401d83f..1c099d8
--- a/bin/storm.py
+++ b/bin/storm.py
@@@ -17,13 -17,13 +17,15 @@@
  # limitations under the License.
  
  import os
- import sys
  import random
- import subprocess as sub
  import re
  import shlex
 +import tempfile
 +import uuid
+ import subprocess as sub
+ 
+ import sys
+ 
  try:
      # python 3
      from urllib.parse import quote_plus
@@@ -172,7 -172,7 +174,7 @@@ def print_remoteconfvalue(name)
      print(name + ": " + confvalue(name, [CLUSTER_CONF_DIR]))
  
  def parse_args(string):
--    r"""Takes a string of whitespace-separated tokens and parses it into a list.
++    """Takes a string of whitespace-separated tokens and parses it into a list.
      Whitespace inside tokens may be quoted with single quotes, double quotes or
      backslash (similar to command-line arguments in bash).
  
@@@ -225,32 -220,18 +227,32 @@@ def jar(jarfile, klass, *args)
      Runs the main method of class with the specified arguments.
      The storm jars and configs in ~/.storm are put on the classpath.
      The process is configured so that StormSubmitter
 -    (http://storm.apache.org/apidocs/backtype/storm/StormSubmitter.html)
 +    (http://storm.apache.org/apidocs/org/apache/storm/StormSubmitter.html)
      will upload the jar at topology-jar-path when the topology is submitted.
      """
 -    exec_storm_class(
 -        klass,
 -        jvmtype="-client",
 -        extrajars=[jarfile, USER_CONF_DIR, STORM_BIN_DIR],
 -        args=args,
 -        daemon=False,
 -        jvmopts=JAR_JVM_OPTS + ["-Dstorm.jar=" + jarfile])
 +    transform_class = confvalue("client.jartransformer.class", [CLUSTER_CONF_DIR])
 +    if (transform_class != None and transform_class != "nil"):
 +        tmpjar = os.path.join(tempfile.gettempdir(), uuid.uuid1().hex+".jar")
 +        exec_storm_class("org.apache.storm.daemon.ClientJarTransformerRunner", args=[transform_class, jarfile, tmpjar], fork=True, daemon=False)
 +        exec_storm_class(
 +            klass,
 +            jvmtype="-client",
 +            extrajars=[tmpjar, USER_CONF_DIR, STORM_BIN_DIR],
 +            args=args,
 +            daemon=False,
 +            fork=True,
 +            jvmopts=JAR_JVM_OPTS + ["-Dstorm.jar=" + tmpjar])
 +        os.remove(tmpjar)
 +    else:
 +        exec_storm_class(
 +            klass,
 +            jvmtype="-client",
 +            extrajars=[jarfile, USER_CONF_DIR, STORM_BIN_DIR],
 +            args=args,
 +            daemon=False,
 +            jvmopts=JAR_JVM_OPTS + ["-Dstorm.jar=" + jarfile])
  
- def sql(sql_file, topo_nam):
+ def sql(sql_file, topology_name):
      """Syntax: [storm sql sql-file topology]
  
      Compiles the SQL statements into a Trident topology and submits it to Storm.