Skip to content

Commit

Permalink
Fix git plugin and return version of openmldb-batch
Browse files Browse the repository at this point in the history
  • Loading branch information
tobegit3hub committed Jan 27, 2022
1 parent 2dc9901 commit ce53532
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
16 changes: 16 additions & 0 deletions java/openmldb-batch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,22 @@
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>2.2.4</version>
<executions>
<execution>
<id>get-the-git-infos</id>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
<configuration>
<generateGitPropertiesFilename>${project.build.outputDirectory}/openmldb_git.properties</generateGitPropertiesFilename>
<injectAllReactorProjects>true</injectAllReactorProjects>
<dateFormat>yyyy.MM.dd HH:mm:ss</dateFormat>
<verbose>true</verbose>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
</configuration>
</plugin>

<!-- Generate report for spotbugs -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ package com._4paradigm.openmldb.batch.api

import com._4paradigm.openmldb.batch.catalog.OpenmldbCatalogService
import com._4paradigm.openmldb.batch.{OpenmldbBatchConfig, SparkPlanner}
import com._4paradigm.openmldb.sdk.impl.SqlClusterExecutor
import org.apache.commons.io.IOUtils
import org.apache.spark.SparkConf
import org.apache.spark.{SPARK_VERSION, SparkConf}
import org.apache.spark.sql.catalyst.QueryPlanningTracker
import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
import org.apache.spark.sql.{DataFrame, Dataset, Row, SparkSession}
Expand Down Expand Up @@ -196,10 +195,9 @@ class OpenmldbSession {
val stream = this.getClass.getClassLoader.getResourceAsStream("openmldb_git.properties")
if (stream == null) {
logger.error("OpenMLDB git properties is missing")
s"${sparkSession.version}"
SPARK_VERSION
} else {
val gitInfo = IOUtils.toString(stream, "UTF-8")
s"${sparkSession.version}\n$gitInfo"
s"$SPARK_VERSION\n${IOUtils.toString(stream, "UTF-8")}"
}
}

Expand Down

0 comments on commit ce53532

Please sign in to comment.