Examples of PathFilter


Examples of org.apache.hadoop.fs.PathFilter

            throw new IOException("Path " + fileName + " does not exist on the FileSystem");
        }
        FileStatus fileStatus = fs.getFileStatus(path);
        FileStatus[] files;
        if (fileStatus.isDir()) {
            files = fs.listStatus(path, new PathFilter() {
                public boolean accept(Path p) {
                    return !p.getName().startsWith("_");
                }
            });
        } else {
View Full Code Here

Examples of org.apache.hadoop.fs.PathFilter

        !conf.getBoolVar(HiveConf.ConfVars.LOCALMODEAUTO)) {
      return;
    }

    final Context lCtx = ctx;
    PathFilter p = new PathFilter () {
        public boolean accept(Path file) {
          return !lCtx.isMRTmpFileURI(file.toUri().getPath());
        }
      };
    List<ExecDriver> mrtasks = Utilities.getMRTasks(rootTasks);
View Full Code Here

Examples of org.apache.hadoop.fs.PathFilter

        // Look for reference files.  Call listPaths with an anonymous
        // instance of PathFilter.

        FileStatus [] ps = fs.listStatus(p,
            new PathFilter () {
              public boolean accept(Path path) {
                return HStore.isReference(path);
              }
            }
        );
View Full Code Here

Examples of org.apache.hadoop.fs.PathFilter

        !conf.getBoolVar(HiveConf.ConfVars.LOCALMODEAUTO)) {
      return;
    }

    final Context lCtx = ctx;
    PathFilter p = new PathFilter() {
      public boolean accept(Path file) {
        return !lCtx.isMRTmpFileURI(file.toUri().getPath());
      }
    };
    List<ExecDriver> mrtasks = Utilities.getMRTasks(rootTasks);
View Full Code Here

Examples of org.apache.hadoop.fs.PathFilter

   * @return array of the current HFiles in the table (could be a zero-length array)
   * @throws IOException on unexecpted error reading the FS
   */
  public static FileStatus[] listHFiles(final FileSystem fs, Path tableDir) throws IOException {
    // setup the filters we will need based on the filesystem
    PathFilter regionFilter = new FSUtils.RegionDirFilter(fs);
    PathFilter familyFilter = new FSUtils.FamilyDirFilter(fs);
    final PathFilter fileFilter = new PathFilter() {
      @Override
      public boolean accept(Path file) {
        try {
          return fs.isFile(file);
        } catch (IOException e) {
View Full Code Here

Examples of org.apache.hadoop.fs.PathFilter

                archiveList.add(processWorkflowLib);
                return;
            }

            // lib path is a directory, add each file under the lib dir to archive
            final FileStatus[] fileStatuses = fs.listStatus(libPath, new PathFilter() {
                @Override
                public boolean accept(Path path) {
                    try {
                        return fs.isFile(path) && path.getName().endsWith(".jar");
                    } catch (IOException ignore) {
View Full Code Here

Examples of org.apache.hadoop.fs.PathFilter

    if (!fs.getFileStatus(parentdir).isDir()) {
      throw new IOException(parentdirName + " not a directory");
    }
    // Look for regions in parentdir.
    Path [] regiondirs =
      fs.listPaths(parentdir, new PathFilter() {
        /* (non-Javadoc)
         * @see org.apache.hadoop.fs.PathFilter#accept(org.apache.hadoop.fs.Path)
         */
        public boolean accept(Path path) {
          Matcher m = REGION_NAME_PARSER.matcher(path.getName());
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.observation.filter.PathFilter

    }

    public Filter getFilter(ImmutableTree beforeTree, ImmutableTree afterTree,
            TreePermission treePermission) {
        List<Filter> filters = Lists.<Filter>newArrayList(
                new PathFilter(beforeTree, afterTree, path, deep));

        if ((ALL_EVENTS & eventTypes) == 0) {
            return Filters.excludeAll();
        } else if ((ALL_EVENTS & eventTypes) != ALL_EVENTS) {
            filters.add(new EventTypeFilter(eventTypes));
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.api.PathFilter

    public void dump(DumpContext ctx, boolean isLast) {
        ctx.printf(isLast, "%s:", getClass().getSimpleName());
        ctx.indent(isLast);
        Iterator<PathFilter> iter = getIgnored().iterator();
        while (iter.hasNext()) {
            PathFilter e = iter.next();
            e.dump(ctx, !iter.hasNext());
        }
        ctx.outdent();
    }
View Full Code Here

Examples of org.eclipse.jgit.treewalk.filter.PathFilter

   */
  public static SubmoduleWalk forPath(Repository repository,
      AnyObjectId treeId, String path) throws IOException {
    SubmoduleWalk generator = new SubmoduleWalk(repository);
    generator.setTree(treeId);
    PathFilter filter = PathFilter.create(path);
    generator.setFilter(filter);
    while (generator.next())
      if (filter.isDone(generator.walk))
        return generator;
    return null;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.