Skip to content

Commit

Permalink
Update withBatch limit and default (#1322)
Browse files Browse the repository at this point in the history
* Update withBatch limit and default

* Update nebula-spark-connector.md

* Update nebula-spark-connector.md
  • Loading branch information
randomJoe211 authored Dec 16, 2021
1 parent c61a39b commit 84e452c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs-2.0/nebula-spark-connector.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ val nebulaWriteVertexConfig: WriteNebulaVertexConfig = WriteNebulaVertexConfig
.withVidAsProp(true)
.withUser("root")
.withPasswd("nebula")
.withBatch(1000)
.withBatch(512)
.build()
df.write.nebula(config, nebulaWriteVertexConfig).writeVertices()

Expand All @@ -189,7 +189,7 @@ val nebulaWriteEdgeConfig: WriteNebulaEdgeConfig = WriteNebulaEdgeConfig
.withRankAsProperty(true)
.withUser("root")
.withPasswd("nebula")
.withBatch(1000)
.withBatch(512)
.build()
df.write.nebula(config, nebulaWriteEdgeConfig).writeEdges()
```
Expand All @@ -208,7 +208,7 @@ val nebulaWriteVertexConfig = WriteNebulaVertexConfig
.withTag("person")
.withVidField("id")
.withVidAsProp(true)
.withBatch(1000)
.withBatch(512)
.withWriteMode(WriteMode.UPDATE)
.build()
df.write.nebula(config, nebulaWriteVertexConfig).writeVertices()
Expand All @@ -233,7 +233,7 @@ df.write.nebula(config, nebulaWriteVertexConfig).writeVertices()
|`withVidAsProp` || DataFrame 中作为点 ID 的列是否也作为属性写入。默认值为`false`。如果配置为`true`,请确保 Tag 中有和`VidField`相同的属性名。 |
|`withUser` || Nebula Graph 用户名。若未开启[身份验证](7.data-security/1.authentication/1.authentication.md),无需配置用户名和密码。 |
|`withPasswd` || Nebula Graph 用户名对应的密码。 |
|`withBatch` || 一次写入的数据行数默认值为`1000`. |
|`withBatch` || 一次写入的数据行数默认值为`512`。当`withWriteMode``update`时,该参数的最大值为`512` |
|`withWriteMode`||写入模式。可选值为`insert``update`。默认为`insert`|

- `WriteNebulaEdgeConfig`是写入边的配置,说明如下。
Expand All @@ -252,7 +252,7 @@ df.write.nebula(config, nebulaWriteVertexConfig).writeVertices()
|`withRankAsProperty` || DataFrame 中作为 rank 的列是否也作为属性写入。默认值为`false`。如果配置为`true`,请确保 Edge type 中有和`RankField`相同的属性名。 |
|`withUser` || Nebula Graph 用户名。若未开启[身份验证](7.data-security/1.authentication/1.authentication.md),无需配置用户名和密码。 |
|`withPasswd` || Nebula Graph 用户名对应的密码。 |
|`withBatch` || 一次写入的数据行数默认值为`1000`. |
|`withBatch` || 一次写入的数据行数默认值为`512`。当`withWriteMode``update`时,该参数的最大值为`512` |
|`withWriteMode`||写入模式。可选值为`insert``update`。默认为`insert`|

### 示例代码
Expand Down

0 comments on commit 84e452c

Please sign in to comment.