Defers to {@link BCFSplitGuesser} as appropriate for each individual
path. VCF paths do not require special handling, so their splits are left
unchanged.
979711
@Override public List<InputSplit> getSplits(JobContext job)
		throws IOException
	{
		if (this.conf == null)
			this.conf = job.getConfiguration();

		final List<InputSplit> origSplits = super.getSplits(job);

		// We have to partition the splits by input format and hand the BCF ones
		// over to getBCFSplits().

		final List<FileSplit>
			bcfOrigSplits = new ArrayList<FileSplit>(origSplits.size());
		final List<InputSplit>
			newSplits     = new ArrayList<InputSplit>(origSplits.size());

		for (final InputSplit iSplit : origSplits) {
			final FileSplit split = (FileSplit)iSplit;

			if (VCFFormat.BCF.equals(getFormat(split.getPath())))
				bcfOrigSplits.add(split);
			else
				newSplits.add(split);
		}
		fixBCFSplits(bcfOrigSplits, newSplits);
		return filterByInterval(newSplits, conf);
	}
778958
private Path getSplitPath(FileSplit inputSplit, JobConf conf) throws IOException {
    Path path = inputSplit.getPath();
    if (inputSplit instanceof OrcSplit) {
      OrcSplit orcSplit = (OrcSplit) inputSplit;
      List<Long> deltas = orcSplit.getDeltas();
      if (!orcSplit.hasBase() && deltas.size() >= 2) {
        throw new IOException("Cannot read valid StructTypeInfo from delta only file: " + path);
      }
    }
    LOG.debug("Input split path: {}", path);
    return path;
  }
873093
function concat(divider, sourcePath, relativePaths, done) {
  var writeDivider = false;
  each(relativePaths, function(relativePath, next) {
    var absoluteSourcePath = path.resolve(sourcePath, relativePath);
    var readStream = fs.createReadStream(absoluteSourcePath);
    if (writeDivider) process.stdout.write(divider);
    writeDivider = true;
    readStream.on('close', next).on('error', next).pipe(process.stdout);
  }, done);
}
742389
public static void consumeSubFilePaths(Path startDirectoryPath,
			Predicate<Path> filter, Consumer<Path> consumer) {
		consumeSubFilePaths(startDirectoryPath, Integer.MAX_VALUE, filter,
				consumer);
	}
508104
static VcfSliceProtos.Fields buildDefaultFields(List<Variant> variants) {
        return buildDefaultFields(variants, null, null);
    }
891266
public static void splitFile(File file, long[] splitPoints) throws IOException {
        splitFile(file, splitPoints, file.getParent());
    }
771346
function setPathSet(
    value, path, depth, root, parent, node,
    requestedPaths, optimizedPaths, requestedPath, optimizedPath,
    version, expired, lru, comparator, errorSelector, replacedPaths) {

    var note = {};
    var branch = depth < path.length - 1;
    var keySet = path[depth];
    var key = iterateKeySet(keySet, note);
    var optimizedIndex = optimizedPath.index;

    do {

        requestedPath.depth = depth;

        var results = setNode(
            root, parent, node, key, value,
            branch, false, requestedPath, optimizedPath,
            version, expired, lru, comparator, errorSelector, replacedPaths
        );
        requestedPath[depth] = key;
        requestedPath.index = depth;
        optimizedPath[optimizedPath.index++] = key;
        var nextNode = results[0];
        var nextParent = results[1];
        if (nextNode) {
            if (branch) {
                setPathSet(
                    value, path, depth + 1,
                    root, nextParent, nextNode,
                    requestedPaths, optimizedPaths, requestedPath, optimizedPath,
                    version, expired, lru, comparator, errorSelector
                );
            } else {
                requestedPaths.push(requestedPath.slice(0, requestedPath.index + 1));
                optimizedPaths.push(optimizedPath.slice(0, optimizedPath.index));
            }
        }
        key = iterateKeySet(keySet, note);
        if (note.done) {
            break;
        }
        optimizedPath.index = optimizedIndex;
    } while (true);
}
491119
public static Iterable<SplitPath> getSplits(final Configuration config, Path[] paths) {
        final int splitSize = getSplitSize(config);

        return FluentIterable.from(Arrays.asList(paths))
                .transformAndConcat(new Function<Path, Iterable<? extends SplitPath>>() {
                    @Override
                    public Iterable<? extends SplitPath> apply(Path path) {
                        try {
                            EmoInputSplittable emoFs = (EmoInputSplittable) path.getFileSystem(config);
                            return emoFs.getInputSplits(config, path, splitSize);
                        } catch (IOException e) {
                            throw Throwables.propagate(e);
                        }
                    }
                });
    }
