Skip to content

Commit

Permalink
adapt log importer (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
xjlgod authored Mar 31, 2022
1 parent 8caa803 commit dba9f89
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion server/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/mattn/go-sqlite3 v2.0.3+incompatible
github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca
github.com/vesoft-inc/nebula-http-gateway/ccore v0.0.0-20220329020324-f599adfab640
github.com/vesoft-inc/nebula-importer v1.0.1-0.20220314055243-ece1a79d37e5
github.com/vesoft-inc/nebula-importer v1.0.1-0.20220331072417-e7281ccc8a1a
go.uber.org/zap v1.17.0
gopkg.in/yaml.v2 v2.4.0
gorm.io/driver/sqlite v1.2.6
Expand Down
4 changes: 2 additions & 2 deletions server/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ github.com/vesoft-inc/nebula-go/v3 v3.0.0-20220214062853-d0c59964d0af h1:5z3eC9o
github.com/vesoft-inc/nebula-go/v3 v3.0.0-20220214062853-d0c59964d0af/go.mod h1:+sXv05jYQBARdTbTcIEsWVXCnF/6ttOlDK35xQ6m54s=
github.com/vesoft-inc/nebula-http-gateway/ccore v0.0.0-20220329020324-f599adfab640 h1:k0lt8tqjIWLpLhx39nNJzxq9G4/c4Szd1F0LZG5txfI=
github.com/vesoft-inc/nebula-http-gateway/ccore v0.0.0-20220329020324-f599adfab640/go.mod h1:sFEvE+cY4TgwqWx6H6msOqAUzRhsEHHKaaMgIZENHuQ=
github.com/vesoft-inc/nebula-importer v1.0.1-0.20220314055243-ece1a79d37e5 h1:YghW/f27/NEpP8h3yAn2p7WCZYUIx3rc+pdS3v9QmRc=
github.com/vesoft-inc/nebula-importer v1.0.1-0.20220314055243-ece1a79d37e5/go.mod h1:Hgn05JWXQcxyoJAjJVN34PnUndY+JcNKzpb0DoyFrsM=
github.com/vesoft-inc/nebula-importer v1.0.1-0.20220331072417-e7281ccc8a1a h1:h11b2euzCDnX9cKO6xLs0iqziAT8txCDjHunDUndd+k=
github.com/vesoft-inc/nebula-importer v1.0.1-0.20220331072417-e7281ccc8a1a/go.mod h1:Hgn05JWXQcxyoJAjJVN34PnUndY+JcNKzpb0DoyFrsM=
github.com/vmihailenco/msgpack/v5 v5.0.0/go.mod h1:HVxBVPUK/+fZMonk4bi1islLa8V3cfnBug0+4dykPzo=
github.com/vmihailenco/msgpack/v5 v5.3.4 h1:qMKAwOV+meBw2Y8k9cVwAy7qErtYCwBzZ2ellBfvnqc=
github.com/vmihailenco/msgpack/v5 v5.3.4/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc=
Expand Down
8 changes: 4 additions & 4 deletions server/pkg/webserver/service/importer/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

importconfig "github.com/vesoft-inc/nebula-importer/pkg/config"
importerErrors "github.com/vesoft-inc/nebula-importer/pkg/errors"
"github.com/vesoft-inc/nebula-importer/pkg/logger"
"github.com/vesoft-inc/nebula-studio/server/pkg/config"
"github.com/vesoft-inc/nebula-studio/server/pkg/utils"

Expand Down Expand Up @@ -95,18 +96,17 @@ func Import(taskID string, configPath string, configBody *importconfig.YAMLConfi
zap.L().Debug(fmt.Sprintf("Start a import task: `%s`", taskID))

var conf *importconfig.YAMLConfig
runnerLogger := logger.NewRunnerLogger("")
if configPath != "" {
conf, err = importconfig.Parse(
configPath,
)
conf, err = importconfig.Parse(configPath, runnerLogger)

if err != nil {
return err.(importerErrors.ImporterError)
}
} else {
conf = configBody
}
if err := conf.ValidateAndReset(""); err != nil {
if err := conf.ValidateAndReset("", runnerLogger); err != nil {
return err
}

Expand Down

0 comments on commit dba9f89

Please sign in to comment.