Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hang bug when switching cluster #3166

Merged
merged 2 commits into from
May 30, 2019
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ import com.microsoft.intellij.lang.tagInvisibleChars
import com.microsoft.intellij.rxjava.DisposableObservers
import com.microsoft.intellij.ui.util.findFirst
import com.microsoft.intellij.util.PluginUtil
import com.sun.glass.ui.Application
import org.apache.commons.lang3.StringUtils
import java.awt.Dimension
import java.awt.FlowLayout
Expand Down Expand Up @@ -305,15 +306,17 @@ open class SparkSubmissionContentPanel(private val myProject: Project, val type:

val root = prepareFileSystem(uploadRootPath)
if (fileSystem == null || root == null) {
PluginUtil.displayErrorDialog("Prepare Azure Virtual File System Error",
"Browsing files in the Azure virtual file system currently only supports ADLS Gen 2 " +
"cluster. Please\n manually specify the reference file paths for other type of " +
"clusters and check upload inputs")
ApplicationManager.getApplication().invokeAndWait({
PluginUtil.displayErrorDialog("Prepare Azure Virtual File System Error",
"Browsing files in the Azure virtual file system currently only supports ADLS Gen 2 " +
"cluster. Please\n manually specify the reference file paths for other type of " +
"clusters and check upload inputs")
}, ModalityState.any())
} else {
val chooser = StorageChooser(root) { file -> file.isDirectory || file.name.endsWith(".jar") }
val chooseFiles = chooser.chooseFile()
// Only override reference jar text field when jar file is selected and ok button is clicked
if(chooseFiles.isNotEmpty()) {
if (chooseFiles.isNotEmpty()) {
text = chooseFiles.joinToString(";") { vf -> vf.url }
}
}
Expand Down