Skip to content

Commit

Permalink
code format
Browse files Browse the repository at this point in the history
  • Loading branch information
aiceflower committed Sep 25, 2024
1 parent 6614060 commit f8cd756
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public ExecuteResponse executeLine(EngineExecutionContext engineExecutorContext,
(ElasticSearchTableResponse) elasticSearchResponse;
TableMetaData metaData = new TableMetaData(tableResponse.columns());
ResultSetWriter<? extends MetaData, ? extends Record> resultSetWriter =
engineExecutorContext.createResultSetWriter(ResultSetFactory.TABLE_TYPE());
engineExecutorContext.createResultSetWriter(ResultSetFactory.TABLE_TYPE());
resultSetWriter.addMetaData(metaData);
Arrays.asList(tableResponse.records())
.forEach(
Expand All @@ -152,7 +152,7 @@ record -> {
} else if (elasticSearchResponse instanceof ElasticSearchJsonResponse) {
ElasticSearchJsonResponse jsonResponse = (ElasticSearchJsonResponse) elasticSearchResponse;
ResultSetWriter<? extends MetaData, ? extends Record> resultSetWriter =
engineExecutorContext.createResultSetWriter(ResultSetFactory.TEXT_TYPE());
engineExecutorContext.createResultSetWriter(ResultSetFactory.TEXT_TYPE());
resultSetWriter.addMetaData(null);
Arrays.stream(jsonResponse.value().split("\\n"))
.forEach(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import org.apache.linkis.hadoop.common.conf.HadoopConf
import org.apache.linkis.manager.common.protocol.bml.BmlResource
import org.apache.linkis.manager.engineplugin.common.conf.EnvConfiguration
import org.apache.linkis.manager.engineplugin.common.launch.entity.EngineConnBuildRequest

import org.apache.linkis.manager.engineplugin.common.launch.process.{
Environment,
JavaProcessEngineConnLaunchBuilder
Expand All @@ -42,6 +41,7 @@ import org.apache.linkis.manager.label.entity.engine.{EngineConnMode, UserCreato
import org.apache.linkis.manager.label.utils.LabelUtil

import java.util

import scala.collection.JavaConverters._

import com.google.common.collect.Lists
Expand Down Expand Up @@ -95,9 +95,10 @@ class FlinkEngineConnLaunchBuilder extends JavaProcessEngineConnLaunchBuilder {
}
bmlResources
}

override def getEnvironment(implicit
engineConnBuildRequest: EngineConnBuildRequest
): util.Map[String, String] = {
engineConnBuildRequest: EngineConnBuildRequest
): util.Map[String, String] = {
val environment = new util.HashMap[String, String]
addPathToClassPath(environment, variable(PWD))
val linkisEnvironment = super.getEnvironment
Expand All @@ -109,8 +110,8 @@ class FlinkEngineConnLaunchBuilder extends JavaProcessEngineConnLaunchBuilder {
}

override def getEnvironment(implicit
engineConnBuildRequest: EngineConnBuildRequest
): util.Map[String, String] = {
engineConnBuildRequest: EngineConnBuildRequest
): util.Map[String, String] = {
val environment = new util.HashMap[String, String]
addPathToClassPath(environment, variable(PWD))
val linkisEnvironment = super.getEnvironment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ object Constants {
CommonVars[String]("linkis.configuration.linkisclient.auth.token.key", "Validation-Code")

val AUTH_TOKEN_VALUE: CommonVars[String] =
CommonVars[String](
"linkis.configuration.linkisclient.auth.token.value",
"LINKIS-AUTH"
)
CommonVars[String]("linkis.configuration.linkisclient.auth.token.value", "LINKIS-AUTH")

val CONNECTION_MAX_SIZE: CommonVars[Int] =
CommonVars[Int]("linkis.configuration.linkisclient.connection.max.size", 10)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ object WorkspaceClientConf {
CommonVars[String]("wds.linkis.filesystem.token.key", "Validation-Code").getValue

val tokenValue: String =
CommonVars[String](
"wds.linkis.filesystem.token.value",
"LINKIS-AUTH"
).getValue
CommonVars[String]("wds.linkis.filesystem.token.value", "LINKIS-AUTH").getValue

val scriptFromBMLUrl: String = prefix + scriptFromBML
}

0 comments on commit f8cd756

Please sign in to comment.