Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -66,6 +66,8 @@ abstract class AbstractCommandBuilder {
*/
protected boolean isRemote = System.getenv().containsKey("SPARK_REMOTE");

protected boolean isBeeLine = false;

AbstractCommandBuilder() {
this.appArgs = new ArrayList<>();
this.childEnv = new HashMap<>();
Expand Down Expand Up @@ -195,6 +197,9 @@ List<String> buildClassPath(String appClassPath) throws IOException {
if (isRemote && "1".equals(getenv("SPARK_SCALA_SHELL")) && project.equals("sql/core")) {
continue;
}
if (isBeeLine && project.equals("sql/core")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to conduct an inspection on the BeeLine with Connect JDBC driver and apply special handling solely for this specific scenario?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LuciferYang short answer - it's possible only in some cases, details were explained at #52706 (comment)

continue;
}
// SPARK-49534: The assumption here is that if `spark-hive_xxx.jar` is not in the
// classpath, then the `-Phive` profile was not used during package, and therefore
// the Hive-related jars should also not be in the classpath. To avoid failure in
Expand Down Expand Up @@ -241,7 +246,7 @@ List<String> buildClassPath(String appClassPath) throws IOException {
}
}

if (isRemote) {
if (isRemote || isBeeLine) {
for (File f: new File(jarsDir).listFiles()) {
// Exclude Spark Classic SQL and Spark Connect server jars
// if we're in Spark Connect Shell. Also exclude Spark SQL API and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ class SparkClassCommandBuilder extends AbstractCommandBuilder {
SparkClassCommandBuilder(String className, List<String> classArgs) {
this.className = className;
this.classArgs = classArgs;
if ("org.apache.hive.beeline.BeeLine".equals(className)) {
this.isBeeLine = true;
}
}

@Override
Expand Down