Fixed can't read indexof exception when no big data cluster connection and switch to PySpark3 (#3413)

This commit is contained in:
Yurong He
2018-12-04 10:36:34 -08:00
committed by GitHub
parent 8d8be27f22
commit 58bfcb4273

View File

@@ -281,9 +281,14 @@ export class NotebookModel extends Disposable implements INotebookModel {
notebookManager: this.notebookManager,
notificationService: this.notebookOptions.notificationService
});
let id: string = this.connectionProfile ? this.connectionProfile.id : undefined;
let profile = this.connectionProfile as IConnectionProfile;
if (this.isValidKnoxConnection(profile)) {
this._hadoopConnection = new NotebookConnection(this.connectionProfile);
} else {
this._hadoopConnection = undefined;
}
this._hadoopConnection = this.connectionProfile ? new NotebookConnection(this.connectionProfile) : undefined;
this._clientSession.initialize(this._hadoopConnection);
this._sessionLoadFinished = this._clientSession.ready.then(async () => {
if (this._clientSession.isInErrorState) {