Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
allwefantasy committed Jan 14, 2019
1 parent de51f49 commit c5a8d85
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ import java.sql.{DriverManager, Statement}

import net.csdn.ServiceFramwork
import net.csdn.bootstrap.Bootstrap
import org.apache.commons.io.{FileUtils, IOUtils}
import org.apache.commons.io.FileUtils
import org.apache.http.HttpVersion
import org.apache.http.client.fluent.{Form, Request}
import org.apache.http.util.EntityUtils
import org.apache.spark.sql.{SQLContext, SparkSession}
import org.apache.spark.sql.SparkSession
import streaming.common.shell.ShellCommand
import streaming.dsl.{MLSQLExecuteContext, ScriptSQLExec, ScriptSQLExecListener}

/**
Expand Down Expand Up @@ -90,7 +91,7 @@ trait SpecFunctions {
stat = con.createStatement()
stat.execute(ddlStr)

} finally {
} finally {
if (stat != null) {
stat.close()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class PythonMLSpec2 extends BasicSparkOperation with SpecFunctions with BasicMLS
//执行sql
implicit val spark = runtime.sparkSession
mockServer
ShellCommand.exec("rm -rf /tmp/jack2/")
ShellCommand.exec("rm -rf /tmp/william")
//SPARK_VERSION
val sq = createSSEL(spark, "")
val projectName = "sklearn_elasticnet_wine"
Expand Down Expand Up @@ -131,7 +131,7 @@ class PythonMLSpec2 extends BasicSparkOperation with SpecFunctions with BasicMLS
//执行sql
implicit val spark = runtime.sparkSession
mockServer
ShellCommand.exec("rm -rf /tmp/jack2/")
ShellCommand.exec("rm -rf /tmp/william")
val sq = createSSEL(spark, "")
val projectName = "sklearn_elasticnet_wine"
var projectPath = getExampleProject(projectName)
Expand Down Expand Up @@ -170,7 +170,7 @@ class PythonMLSpec2 extends BasicSparkOperation with SpecFunctions with BasicMLS
//执行sql
implicit val spark = runtime.sparkSession
mockServer
ShellCommand.exec("rm -rf /tmp/jack2/")
ShellCommand.exec("rm -rf /tmp/william")
val sq = createSSEL(spark, "")
//train
ScriptSQLExec.parse(ScriptCode._j2, sq)
Expand All @@ -188,7 +188,7 @@ class PythonMLSpec2 extends BasicSparkOperation with SpecFunctions with BasicMLS
//执行sql
implicit val spark = runtime.sparkSession
mockServer
ShellCommand.exec("rm -rf /tmp/jack2/")
ShellCommand.exec("rm -rf /tmp/william")
val sq = createSSEL(spark, "")
//train
ScriptSQLExec.parse(ScriptCode._j1, sq)
Expand All @@ -206,7 +206,7 @@ class PythonMLSpec2 extends BasicSparkOperation with SpecFunctions with BasicMLS
//执行sql
implicit val spark = runtime.sparkSession
mockServer
ShellCommand.exec("rm -rf /tmp/jack2/")
ShellCommand.exec("rm -rf /tmp/william")
ShellCommand.exec("mkdir -p /tmp/resource")
ShellCommand.exec("touch /tmp/resource/a.txt")
val sq = createSSEL(spark, "")
Expand Down

0 comments on commit c5a8d85

Please sign in to comment.