@Override public TwillPreparer withResources(Iterable<URI> resources) { getDelegate().withResources(resources); return this; }
@Override public TwillPreparer withResources(Iterable<URI> resources) { getDelegate().withResources(resources); return this; }
@Override public TwillPreparer withResources(URI... resources) { getDelegate().withResources(resources); return this; }
@Override public TwillPreparer withResources(URI... resources) { getDelegate().withResources(resources); return this; }
/** * Prepare the specs of the twill application for the Explore twill runnable. * Add jars needed by the Explore module in the classpath of the containers, and * add conf files (hive_site.xml, etc) as resources available for the Explore twill * runnable. */ private TwillPreparer prepareExploreContainer(TwillPreparer preparer) throws IOException { // Add all the conf files needed by hive as resources. They will be available in the explore container classpath Set<String> addedFiles = Sets.newHashSet(); for (File file : ExploreUtils.getExploreConfFiles()) { String name = file.getName(); if (name.equals("logback.xml") || !name.endsWith(".xml")) { continue; } if (addedFiles.add(name)) { LOG.debug("Adding config file: {}", file.getAbsolutePath()); preparer = preparer.withResources(file.toURI()); } else { LOG.warn("Ignoring duplicate config file: {}", file); } } // Setup SPARK_HOME environment variable as well if spark is configured String sparkHome = System.getenv(Constants.SPARK_HOME); if (sparkHome != null) { preparer.withEnv(Constants.Service.EXPLORE_HTTP_USER_SERVICE, Collections.singletonMap(Constants.SPARK_HOME, sparkHome)); } return preparer; }
String jarPath = "file:" + f.getCanonicalPath(); log.trace("Adding library jar (" + f.getName() + ") to Fluo application."); preparer.withResources(new URI(jarPath)); String jarPath = "file:" + f.getCanonicalPath(); log.debug("Adding application jar (" + f.getName() + ") to Fluo application."); preparer.withResources(new URI(jarPath));
String jarPath = "file:" + f.getCanonicalPath(); log.trace("Adding library jar (" + f.getName() + ") to Fluo application."); preparer.withResources(new URI(jarPath)); String jarPath = "file:" + f.getCanonicalPath(); log.debug("Adding application jar (" + f.getName() + ") to Fluo application."); preparer.withResources(new URI(jarPath));
String jarPath = "file:" + f.getCanonicalPath(); log.trace("Adding library jar (" + f.getName() + ") to Fluo application."); preparer.withResources(new URI(jarPath)); String jarPath = "file:" + f.getCanonicalPath(); log.debug("Adding application jar (" + f.getName() + ") to Fluo application."); preparer.withResources(new URI(jarPath));
.withResources(logbackFile.toUri()) .withEnv(Collections.singletonMap("CDAP_LOG_DIR", ApplicationConstants.LOG_DIR_EXPANSION_VAR));
.withApplicationArguments("local") .withArguments("LocalFileSocketServer", "local2") .withResources(footerFile.toURI()) .addLogHandler(new PrinterLogHandler(new PrintWriter(System.out, true))) .start();
twillPreparer.withResources(configResources);
twillPreparer.withResources(configResources);