@Override public Object run() throws Exception {
        ShimLoader.getHadoopShims().checkFileAccess(fsAsUser, stat, action);
        addChildren(fsAsUser, stat.getPath(), children);
        return null;
      }
Perform a check to determine if the user is able to access the file passed in.
If the user name passed in is different from the current user, this method will
attempt to do impersonate the user to do the check; the current user should be
able to create proxy users in this case.
@param fs   FileSystem of the path to check
@param stat FileStatus representing the file
@param action FsAction that will be checked
@param user User name of the user that will be checked for access.  If the user name
            is null or the same as the current user, no user impersonation will be done
            and the check will be done as the current user. Otherwise the file access
            check will be performed within a doAs() block to use the access privileges
            of this user. In this case the user must be configured to impersonate other
            users, otherwise this check will fail with error.
@param children List of children to be collected. If this is null, no children are collected.
       To be set only if this is a directory
@throws IOException
@throws AccessControlException
@throws InterruptedException
@throws Exception
common/src/java/org/apache/hadoop/hive/common/FileUtils.java