Skip to content

Commit

Permalink
#1431 removed --cbs-port from caller sides
Browse files Browse the repository at this point in the history
  • Loading branch information
ninjapapa committed Oct 26, 2018
1 parent 7ed7408 commit 09021d7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/user/smv_windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ sc.setLogLevel("ERROR")

# Imnport smv
from smv import smvPy
app = smvPy.init(['-m', 'None', '--cbs-port', str(callback_server_port)], sc, sqlContext)
app = smvPy.init(['-m', 'None'], sc, sqlContext)

from smvshell import *
```
Expand Down
1 change: 1 addition & 0 deletions src/main/python/smv/smvconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ def _create_cmdline_conf(self, arglist):
DEFAULT_SMV_APP_CONF_FILE = "conf/smv-app-conf.props"
DEFAULT_SMV_USER_CONF_FILE = "conf/smv-user-conf.props"

# TODO: Will remove when no scripts are using this
parser.add_argument('--cbs-port', dest='cbsPort', type=int, help="python callback server port")

# Where to find props files
Expand Down
10 changes: 2 additions & 8 deletions src/main/python/test_support/smvbasetest.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ def setUpClass(cls):
cls.sparkContext = TestConfig.sparkContext()
cls.sparkContext.setLogLevel("ERROR")

import random;
callback_server_port = random.randint(20000, 65535)

args = TestConfig.smv_args() + cls.smvAppInitArgs() + ['--cbs-port', str(callback_server_port), '--data-dir', cls.tmpDataDir()]
args = TestConfig.smv_args() + cls.smvAppInitArgs() + ['--data-dir', cls.tmpDataDir()]
# The test's SmvApp must be set as the singleton for correct results of some tests
# The original SmvApp (if any) will be restored when the test is torn down
cls.smvApp = SmvApp.createInstance(args, cls.sparkSession)
Expand Down Expand Up @@ -72,10 +69,7 @@ def setUp(self):
cls.sparkContext = TestConfig.sparkContext()
cls.sparkContext.setLogLevel("ERROR")

import random;
callback_server_port = random.randint(20000, 65535)

args = TestConfig.smv_args() + cls.smvAppInitArgs() + ['--cbs-port', str(callback_server_port)]
args = TestConfig.smv_args() + cls.smvAppInitArgs() + ['--data-dir', cls.tmpDataDir()]
cls.smvApp = SmvApp.createInstance(args, cls.sparkSession)

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion tools/conf/smv_pyshell_init.py.template
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import pyspark.sql.types as T
sc.setLogLevel("ERROR")

user_args = "_SMV_ALL_ARGS_".split()
all_args = ['--cbs-port', str(callback_server_port)] + user_args
all_args = user_args
app = SmvApp.createInstance(all_args, spark)

from smv.smvshell import *
Expand Down

0 comments on commit 09021d7

Please sign in to comment.