private static String getFSIdentifier(URI uri) { if (new LocalFileSystem().getScheme().equals(uri.getScheme())) { return "localhost"; } else { return ClustersNames.getInstance().getClusterName(uri.toString()); } }
private static String getFSIdentifier(URI uri) { if (new LocalFileSystem().getScheme().equals(uri.getScheme())) { return "localhost"; } else { return ClustersNames.getInstance().getClusterName(uri.toString()); } }
private static String getFSIdentifier(URI uri) { if (new LocalFileSystem().getScheme().equals(uri.getScheme())) { return "localhost"; } else { return ClustersNames.getInstance().getClusterName(uri.toString()); } }
if (srcScheme == null || srcScheme.equals(FileSystem.getLocal(getConf()).getScheme()) || srcScheme.equals("jar")) {
/** * check the counters to see whether the task has exceeded any configured * limits. * @throws TaskLimitException */ protected void checkTaskLimits() throws TaskLimitException { // check the limit for writing to local file system long limit = conf.getLong(MRJobConfig.TASK_LOCAL_WRITE_LIMIT_BYTES, MRJobConfig.DEFAULT_TASK_LOCAL_WRITE_LIMIT_BYTES); if (limit >= 0) { Counters.Counter localWritesCounter = null; try { LocalFileSystem localFS = FileSystem.getLocal(conf); localWritesCounter = counters.findCounter(localFS.getScheme(), FileSystemCounter.BYTES_WRITTEN); } catch (IOException e) { LOG.warn("Could not get LocalFileSystem BYTES_WRITTEN counter"); } if (localWritesCounter != null && localWritesCounter.getCounter() > limit) { throw new TaskLimitException("too much write to local file system." + " current value is " + localWritesCounter.getCounter() + " the limit is " + limit); } } }