Tabnine Logo
DagUtils.localizeTempFiles
Code IndexAdd Tabnine to your IDE (free)

How to use
localizeTempFiles
method
in
org.apache.hadoop.hive.ql.exec.tez.DagUtils

Best Java code snippets using org.apache.hadoop.hive.ql.exec.tez.DagUtils.localizeTempFiles (Showing top 6 results out of 315)

origin: apache/drill

public void refreshLocalResourcesFromConf(HiveConf conf)
 throws IOException, LoginException, IllegalArgumentException, URISyntaxException, TezException {
 String dir = tezScratchDir.toString();
 localizedResources.clear();
 // these are local resources set through add file, jar, etc
 List<LocalResource> lrs = utils.localizeTempFilesFromConf(dir, conf);
 if (lrs != null) {
  localizedResources.addAll(lrs);
 }
 // these are local resources that are set through the mr "tmpjars" property
 List<LocalResource> handlerLr = utils.localizeTempFiles(dir, conf,
  additionalFilesNotFromConf.toArray(new String[additionalFilesNotFromConf.size()]));
 if (handlerLr != null) {
  localizedResources.addAll(handlerLr);
 }
}
origin: apache/drill

/**
 * Converted the list of jars into local resources
 */
Map<String,LocalResource> getExtraLocalResources(JobConf jobConf, Path scratchDir,
  String[] inputOutputJars) throws Exception {
 final Map<String,LocalResource> resources = new HashMap<String,LocalResource>();
 final List<LocalResource> localResources = utils.localizeTempFiles(
   scratchDir.toString(), jobConf, inputOutputJars);
 if (null != localResources) {
  for (LocalResource lr : localResources) {
   resources.put(utils.getBaseName(lr), lr);
  }
 }
 return resources;
}
origin: apache/hive

newResources = utils.localizeTempFiles(dir, conf, newFilesNotFromConf, skipFilesFromConf);
if (newResources != null) {
 resources.localizedResources.addAll(newResources);
origin: apache/hive

@Test
public void testExistingSessionGetsStorageHandlerResources() throws Exception {
 final String[] inputOutputJars = new String[] {"file:///tmp/foo.jar"};
 LocalResource res = createResource(inputOutputJars[0]);
 final List<LocalResource> resources = Collections.singletonList(res);
 when(utils.localizeTempFiles(anyString(), any(Configuration.class), eq(inputOutputJars),
   any(String[].class))).thenReturn(resources);
 when(sessionState.isOpen()).thenReturn(true);
 when(sessionState.isOpening()).thenReturn(false);
 task.ensureSessionHasResources(sessionState, inputOutputJars);
 // TODO: ideally we should have a test for session itself.
 verify(sessionState).ensureLocalResources(any(Configuration.class), eq(inputOutputJars));
}
origin: com.facebook.presto.hive/hive-apache

public void refreshLocalResourcesFromConf(HiveConf conf)
 throws IOException, LoginException, IllegalArgumentException, URISyntaxException, TezException {
 String dir = tezScratchDir.toString();
 localizedResources.clear();
 // these are local resources set through add file, jar, etc
 List<LocalResource> lrs = utils.localizeTempFilesFromConf(dir, conf);
 if (lrs != null) {
  localizedResources.addAll(lrs);
 }
 // these are local resources that are set through the mr "tmpjars" property
 List<LocalResource> handlerLr = utils.localizeTempFiles(dir, conf,
  additionalFilesNotFromConf.toArray(new String[additionalFilesNotFromConf.size()]));
 if (handlerLr != null) {
  localizedResources.addAll(handlerLr);
 }
}
origin: com.facebook.presto.hive/hive-apache

/**
 * Converted the list of jars into local resources
 */
Map<String,LocalResource> getExtraLocalResources(JobConf jobConf, Path scratchDir,
  String[] inputOutputJars) throws Exception {
 final Map<String,LocalResource> resources = new HashMap<String,LocalResource>();
 final List<LocalResource> localResources = utils.localizeTempFiles(
   scratchDir.toString(), jobConf, inputOutputJars);
 if (null != localResources) {
  for (LocalResource lr : localResources) {
   resources.put(utils.getBaseName(lr), lr);
  }
 }
 return resources;
}
org.apache.hadoop.hive.ql.exec.tezDagUtilslocalizeTempFiles

Javadoc

Localizes files, archives and jars from a provided array of names.

Popular methods of DagUtils

  • addCredentials
  • createEdge
    Given a Vertex group and a vertex createEdge will create an Edge between them.
  • createVertex
  • getInstance
    Singleton
  • getTezDir
    Gets the tez dir that belongs to the hive scratch dir
  • addTempResources
  • checkPreExisting
  • createConfiguration
    Creates and initializes a JobConf object that can be used to execute the DAG. The configuration obje
  • createEdgeProperty
  • createLocalResource
  • createPartitionerConf
    Utility method to create a stripped down configuration for the MR partitioner.
  • createPreWarmVertex
  • createPartitionerConf,
  • createPreWarmVertex,
  • createTezDir,
  • getBaseName,
  • getContainerEnvironment,
  • getContainerJavaOpts,
  • getContainerResource,
  • getDefaultDestDir,
  • getExecJarPathLocal

Popular in Java

  • Making http requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • requestLocationUpdates (LocationManager)
  • getSharedPreferences (Context)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now