Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE in the nameMapping #859

Closed
meng1222 opened this issue May 23, 2022 · 1 comment
Closed

NPE in the nameMapping #859

meng1222 opened this issue May 23, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@meng1222
Copy link
Contributor

Describe the bug
I did not configure the nameMapping parameter but reported NPE.Below is my configuration:
{
"job":{
"content":[
{

    "reader":{
      "name": "mysqlreader",
      "parameter": {
        "startLocation": "",
        "increColumn": "",
        "column": [
          {
            "name": "id",
            "type": "bigint"
          },
          {
            "name": "name",
            "type": "varchar"
          },
          {
            "name": "content",
            "type": "text"
          }
        ],
        "username": "root",
        "password": "root",
        "connection": [
          {
            "jdbcUrl": [
              "jdbc:mysql://1.1.1.1:3306/mysql_te?useSSL=false"
            ],
            "table": [
              "inner_02"
            ]
          }
        ]
      }
    },
    "writer":{
      "parameter":{
        "maxRetries":3,
        "parseThreadNumber":10,
        "feNodes":[
          "111:111:111:111:8030"
        ],
        "column":[{
          "name": "id",
          "type": "bigint"
        },
          {
            "name": "name",
            "type": "varchar"
          },
          {
            "name": "content",
            "type": "varchar"
          }],
        "batchSize":10,
        "username":"root",
        "table": "outer_02",
        "database": "doris_test"
      },
      "name":"doriswriter"
    },
    "nameMapping": {}
  }
],
"setting":{
  "restore":{
    "isRestore":false,
    "isStream":true
  },
  "speed":{
    "readerChannel":1,
    "writerChannel":1,
    "bytes":-1048576,
    "channel":1
  }
}

}
}

and i get this error report:
2022-05-23 14:18:22,849 - 7533 WARN [Flat Map (1/1)#0] org.apache.flink.runtime.taskmanager.Task:Flat Map (1/1)#0 (5f50cb066576baf15642d261b279e090) switched from RUNNING to FAILED.
java.lang.NullPointerException
at java.util.Objects.requireNonNull(Objects.java:203)
at com.dtstack.chunjun.mapping.Mapping.getIdentityIndex(Mapping.java:64)
at com.dtstack.chunjun.mapping.NameMapping.map(NameMapping.java:58)
at com.dtstack.chunjun.mapping.NameMapping.map(NameMapping.java:43)
at com.dtstack.chunjun.mapping.MappingClient.map(MappingClient.java:58)
at com.dtstack.chunjun.mapping.NameMappingFlatMap.flatMap(NameMappingFlatMap.java:62)
at com.dtstack.chunjun.mapping.NameMappingFlatMap.flatMap(NameMappingFlatMap.java:41)
at org.apache.flink.streaming.api.operators.StreamFlatMap.processElement(StreamFlatMap.java:47)
at org.apache.flink.streaming.runtime.tasks.OneInputStreamTask$StreamTaskNetworkOutput.emitRecord(OneInputStreamTask.java:191)
at org.apache.flink.streaming.runtime.io.StreamTaskNetworkInput.processElement(StreamTaskNetworkInput.java:204)
at org.apache.flink.streaming.runtime.io.StreamTaskNetworkInput.emitNext(StreamTaskNetworkInput.java:174)
at org.apache.flink.streaming.runtime.io.StreamOneInputProcessor.processInput(StreamOneInputProcessor.java:65)
at org.apache.flink.streaming.runtime.tasks.StreamTask.processInput(StreamTask.java:398)
at org.apache.flink.streaming.runtime.tasks.mailbox.MailboxProcessor.runMailboxLoop(MailboxProcessor.java:191)
at org.apache.flink.streaming.runtime.tasks.StreamTask.runMailboxLoop(StreamTask.java:619)
at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:583)
at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:758)
at org.apache.flink.runtime.taskmanager.Task.run(Task.java:573)
at java.lang.Thread.run(Thread.java:750)

@meng1222 meng1222 added the bug Something isn't working label May 23, 2022
@FlechazoW
Copy link
Member

PR merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants