{"record":{"id":"e82b0c2ab44771cf","repo":"apache/hadoop","slug":"unsupported-split-version-vers","errorCode":null,"errorMessage":"Unsupported split version {vers}","messagePattern":"Unsupported split version (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/split/SplitMetaInfoReader.java","lineNumber":65,"sourceCode":"    long maxMetaInfoSize = conf.getLong(MRJobConfig.SPLIT_METAINFO_MAXSIZE,\n        MRJobConfig.DEFAULT_SPLIT_METAINFO_MAXSIZE);\n    Path metaSplitFile = JobSubmissionFiles.getJobSplitMetaFile(jobSubmitDir);\n    String jobSplitFile = JobSubmissionFiles.getJobSplitFile(jobSubmitDir).toString();\n    FileStatus fStatus = fs.getFileStatus(metaSplitFile);\n    if (maxMetaInfoSize > 0 && fStatus.getLen() > maxMetaInfoSize) {\n      throw new IOException(\"Split metadata size exceeded \" +\n          maxMetaInfoSize +\". Aborting job \" + jobId);\n    }\n    FSDataInputStream in = fs.open(metaSplitFile);\n    byte[] header = new byte[JobSplit.META_SPLIT_FILE_HEADER.length];\n    in.readFully(header);\n    if (!Arrays.equals(JobSplit.META_SPLIT_FILE_HEADER, header)) {\n      throw new IOException(\"Invalid header on split file\");\n    }\n    int vers = WritableUtils.readVInt(in);\n    if (vers != JobSplit.META_SPLIT_VERSION) {\n      in.close();\n      throw new IOException(\"Unsupported split version \" + vers);\n    }\n    int numSplits = WritableUtils.readVInt(in); //TODO: check for insane values\n    JobSplit.TaskSplitMetaInfo[] allSplitMetaInfo = \n      new JobSplit.TaskSplitMetaInfo[numSplits];\n    for (int i = 0; i < numSplits; i++) {\n      JobSplit.SplitMetaInfo splitMetaInfo = new JobSplit.SplitMetaInfo();\n      splitMetaInfo.readFields(in);\n      JobSplit.TaskSplitIndex splitIndex = new JobSplit.TaskSplitIndex(\n          jobSplitFile, \n          splitMetaInfo.getStartOffset());\n      allSplitMetaInfo[i] = new JobSplit.TaskSplitMetaInfo(splitIndex, \n          splitMetaInfo.getLocations(), \n          splitMetaInfo.getInputDataLength());\n    }\n    in.close();\n    return allSplitMetaInfo;\n  }\n","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/split/SplitMetaInfoReader.java#L47-L83","documentation":"After the header, readSplitMetaInfo reads a version integer that must equal JobSplit.META_SPLIT_VERSION; any other value throws with the offending number. The split metadata file was written by a Hadoop release whose split format differs from the one now reading it.","triggerScenarios":"A client on Hadoop version X writes job.splitmetainfo, the ResourceManager/AM on version Y reads it during a rolling upgrade or from a mis-versioned gateway; stale metainfo from an earlier cluster version reused via a shared staging dir.","commonSituations":"Gateway machines with newer/older hadoop-mapreduce-client jars than the cluster; rolling upgrades where old AMs read new clients' submissions; staging dirs reused across an upgrade.","solutions":["Submit from a client whose Hadoop version matches the cluster (check hadoop classpath on the gateway)","Clear stale staging directories after an upgrade so old metainfo files are not picked up","Complete rolling upgrades before resubmitting jobs that failed mid-upgrade"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if (!VersionInfo.getVersion().equals(clusterVersion)) {\n  log.warn(\"Client {} vs cluster {} — split metainfo version may mismatch\",\n      VersionInfo.getVersion(), clusterVersion);\n}","typeGuard":null,"tryCatchPattern":"try {\n  job.submit();\n} catch (IOException e) {\n  if (String.valueOf(e.getMessage()).startsWith(\"Unsupported split version\")) {\n    throw new IOException(\"Client/cluster Hadoop version mismatch writing split metainfo\", e);\n  }\n  throw e;\n}","preventionTips":["Submit from a gateway whose Hadoop version matches the cluster","Purge staging dirs across upgrades","Pause job submissions during rolling upgrades"],"tags":["mapreduce","job-submission","splits","version-mismatch","upgrade"],"backgroundTag":"unsupported-format-version","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}