|
@@ -17,10 +17,8 @@
|
|
|
|
|
|
|
|
import logging
|
|
import logging
|
|
|
import os
|
|
import os
|
|
|
-import subprocess
|
|
|
|
|
|
|
|
|
|
from django.core.management.base import NoArgsCommand
|
|
from django.core.management.base import NoArgsCommand
|
|
|
-import spark.conf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LOG = logging.getLogger(__name__)
|
|
LOG = logging.getLogger(__name__)
|
|
@@ -35,10 +33,21 @@ class Command(NoArgsCommand):
|
|
|
|
|
|
|
|
def handle(self, *args, **kwargs):
|
|
def handle(self, *args, **kwargs):
|
|
|
env = os.environ.copy()
|
|
env = os.environ.copy()
|
|
|
|
|
+#../../../../../librdbms/java/bin/dbproxy
|
|
|
|
|
+ cmd = os.path.join(os.path.dirname(__file__), "..", "..", "..", "..", "..", "librdbms", "java", "bin", "dbproxy")
|
|
|
|
|
|
|
|
- args.append("com.cloudera.hue.livy.server.Main")
|
|
|
|
|
|
|
+# classpath = env.get('CLASSPATH', '').split(os.pathsep)
|
|
|
|
|
+# classpath +=
|
|
|
|
|
|
|
|
- LOG.info("Executing %r (%r) (%r)" % (args[0], args, env))
|
|
|
|
|
|
|
+ args = [
|
|
|
|
|
+ #"java",
|
|
|
|
|
+ ]
|
|
|
|
|
+
|
|
|
|
|
+# args.extend(("-cp", os.pathsep.join(classpath)))
|
|
|
|
|
+
|
|
|
|
|
+# args.append("com.cloudera.hue.livy.server.Main")
|
|
|
|
|
+
|
|
|
|
|
+ LOG.info("Executing %r (%r) (%r)" % (args, args, env))
|
|
|
|
|
|
|
|
# Use exec, so that this takes only one process.
|
|
# Use exec, so that this takes only one process.
|
|
|
- os.execvpe(args[0], args, env)
|
|
|
|
|
|
|
+ os.execvpe(cmd, args, env)
|