Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
"onCommand:jupyter.execCurrentCell",
"onCommand:jupyter.execCurrentCellAndAdvance",
"onCommand:python.displayHelp",
"onCommand:python.buildWorkspaceSymbols"
"onCommand:python.buildWorkspaceSymbols",
"onCommand:python.updateSparkLibrary"
],
"main": "./out/client/extension",
"contributes": {
Expand Down Expand Up @@ -419,7 +420,15 @@
"type": "python",
"request": "launch",
"stopOnEntry": true,
"pythonPath": "${config.python.pysparkPath}",
"osx": {
"pythonPath": "${env.SPARK_HOME}/bin/spark-submit"
},
"windows": {
"pythonPath": "${env.SPARK_HOME}/bin/spark-submit.cmd"
},
"linux": {
"pythonPath": "${env.SPARK_HOME}/bin/spark-submit"
},
"program": "${file}",
"cwd": "${workspaceRoot}",
"debugOptions": [
Expand Down Expand Up @@ -567,11 +576,6 @@
"default": "python",
"description": "Path to Python, you can use a custom version of Python by modifying this setting to include the full path."
},
"python.pysparkPath": {
"type": "string",
"default": "${env.SPARK_HOME}/bin/spark-submit",
"description": "Path to spark-submit executable, you can use a custom version of Spark by modifying this setting to include the full path."
},
"python.jediPath": {
"type": "string",
"default": "",
Expand Down
12 changes: 1 addition & 11 deletions src/client/providers/updateSparkLibraryProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,6 @@ function updateSparkLibrary() {
}, reason => {
vscode.window.showErrorMessage(`Failed to update ${extraLibPath}. Error: ${reason.message}`);
console.error(reason);
});
if (IS_WINDOWS) {
const pysparkPath = 'pysparkPath';
console.log('Overriding ' + pysparkPath);
pythonConfig.update(pysparkPath, path.join(sparkHomePath, 'bin', 'spark-submit.cmd')).then(() => {
//Done
}, reason => {
vscode.window.showErrorMessage(`Failed to update ${pysparkPath}. Error: ${reason.message}`);
console.error(reason);
});
}
});
vscode.window.showInformationMessage(`Make sure you have SPARK_HOME environment variable set to the root path of the local spark installation!`);
}