全部產品
Search
文件中心

Tablestore:OTSReader常見問題

更新時間:May 21, 2026

本文介紹了OTSReader運行時可能出現的問題,請根據實際問題排查處理錯誤。

OTSReader運行時出現“Input size of values not equal size of primary key. input size: xx, primary key size: xx”錯誤

  • 問題現象

    OTSReader運行時出現“Input size of values not equal size of primary key. input size: xx, primary key size: xx”錯誤。

    com.alibaba.datax.common.exception.DataXException: com.alibaba.datax.plugin.reader.otsreader.OtsReaderError@76f4b65 - IllegalArgumentException[ErrorMessage:Input size of values not equal size of primary key. input size:2, primary key size:1 .] - java.lang.IllegalArgumentException: Input size of values not equal size of primary key. input size:2, primary key size:1 .
    	at com.alibaba.datax.plugin.reader.otsreader.utils.ParamChecker.checkInputPrimaryKeyAndGet(ParamChecker.java:119)
    	at com.alibaba.datax.plugin.reader.otsreader.utils.ParamChecker.checkRangeAndGet(ParamChecker.java:151)
    	at com.alibaba.datax.plugin.reader.otsreader.OtsReaderMasterProxy.init(OtsReaderMasterProxy.java:86)
    	at com.alibaba.datax.plugin.reader.otsreader.OtsReader$Job.init(OtsReader.java:34)
    	at com.alibaba.datax.core.job.JobContainer.initJobReader(JobContainer.java:1085)
    	at com.alibaba.datax.core.job.JobContainer.init(JobContainer.java:497)
    	at com.alibaba.datax.core.job.JobContainer.start(JobContainer.java:220)
    	at com.alibaba.datax.core.Engine.start(Engine.java:100)
    	at com.alibaba.datax.core.Engine.entry(Engine.java:321)
    	at com.alibaba.datax.core.Engine.main(Engine.java:354)
    	at com.alibaba.datax.common.exception.DataXException.asDataXException(DataXException.java:41)
    	at com.alibaba.datax.plugin.reader.otsreader.OtsReader$Job.init(OtsReader.java:47)
    	at com.alibaba.datax.core.job.JobContainer.initJobReader(JobContainer.java:1085)
    	at com.alibaba.datax.core.job.JobContainer.init(JobContainer.java:497)
    	at com.alibaba.datax.core.job.JobContainer.start(JobContainer.java:220)
    	at com.alibaba.datax.core.Engine.start(Engine.java:100)
    	at com.alibaba.datax.core.Engine.entry(Engine.java:321)
  • 可能原因

    OTSReader指令碼中配置的主鍵個數與Tablestore資料表中的主鍵個數不一致。

  • 解決方案

    首先查看讀取的Tablestore資料表Schema,確認主鍵個數,然後確保OTSReader指令碼中配置的主鍵個數與Tablestore資料表中的主鍵個數一致。

    假設Tablestore資料表有兩個主鍵列,以全表同步為例,則OTSReader中應該配置的range範圍如下:

    "range": {
      "begin": [
        {
          "type": "INF_MIN"
        },
        {
          "type": "INF_MIN"
        }
      ],
      "end": [
        {
          "type": "INF_MAX"
        },
        {
          "type": "INF_MAX"
        }
      ]
    }

