/** * Create a local scratch directory on demand and return it. */ public Path getLocalScratchDir(boolean mkdir) { try { FileSystem fs = FileSystem.getLocal(conf); URI uri = fs.getUri(); return getScratchDir(uri.getScheme(), uri.getAuthority(), mkdir, localScratchDir); } catch (IOException e) { throw new RuntimeException (e); } }
/** * Create a local scratch directory on demand and return it. */ public Path getLocalScratchDir(boolean mkdir) { try { FileSystem fs = FileSystem.getLocal(conf); URI uri = fs.getUri(); return getScratchDir(uri.getScheme(), uri.getAuthority(), mkdir, localScratchDir); } catch (IOException e) { throw new RuntimeException (e); } }
/** * Create a map-reduce scratch directory on demand and return it. * */ public Path getMRScratchDir() { // if we are executing entirely on the client side - then // just (re)use the local scratch directory if(isLocalOnlyExecutionMode()) { return getLocalScratchDir(!isExplainSkipExecution()); } try { Path dir = FileUtils.makeQualified(nonLocalScratchPath, conf); URI uri = dir.toUri(); Path newScratchDir = getScratchDir(uri.getScheme(), uri.getAuthority(), !isExplainSkipExecution(), uri.getPath()); LOG.info("New scratch dir is " + newScratchDir); return newScratchDir; } catch (IOException e) { throw new RuntimeException(e); } catch (IllegalArgumentException e) { throw new RuntimeException("Error while making MR scratch " + "directory - check filesystem config (" + e.getCause() + ")", e); } }
/** * Create a map-reduce scratch directory on demand and return it. * */ public Path getMRScratchDir() { // if we are executing entirely on the client side - then // just (re)use the local scratch directory if(isLocalOnlyExecutionMode()) { return getLocalScratchDir(!isExplainSkipExecution()); } try { Path dir = FileUtils.makeQualified(nonLocalScratchPath, conf); URI uri = dir.toUri(); Path newScratchDir = getScratchDir(uri.getScheme(), uri.getAuthority(), !isExplainSkipExecution(), uri.getPath()); LOG.info("New scratch dir is " + newScratchDir); return newScratchDir; } catch (IOException e) { throw new RuntimeException(e); } catch (IllegalArgumentException e) { throw new RuntimeException("Error while making MR scratch " + "directory - check filesystem config (" + e.getCause() + ")", e); } }
private String getExternalScratchDir(URI extURI) { return getScratchDir(extURI.getScheme(), extURI.getAuthority(), !explain, nonLocalScratchPath.toUri().getPath()); }
/** * Create a local scratch directory on demand and return it. */ public String getLocalScratchDir(boolean mkdir) { try { FileSystem fs = FileSystem.getLocal(conf); URI uri = fs.getUri(); return getScratchDir(uri.getScheme(), uri.getAuthority(), mkdir, localScratchDir); } catch (IOException e) { throw new RuntimeException (e); } }
/** * Create a local scratch directory on demand and return it. */ public Path getLocalScratchDir(boolean mkdir) { try { FileSystem fs = FileSystem.getLocal(conf); URI uri = fs.getUri(); return getScratchDir(uri.getScheme(), uri.getAuthority(), mkdir, localScratchDir); } catch (IOException e) { throw new RuntimeException (e); } }
/** * Create a map-reduce scratch directory on demand and return it. * */ public String getMRScratchDir() { // if we are executing entirely on the client side - then // just (re)use the local scratch directory if(isLocalOnlyExecutionMode()) return getLocalScratchDir(!explain); try { Path dir = FileUtils.makeQualified(nonLocalScratchPath, conf); URI uri = dir.toUri(); return getScratchDir(uri.getScheme(), uri.getAuthority(), !explain, uri.getPath()); } catch (IOException e) { throw new RuntimeException(e); } catch (IllegalArgumentException e) { throw new RuntimeException("Error while making MR scratch " + "directory - check filesystem config (" + e.getCause() + ")", e); } }
/** * Create a map-reduce scratch directory on demand and return it. * */ public Path getMRScratchDir() { // if we are executing entirely on the client side - then // just (re)use the local scratch directory if(isLocalOnlyExecutionMode()) { return getLocalScratchDir(!explain); } try { Path dir = FileUtils.makeQualified(nonLocalScratchPath, conf); URI uri = dir.toUri(); Path newScratchDir = getScratchDir(uri.getScheme(), uri.getAuthority(), !explain, uri.getPath()); LOG.info("New scratch dir is " + newScratchDir); return newScratchDir; } catch (IOException e) { throw new RuntimeException(e); } catch (IllegalArgumentException e) { throw new RuntimeException("Error while making MR scratch " + "directory - check filesystem config (" + e.getCause() + ")", e); } }