704207
@Override
    public final void setForwardRoutingPath(List<SIDestinationAddress> value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setForwardRoutingPath", value);
        /* It is OK to pass in null for the List */
        if (value != null) {
            for (int i = 0; i < value.size(); i++) {
                /* It is not valid to have a null entry in the List */
                if (value.get(i) == null) {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                        SibTr.exit(this, tc, "setForwardRoutingPath", "NullPointerException");
                    throw new NullPointerException();
                }
                /* All values must be instances of SIDestinationAddress */
                if (!(value.get(i) instanceof SIDestinationAddress)) {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                        SibTr.exit(this, tc, "setForwardRoutingPath", "IllegalArgumentException");
                    throw new IllegalArgumentException(value.toString());
                }
            }
        }
        setFRP(value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setForwardRoutingPath");
    }
944770
private void setWebAppRfsPath(String webInfRfsPath) {

        m_webAppRfsPath = webInfRfsPath;
        if ("".equals(webInfRfsPath)) {
            // required for test cases
            m_configRfsPath = "";
            return;
        }
        if (!m_webAppRfsPath.endsWith(File.separator)) {
            // make sure that Path always ends with a separator, not always the case in different
            // environments since getServletContext().getRealPath("/") does not end with a "/" in
            // all servlet runtimes
            m_webAppRfsPath += File.separator;
        }

        if (CmsStringUtil.isNotEmpty(System.getProperty(CmsSystemInfo.CONFIG_FOLDER_PROPERTY))) {
            m_configRfsPath = System.getProperty(CmsSystemInfo.CONFIG_FOLDER_PROPERTY);
        } else {
            m_configRfsPath = m_webAppRfsPath + CmsSystemInfo.FOLDER_WEBINF + CmsSystemInfo.FOLDER_CONFIG_DEFAULT;
        }
    }
71412
private void addCreatedSplit(List<InputSplit> splitList, 
                               List<String> locations, 
                               ArrayList<OneBlockInfo> validBlocks) {
    // create an input split
    Path[] fl = new Path[validBlocks.size()];
    long[] offset = new long[validBlocks.size()];
    long[] length = new long[validBlocks.size()];
    for (int i = 0; i < validBlocks.size(); i++) {
      fl[i] = validBlocks.get(i).onepath; 
      offset[i] = validBlocks.get(i).offset;
      length[i] = validBlocks.get(i).length;
    }

     // add this split to the list that is returned
    CombineFileSplit thissplit = new CombineFileSplit(fl, offset, 
                                   length, locations.toArray(new String[0]));
    splitList.add(thissplit); 
  }
157020
private int addIndexedSplits(
			List<InputSplit> splits, int i, List<InputSplit> newSplits,
			Configuration cfg)
		throws IOException
	{
		final Path file = ((FileSplit)splits.get(i)).getPath();

		final BGZFBlockIndex idx = new BGZFBlockIndex(
			file.getFileSystem(cfg).open(getIdxPath(file)));

		int splitsEnd = splits.size();
		for (int j = i; j < splitsEnd; ++j)
			if (!file.equals(((FileSplit)splits.get(j)).getPath()))
				splitsEnd = j;

		for (int j = i; j < splitsEnd; ++j) {
			final FileSplit fileSplit = (FileSplit)splits.get(j);

			final long start =         fileSplit.getStart();
			final long end   = start + fileSplit.getLength();

			final Long blockStart = idx.prevBlock(start);
			final Long blockEnd   = j == splitsEnd-1 ? idx.prevBlock(end)
			                                         : idx.nextBlock(end);

			if (blockStart == null)
				throw new RuntimeException(
					"Internal error or invalid index: no block start for " +start);

			if (blockEnd == null)
				throw new RuntimeException(
					"Internal error or invalid index: no block end for " +end);

			newSplits.add(new FileSplit(
				file, blockStart, blockEnd - blockStart,
				fileSplit.getLocations()));
		}
		return splitsEnd;
	}
180299
public Result<List<Long>> finalizeSlicedFindPath() {

        List<Long> path = new ArrayList<>(64);
        if (m_query.status.isFailed()) {
            // Reset query.
            m_query = new QueryData();
            return Result.failure(path);
        }

        if (m_query.startRef == m_query.endRef) {
            // Special case: the search starts and ends at same poly.
            path.add(m_query.startRef);
        } else {
            // Reverse the path.
            if (m_query.lastBestNode.id != m_query.endRef) {
                m_query.status = Status.PARTIAL_RESULT;
            }

            Node prev = null;
            Node node = m_query.lastBestNode;
            int prevRay = 0;
            do {
                Node next = m_nodePool.getNodeAtIdx(node.pidx);
                node.pidx = m_nodePool.getNodeIdx(prev);
                prev = node;
                int nextRay = node.flags & Node.DT_NODE_PARENT_DETACHED; // keep track of whether parent is not adjacent
                                                                         // (i.e. due to raycast shortcut)
                node.flags = (node.flags & ~Node.DT_NODE_PARENT_DETACHED) | prevRay; // and store it in the reversed
                                                                                     // path's node
                prevRay = nextRay;
                node = next;
            } while (node != null);

            // Store path
            node = prev;
            do {
                Node next = m_nodePool.getNodeAtIdx(node.pidx);
                if ((node.flags & Node.DT_NODE_PARENT_DETACHED) != 0) {
                    Result<RaycastHit> iresult = raycast(node.id, node.pos, next.pos, m_query.filter, 0, 0);
                    if (iresult.succeeded()) {
                        path.addAll(iresult.result.path);
                    }
                    // raycast ends on poly boundary and the path might include the next poly boundary.
                    if (path.get(path.size() - 1) == next.id) {
                        path.remove(path.size() - 1); // remove to avoid duplicates
                    }
                } else {
                    path.add(node.id);
                }

                node = next;
            } while (node != null);
        }

        Status status = m_query.status;
        // Reset query.
        m_query = new QueryData();

        return Result.of(status, path);
    }
1371978
def ValidateVfsPath(path):
  """"""

  components = (path or "").lstrip("/").split("/")
  if not components:
    raise ValueError("Empty path is not a valid path: %s." %
                     utils.SmartStr(path))

  if components[0] not in ROOT_FILES_WHITELIST:
    raise ValueError(
        "First path component was '%s', but has to be one of %s" %
        (utils.SmartStr(components[0]), ", ".join(ROOT_FILES_WHITELIST)))

  return True
351425
def split_subpath(path, subpath)
      return "" if path == subpath
      path = File.join(path, ''.freeze)
      if subpath.start_with?(path)
        subpath[path.length..-1]
      else
        nil
      end
    end
1333172
def splitroot(self, path, sep=None):
        """"""
        if sep is None:
            sep = self.filesystem.path_separator
        if self.filesystem.is_windows_fs:
            return self._splitroot_with_drive(path, sep)
        return self._splitroot_posix(path, sep)
645163
public static List<String> applySpecialPaths(List<String> pathTokens) throws IllegalArgumentException {
        final ArrayList<String> newTokens = new ArrayList<String>();
        for (String pathToken : pathTokens) {
            if (isCurrentToken(pathToken)) { continue; } else if (isReverseToken(pathToken)) {
                final int size = newTokens.size();
                if (size == 0) {
                    throw VFSMessages.MESSAGES.onRootPath();
                }
                newTokens.remove(size - 1);
            } else { newTokens.add(pathToken); }
        }
        return newTokens;
    }