@Override public FileStatus[] globStatus(Path pathPattern) throws IOException { FileStatus[] statuses = super.globStatus(pathPattern); if (statuses == null) { acquirePermit("globStatus " + pathPattern); } else { acquirePermits(statuses.length / LISTING_FILES_PER_PERMIT + 1, "globStatus " + pathPattern); } return statuses; }
/** * Add timer metrics to {@link DistributedFileSystem#globStatus(Path, PathFilter)} */ public FileStatus[] globStatus(Path pathPattern, PathFilter filter) throws IOException { try (TimerContextWithLog context = new TimerContextWithLog(globStatusTimer.time(), "globStatus", pathPattern, filter)) { FileStatus[] statuses = super.globStatus(pathPattern, filter); context.setResult(statuses); return statuses; } }
/** * Add timer metrics to {@link DistributedFileSystem#globStatus(Path)} */ public FileStatus[] globStatus(Path pathPattern) throws IOException { try (TimerContextWithLog context = new TimerContextWithLog(globStatusTimer.time(), "globStatus", pathPattern)) { FileStatus[] statuses = super.globStatus(pathPattern); context.setResult(statuses); return statuses; } }
@Override public FileStatus[] globStatus(Path pathPattern) throws IOException { FileStatus[] statuses = super.globStatus(pathPattern); if (statuses == null) { acquirePermit("globStatus " + pathPattern); } else { acquirePermits(statuses.length / LISTING_FILES_PER_PERMIT + 1, "globStatus " + pathPattern); } return statuses; }
/** * Add timer metrics to {@link DistributedFileSystem#globStatus(Path)} */ public FileStatus[] globStatus(Path pathPattern) throws IOException { try (TimerContextWithLog context = new TimerContextWithLog(globStatusTimer.time(), "globStatus", pathPattern)) { FileStatus[] statuses = super.globStatus(pathPattern); context.setResult(statuses); return statuses; } }
/** * Add timer metrics to {@link DistributedFileSystem#globStatus(Path, PathFilter)} */ public FileStatus[] globStatus(Path pathPattern, PathFilter filter) throws IOException { try (TimerContextWithLog context = new TimerContextWithLog(globStatusTimer.time(), "globStatus", pathPattern, filter)) { FileStatus[] statuses = super.globStatus(pathPattern, filter); context.setResult(statuses); return statuses; } }