YarnConfig extends MapConfig { public String getPackagePath() { String packagePath = get(PACKAGE_PATH); if (packagePath == null) { throw new SamzaException("No YARN package path defined in config."); } return packagePath; } YarnConfig(Config config); int getAMPollIntervalMs(); String getContainerLabel(); boolean getJmxServerEnabled(); String getPackagePath(); int getAMContainerMaxMemoryMb(); String getAMContainerLabel(); int getAMContainerMaxCpuCores(); String getAmOpts(); String getQueueName(); String getAMJavaHome(); int getAllocatorSleepTime(); int getContainerRequestTimeout(); String getYarnKerberosPrincipal(); String getYarnKerberosKeytab(); long getYarnTokenRenewalIntervalSeconds(); String getYarnCredentialsFile(); String getYarnJobStagingDirectory(); String getYarnApplicationViewAcl(); String getYarnApplicationModifyAcl(); String getYarnApplicationType(); Map<ApplicationAccessType, String> getYarnApplicationAcls(); static final String PACKAGE_PATH; static final String YARN_APPLICATION_TYPE; static final String DEFAULT_SAMZA_APPLICATION_TYPE; static final String QUEUE_NAME; static final String CONTAINER_LABEL; static final String AM_JVM_OPTIONS; static final String AM_JMX_ENABLED; static final String AM_CONTAINER_MAX_MEMORY_MB; static final String AM_CONTAINER_LABEL; static final String AM_CONTAINER_MAX_CPU_CORES; static final String AM_POLL_INTERVAL_MS; static final String AM_JAVA_HOME; static final String ALLOCATOR_SLEEP_MS; static final String CONTAINER_REQUEST_TIMEOUT_MS; static final String YARN_KERBEROS_PRINCIPAL; static final String YARN_KERBEROS_KEYTAB; static final String YARN_TOKEN_RENEWAL_INTERVAL_SECONDS; static final String YARN_CREDENTIALS_FILE; static final String YARN_JOB_STAGING_DIRECTORY; static final String YARN_APPLICATION_VIEW_ACL; static final String YARN_APPLICATION_MODIFY_ACL; }
@Test public void testGetPackagePath() { String packagePath = "http: Config config = new MapConfig(Collections.singletonMap(YarnConfig.PACKAGE_PATH, packagePath)); assertEquals(packagePath, new YarnConfig(config).getPackagePath()); }
@Test(expected = SamzaException.class) public void testGetPackagePathMissingConfig() { new YarnConfig(new MapConfig()).getPackagePath(); }