@Override
    public List<OrcSplit> getSplits() throws IOException {
      List<OrcSplit> splits = Lists.newArrayList();
      OrcSplit.OffsetAndBucketProperty offsetAndBucket = null;
      for (HdfsFileStatusWithId file : fileStatuses) {
        if (isOriginal && isAcid && vectorMode) {
          offsetAndBucket = VectorizedOrcAcidRowBatchReader.computeOffsetAndBucket(file.getFileStatus(), dir,
              isOriginal, !deltas.isEmpty(), conf);
        }

        FileStatus fileStatus = file.getFileStatus();
        long logicalLen = isAcid ? AcidUtils.getLogicalLength(fs, fileStatus) : fileStatus.getLen();
        if (logicalLen != 0) {
          Object fileKey = isDefaultFs ? file.getFileId() : null;
          if (fileKey == null && allowSyntheticFileIds) {
            fileKey = new SyntheticFileId(fileStatus);
          }
          if (BlobStorageUtils.isBlobStorageFileSystem(conf, fs)) {
            final long splitSize = HiveConf.getLongVar(conf, HiveConf.ConfVars.HIVE_ORC_BLOB_STORAGE_SPLIT_SIZE);
            LOG.debug("Blob storage detected for BI split strategy. Splitting files at boundary {}..", splitSize);
            long start;
            for (start = 0; start < logicalLen; start = start + splitSize) {
              OrcSplit orcSplit = new OrcSplit(fileStatus.getPath(), fileKey, start,
                Math.min(splitSize, logicalLen - start), null, null, isOriginal, true,
                deltas, -1, logicalLen, dir, offsetAndBucket);
              splits.add(orcSplit);
            }
          } else {
            TreeMap<Long, BlockLocation> blockOffsets = SHIMS.getLocationsWithOffset(fs, fileStatus);
            for (Map.Entry<Long, BlockLocation> entry : blockOffsets.entrySet()) {
              long blockOffset = entry.getKey();
              long blockLength = entry.getValue().getLength();
              if (blockOffset > logicalLen) {
                //don't create splits for anything past logical EOF
                //map is ordered, thus any possible entry in the iteration after this is bound to be > logicalLen
                break;
              }
              long splitLength = blockLength;

              long blockEndOvershoot = (blockOffset + blockLength) - logicalLen;
              if (blockEndOvershoot > 0) {
                // if logicalLen is placed within a block, we should make (this last) split out of the part of this block
                // -> we should read less than block end
                splitLength -= blockEndOvershoot;
              } else if (blockOffsets.lastKey() == blockOffset && blockEndOvershoot < 0) {
                // This is the last block but it ends before logicalLen
                // This can happen with HDFS if hflush was called and blocks are not persisted to disk yet, but content
                // is otherwise available for readers, as DNs have these buffers in memory at this time.
                // -> we should read more than (persisted) block end, but only within the block
                if (fileStatus instanceof HdfsLocatedFileStatus) {
                  HdfsLocatedFileStatus hdfsFileStatus = (HdfsLocatedFileStatus)fileStatus;
                  if (hdfsFileStatus.getLocatedBlocks().isUnderConstruction()) {
                    // sanity check
                    if (logicalLen > blockOffset + hdfsFileStatus.getBlockSize()) {
                      throw new IOException("Side file indicates more data available after the last known block!");
                    }
                    // blockEndOvershoot is negative here...
                    splitLength -= blockEndOvershoot;
                  }
                }
              }
              OrcSplit orcSplit = new OrcSplit(fileStatus.getPath(), fileKey, blockOffset,
                  splitLength, entry.getValue().getHosts(), null, isOriginal, true,
                  deltas, -1, logicalLen, dir, offsetAndBucket);
              splits.add(orcSplit);
            }
          }
        }
      }

      // add uncovered ACID delta splits
      splits.addAll(super.getSplits());
      return splits;
    }
@param dir - root of partition dir
ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java