private List<FetchInputFormatSplit> splitSampling(SplitSample splitSample,
      List<FetchInputFormatSplit> splits) {
    long totalSize = 0;
    for (FetchInputFormatSplit split: splits) {
        totalSize += split.getLength();
    }
    List<FetchInputFormatSplit> result = new ArrayList<FetchInputFormatSplit>(splits.size());
    long targetSize = splitSample.getTargetSize(totalSize);
    int startIndex = splitSample.getSeedNum() % splits.size();
    long size = 0;
    for (int i = 0; i < splits.size(); i++) {
      FetchInputFormatSplit split = splits.get((startIndex + i) % splits.size());
      result.add(split);
      long splitgLength = split.getLength();
      if (size + splitgLength >= targetSize) {
        if (size + splitgLength > targetSize) {
          split.shrinkedLength = targetSize - size;
        }
        break;
      }
      size += splitgLength;
    }
    return result;
  }
Set context for this fetch operator in to the jobconf.
This helps InputFormats make decisions based on the scope of the complete
operation.
@param conf the configuration to modify
@param paths the list of input directories
ql/src/java/org/apache/hadoop/hive/ql/exec/FetchOperator.java