diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/assembly/distribution.xml | 17 | ||||
-rw-r--r-- | src/main/resources/profiles/kernel-1/profile.json (renamed from src/main/resources/profile.json.template) | 2 | ||||
-rw-r--r-- | src/main/resources/profiles/kernel-2/profile.json | 11 | ||||
-rw-r--r-- | src/main/resources/profiles/kernel-3/profile.json | 11 | ||||
-rw-r--r-- | src/main/resources/profiles/mutex | 15 | ||||
-rw-r--r-- | src/main/resources/toree-gateway.properties.template | 29 | ||||
-rw-r--r-- | src/main/scala/org/apache/toree/gateway/ToreeGateway.scala | 2 |
7 files changed, 83 insertions, 4 deletions
diff --git a/src/main/assembly/distribution.xml b/src/main/assembly/distribution.xml index 11b3429..6d2bde8 100644 --- a/src/main/assembly/distribution.xml +++ b/src/main/assembly/distribution.xml @@ -45,10 +45,23 @@ <directory>python</directory> <outputDirectory>python</outputDirectory> <includes> - <include>setup.py</include> - <include>toree-gateway-kernel.py</include> + <include>*.py</include> </includes> </fileSet> + <fileSet> + <directory>src/main/resources</directory> + <outputDirectory>conf</outputDirectory> + <includes> + <include>*.template</include> + </includes> + </fileSet> + <fileSet> + <directory>src/main/resources/profiles</directory> + <outputDirectory>profiles</outputDirectory> + <excludes> + <exclude>*template</exclude> + </excludes> + </fileSet> </fileSets> <files> diff --git a/src/main/resources/profile.json.template b/src/main/resources/profiles/kernel-1/profile.json index b473a4d..3d65897 100644 --- a/src/main/resources/profile.json.template +++ b/src/main/resources/profiles/kernel-1/profile.json @@ -4,7 +4,7 @@ "hb_port": 48705, "shell_port": 48703, "iopub_port": 48704, - "ip": "9.125.72.72", + "ip": "9.30.137.220", "transport": "tcp", "signature_scheme": "hmac-sha256", "key": "" diff --git a/src/main/resources/profiles/kernel-2/profile.json b/src/main/resources/profiles/kernel-2/profile.json new file mode 100644 index 0000000..0953896 --- /dev/null +++ b/src/main/resources/profiles/kernel-2/profile.json @@ -0,0 +1,11 @@ +{ + "stdin_port": 48706, + "control_port": 48707, + "hb_port": 48710, + "shell_port": 48708, + "iopub_port": 48709, + "ip": "9.30.137.220", + "transport": "tcp", + "signature_scheme": "hmac-sha256", + "key": "" +}
\ No newline at end of file diff --git a/src/main/resources/profiles/kernel-3/profile.json b/src/main/resources/profiles/kernel-3/profile.json new file mode 100644 index 0000000..72113b1 --- /dev/null +++ b/src/main/resources/profiles/kernel-3/profile.json @@ -0,0 +1,11 @@ +{ + "stdin_port": 48711, + "control_port": 48712, + "hb_port": 48715, + "shell_port": 48713, + "iopub_port": 48714, + "ip": "9.30.137.220", + "transport": "tcp", + "signature_scheme": "hmac-sha256", + "key": "" +}
\ No newline at end of file diff --git a/src/main/resources/profiles/mutex b/src/main/resources/profiles/mutex new file mode 100644 index 0000000..270443d --- /dev/null +++ b/src/main/resources/profiles/mutex @@ -0,0 +1,15 @@ +# +# (C) Copyright IBM Corp. 2017 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#
\ No newline at end of file diff --git a/src/main/resources/toree-gateway.properties.template b/src/main/resources/toree-gateway.properties.template new file mode 100644 index 0000000..67be1ed --- /dev/null +++ b/src/main/resources/toree-gateway.properties.template @@ -0,0 +1,29 @@ +# +# (C) Copyright IBM Corp. 2017 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + + +[general] +gateway.home=/opt/toree-gateway + +spark.master=spark://9.30.137.220:7077 +#spark.cpus=4 +#spark.memory=1g + +toree.ip=9.30.137.220 +toree.username=spark +toree.password=whoopi +toree.home=/u/home/SPARK/toree + diff --git a/src/main/scala/org/apache/toree/gateway/ToreeGateway.scala b/src/main/scala/org/apache/toree/gateway/ToreeGateway.scala index 07ba94a..e40050f 100644 --- a/src/main/scala/org/apache/toree/gateway/ToreeGateway.scala +++ b/src/main/scala/org/apache/toree/gateway/ToreeGateway.scala @@ -95,7 +95,7 @@ object ToreeGatewayClient extends App { def getConfigurationFilePath: String = { var filePath = "/opt/toree-gateway/conf/profile.json" - if (args.length == 0) { + if (args.length > 0) { for (arg <- args) { if (arg.contains("json")) { filePath = arg |