Skip to content

Commit

Permalink
remove passwd info from log for release-3.4 (#131)
Browse files Browse the repository at this point in the history
* remove passwd info from log

* update version to 3.4.1
  • Loading branch information
Nicole00 authored Nov 2, 2023
1 parent 506aae7 commit 66dfd01
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 9 deletions.
2 changes: 1 addition & 1 deletion example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>nebula-spark</artifactId>
<groupId>com.vesoft</groupId>
<version>3.4.0</version>
<version>3.4.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion nebula-spark-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>nebula-spark</artifactId>
<groupId>com.vesoft</groupId>
<version>3.4.0</version>
<version>3.4.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion nebula-spark-connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>nebula-spark</artifactId>
<groupId>com.vesoft</groupId>
<version>3.4.0</version>
<version>3.4.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class NebulaDataSource
val dataType = nebulaOptions.dataType

LOG.info("create reader")
LOG.info(s"options ${options.asMap()}")
LOG.info(s"options ${options.asMap().remove("passwd")}")

if (DataTypeEnum.VERTEX == DataTypeEnum.withName(dataType)) {
new NebulaDataSourceVertexReader(nebulaOptions)
Expand All @@ -72,7 +72,7 @@ class NebulaDataSource
}

LOG.info("create writer")
LOG.info(s"options ${options.asMap()}")
LOG.info(s"options ${options.asMap().remove("passwd")}")

if (DataTypeEnum.VERTEX == DataTypeEnum.withName(dataType)) {
val vertexFiled = nebulaOptions.vertexField
Expand Down
2 changes: 1 addition & 1 deletion nebula-spark-connector_2.2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>nebula-spark</artifactId>
<groupId>com.vesoft</groupId>
<version>3.4.0</version>
<version>3.4.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import org.apache.spark.sql.sources.{
import org.apache.spark.sql.types.StructType
import org.slf4j.LoggerFactory

import scala.collection.mutable

class NebulaDataSource
extends RelationProvider
with CreatableRelationProvider
Expand All @@ -46,7 +48,13 @@ class NebulaDataSource
val nebulaOptions = getNebulaOptions(parameters, OperaType.READ)

LOG.info("create relation")
LOG.info(s"options ${parameters}")
val optionMap = new mutable.HashMap[String, String]()
for (k: String <- parameters.keySet) {
if (!k.equalsIgnoreCase("passwd")) {
optionMap += (k -> parameters(k))
}
}
LOG.info(s"options ${optionMap}")

NebulaRelation(sqlContext, nebulaOptions)
}
Expand All @@ -65,7 +73,13 @@ class NebulaDataSource
}

LOG.info("create writer")
LOG.info(s"options ${parameters}")
val optionMap = new mutable.HashMap[String, String]()
for (k: String <- parameters.keySet) {
if (!k.equalsIgnoreCase("passwd")) {
optionMap += (k -> parameters(k))
}
}
LOG.info(s"options ${optionMap}")

val schema = data.schema
data.foreachPartition(iterator => {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.vesoft</groupId>
<artifactId>nebula-spark</artifactId>
<packaging>pom</packaging>
<version>3.4.0</version>
<version>3.4.1</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down

0 comments on commit 66dfd01

Please sign in to comment.