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:56 UTC
[1/2] storm git commit: Storm SQL - Storm.py 'storm sql' startup
script is not working
Repository: storm
Updated Branches:
refs/heads/master a4f9f8bc5 -> c55a028a7
Storm SQL - Storm.py 'storm sql' startup script is not working
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/e9f7bf03
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/e9f7bf03
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/e9f7bf03
Branch: refs/heads/master
Commit: e9f7bf03e3d40b199c6c1964b2be65fef0d4b213
Parents: aff4704
Author: Hugo Louro <hm...@gmail.com>
Authored: Fri Jan 8 19:54:26 2016 -0800
Committer: Hugo Louro <hm...@gmail.com>
Committed: Sat Jan 9 09:42:11 2016 -0800
----------------------------------------------------------------------
bin/storm.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/e9f7bf03/bin/storm.py
----------------------------------------------------------------------
diff --git a/bin/storm.py b/bin/storm.py
index 7414fdc..401d83f 100755
--- a/bin/storm.py
+++ b/bin/storm.py
@@ -17,11 +17,13 @@
# limitations under the License.
import os
-import sys
import random
-import subprocess as sub
import re
import shlex
+import subprocess as sub
+
+import sys
+
try:
# python 3
from urllib.parse import quote_plus
@@ -229,7 +231,7 @@ def jar(jarfile, klass, *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.
@@ -238,7 +240,7 @@ def sql(sql_file, topo_nam):
"org.apache.storm.sql.StormSqlRunner",
jvmtype="-client",
extrajars=[USER_CONF_DIR, STORM_BIN_DIR],
- args=[sql_file, topo_name],
+ args=[sql_file, topology_name],
daemon=False)
def kill(*args):
[2/2] storm git commit: Merge branch 'STORM_SQL_StormPY' of
https://github.com/hmcl/storm-apache into PULL-1001
Posted by bo...@apache.org.
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.