List of usage examples for org.apache.hadoop.mapreduce Job SUBMIT_REPLICATION
String SUBMIT_REPLICATION
To view the source code for org.apache.hadoop.mapreduce Job SUBMIT_REPLICATION.
Click Source Link
From source file:org.apache.pig.backend.hadoop.executionengine.tez.TezResourceManager.java
License:Apache License
public Path addTezResource(URI uri) throws IOException { synchronized (this) { Path resourcePath = new Path(uri.getPath()); String resourceName = resourcePath.getName(); if (resources.containsKey(resourceName)) { return resources.get(resourceName); }//from w ww . j av a 2s .c o m // Ship the local resource to the staging directory on the remote FS if (uri.toString().startsWith("file:")) { Path remoteFsPath = remoteFs.makeQualified(new Path(stagingDir, resourceName)); remoteFs.copyFromLocalFile(resourcePath, remoteFsPath); remoteFs.setReplication(remoteFsPath, (short) conf.getInt(Job.SUBMIT_REPLICATION, 3)); resources.put(resourceName, remoteFsPath); return remoteFsPath; } resources.put(resourceName, resourcePath); return resourcePath; } }