OTSReader運行時出現“Input type of 'range-split' not match partition key. Item of 'range-split' type:xx, Partition type:xx”錯誤

  • 問題現象

    OTSReader運行時出現“Input type of 'range-split' not match partition key. Item of 'range-split' type:xx, Partition type:xx”錯誤。

    com.alibaba.datax.common.exception.DataXException: com.alibaba.datax.plugin.reader.otsreader.OtsReaderError@22f31dec - IllegalArgumentException[ErrorMessage:Input type of 'range-split' not match partition key. Item of 'range-split' type:null, Partition type:STRING] - java.lang.IllegalArgumentException: Input type of 'range-split' not match partition key. Item of 'range-split' type:null, Partition type:STRING
    	at com.alibaba.datax.plugin.reader.otsreader.utils.ParamChecker.checkInputSplitPoints(ParamChecker.java:231)
    	at com.alibaba.datax.plugin.reader.otsreader.OtsReaderMasterProxy.init(OtsReaderMasterProxy.java:92)
    	at com.alibaba.datax.plugin.reader.otsreader.OtsReader$Job.init(OtsReader.java:34)
    	at com.alibaba.datax.core.job.JobContainer.initJobReader(JobContainer.java:1085)
    	at com.alibaba.datax.core.job.JobContainer.init(JobContainer.java:497)
    	at com.alibaba.datax.core.job.JobContainer.start(JobContainer.java:220)
    	at com.alibaba.datax.core.Engine.start(Engine.java:100)
    	at com.alibaba.datax.core.Engine.entry(Engine.java:321)
    	at com.alibaba.datax.core.Engine.main(Engine.java:354)
    	at com.alibaba.datax.common.exception.DataXException.asDataXException(DataXException.java:41)
    	at com.alibaba.datax.plugin.reader.otsreader.OtsReader$Job.init(OtsReader.java:47)
    	at com.alibaba.datax.core.job.JobContainer.initJobReader(JobContainer.java:1085)
    	at com.alibaba.datax.core.job.JobContainer.init(JobContainer.java:497)
    	at com.alibaba.datax.core.job.JobContainer.start(JobContainer.java:220)
    	at com.alibaba.datax.core.Engine.start(Engine.java:100)
    	at com.alibaba.datax.core.Engine.entry(Engine.java:321)
    	at com.alibaba.datax.core.Engine.main(Engine.java:354)
  • 可能原因

    OTSReader指令碼中Split配置錯誤。不支援將Split配置為如下格式JSON:

    "split": [
      {
        "type": "INF_MIN"
      },
      {
      "type": "INF_MAX"
      }
    ]
  • 解決方案

OTSReader運行時出現“Invalid 'column', Can not parse Object to 'OTSColumn', item of list is not a map”錯誤

  • 問題現象

    OTSReader運行時出現“Invalid 'column', Can not parse Object to 'OTSColumn', item of list is not a map”錯誤。

    com.alibaba.datax.common.exception.DataXException: com.alibaba.datax.plugin.reader.otsreader.OtsReaderError@64bce832 – IllegalArgumentException[ErrorMessage:Invalid 'column', Can not parse Object to 'OTSColumn', item of list is not a map.] – java.lang.IllegalArgumentException: Invalid 'column', Can not parse Object to 'OTSColumn', item of list is not a map.
            at com.alibaba.datax.plugin.reader.otsreader.utils.ReaderModelParser.parseOTSColumnList(ReaderModelParser.java:104)
            at com.alibaba.datax.plugin.reader.otsreader.OtsReaderMasterProxy.init(OtsReaderMasterProxy.java:80)
            at com.alibaba.datax.plugin.reader.otsreader.OtsReader$Job.init(OtsReader.java:34)
            at com.alibaba.datax.core.job.JobContainer.initJobReader(JobContainer.java:1085)
            at com.alibaba.datax.core.job.JobContainer.init(JobContainer.java:497)
            at com.alibaba.datax.core.job.JobContainer.start(JobContainer.java:220)
            at com.alibaba.datax.core.Engine.start(Engine.java:100)
            at com.alibaba.datax.core.Engine.entry(Engine.java:321)
            at com.alibaba.datax.core.Engine.main(Engine.java:354)
            at com.alibaba.datax.common.exception.DataXException.asDataXException(DataXException.java:41)
            at com.alibaba.datax.plugin.reader.otsreader.OtsReader$Job.init(OtsReader.java:47)
            at com.alibaba.datax.core.job.JobContainer.initJobReader(JobContainer.java:1085)
            at com.alibaba.datax.core.job.JobContainer.init(JobContainer.java:497)
            at com.alibaba.datax.core.job.JobContainer.start(JobContainer.java:220)
            at com.alibaba.datax.core.Engine.start(Engine.java:100)
            at com.alibaba.datax.core.Engine.entry(Engine.java:321)
            at com.alibaba.datax.core.Engine.main(Engine.java:354)
  • 可能原因

    OTSReader指令碼中的column配置錯誤。錯誤配置樣本如下:

    "column": [
      "id",
      "name",
      "age"
    ]
  • 解決方案

    請確保OTSReader指令碼中的column配置正確。正確配置樣本如下:

    "column": [
      {
        "name": "id"
      },
      {
        "name": "name"
      },
      {
        "name": "age"
      }
    ]