@Override public ApplicationId getApplicationID() { return this.attemptId.getApplicationId(); }
@Override public ApplicationId getApplicationID() { return applicationAttemptID.getApplicationId(); }
private static String getApplicationId(ContainerId containerId) { return containerId.getApplicationAttemptId().getApplicationId().toString(); }
private ServiceRecord setupServiceRecord() { ServiceRecord application = new ServiceRecord(); application.set(YarnRegistryAttributes.YARN_ID, jstormMasterContext.appAttemptID.getApplicationId().toString()); application.description = JOYConstants.AM; application.set(YarnRegistryAttributes.YARN_PERSISTENCE, PersistencePolicies.PERMANENT); Map<String, String> addresses = new HashMap<String, String>(); addresses.put(JOYConstants.HOST, jstormMasterContext.appMasterHostname); addresses.put(JOYConstants.PORT, String.valueOf(jstormMasterContext.appMasterThriftPort)); Endpoint endpoint = new Endpoint(JOYConstants.HTTP, JOYConstants.HOST_PORT, JOYConstants.RPC, addresses); application.addExternalEndpoint(endpoint); return application; }
public ContainerFactory(ApplicationAttemptId appAttemptId, long appIdLong) { this.nextId = new AtomicLong(1); ApplicationId appId = ApplicationId.newInstance(appIdLong, appAttemptId.getApplicationId().getId()); this.customAppAttemptId = ApplicationAttemptId.newInstance(appId, appAttemptId.getAttemptId()); }
Thread.sleep(JOYConstants.HEARTBEAT_TIME_INTERVAL); appPath = RegistryUtils.servicePath( JOYConstants.APP_TYPE, jstormMasterContext.instanceName, jstormMasterContext.appAttemptID.getApplicationId().toString()); ServiceRecord app = new ServiceRecord(); Date now = new Date(); JOYConstants.APP_TYPE, jstormMasterContext.instanceName, jstormMasterContext.appAttemptID.getApplicationId().toString()); try { registryOperations.delete(appPath, true);
containerEnv.put(XLearningConstants.Environment.APP_ID.toString(), applicationAttemptID.getApplicationId().toString());
+ jstormMasterContext.appAttemptID.getApplicationId().getId() + ", clustertimestamp=" + jstormMasterContext.appAttemptID.getApplicationId().getClusterTimestamp() + ", attemptId=" + jstormMasterContext.appAttemptID.getAttemptId());
String exectorCommand = ExecutorLoader.loadCommand(jstormMasterContext.instanceName, jstormMasterContext.shellCommand, startTypeStr, this.container.getId().toString(), localDir, jstormMasterContext.deployPath, hadoopHome, javaHome, pythonHome, dstPath, slotPortsStr, jstormMasterContext.shellArgs, envs.get(JOYConstants.CLASS_PATH), JOYConstants.ExecShellStringPath, jstormMasterContext.appAttemptID.getApplicationId().toString(), logviewPort, nimbusThriftPort);
+ applicationAttemptID.getApplicationId().getId() + ", clustertimestamp=" + applicationAttemptID.getApplicationId().getClusterTimestamp() + ", attemptId=" + applicationAttemptID.getAttemptId());
@Override public ApplicationId getApplicationId() { for (ChildData childData : instancesCache.getCurrentData()) { byte[] data = getWorkerData(childData, WORKER_PREFIX); if (data == null) continue; ServiceRecord sr = null; try { sr = encoder.fromBytes(childData.getPath(), data); } catch (IOException e) { LOG.error("Unable to decode data for zkpath: {}." + " Ignoring from current instances list..", childData.getPath()); continue; } String containerStr = sr.get(HiveConf.ConfVars.LLAP_DAEMON_CONTAINER_ID.varname); if (containerStr == null || containerStr.isEmpty()) continue; return ContainerId.fromString(containerStr).getApplicationAttemptId().getApplicationId(); } return null; } }
FsPermission LOG_FILE_PERMISSION = FsPermission.createImmutable((short) 0777); Path logdir = new Path(conf.get(XLearningConfiguration.XLEARNING_HISTORY_LOG_DIR, XLearningConfiguration.DEFAULT_XLEARNING_HISTORY_LOG_DIR) + "/" + applicationAttemptID.getApplicationId().toString() + "/" + applicationAttemptID.getApplicationId().toString()); Path jobLogPath = new Path(xlearningConf.get("fs.defaultFS"), logdir); LOG.info("jobLogPath:" + jobLogPath.toString()); if (conf.get(XLearningConfiguration.XLEARNING_TF_BOARD_HISTORY_DIR, XLearningConfiguration.DEFAULT_XLEARNING_TF_BOARD_HISTORY_DIR).equals(xlearningConf.get(XLearningConfiguration.XLEARNING_TF_BOARD_HISTORY_DIR, XLearningConfiguration.DEFAULT_XLEARNING_TF_BOARD_HISTORY_DIR))) { boardLogPath = new Path(xlearningConf.get("fs.defaultFS"), conf.get(XLearningConfiguration.XLEARNING_TF_BOARD_HISTORY_DIR, XLearningConfiguration.DEFAULT_XLEARNING_TF_BOARD_HISTORY_DIR) + "/" + applicationAttemptID.getApplicationId().toString()); } else { boardLogPath = new Path(conf.get("fs.defaultFS"), conf.get(XLearningConfiguration.XLEARNING_TF_BOARD_HISTORY_DIR,
JOYConstants.APP_TYPE, jstormMasterContext.instanceName, jstormMasterContext.appAttemptID.getApplicationId().toString(), containerStatus.getContainerId().toString()); try { if (registryOperations.exists(containerPath)) {
applicationHistoryUrl = conf.get(XLearningConfiguration.XLEARNING_HISTORY_WEBAPP_ADDRESS, XLearningConfiguration.DEFAULT_XLEARNING_HISTORY_WEBAPP_ADDRESS) + "/jobhistory/job/" + applicationAttemptID.getApplicationId(); LOG.info("master tracking url:" + applicationMasterTrackingUrl); LOG.info("history url: " + applicationHistoryUrl);
public GobblinApplicationMaster(String applicationName, ContainerId containerId, Config config, YarnConfiguration yarnConfiguration) throws Exception { super(applicationName, containerId.getApplicationAttemptId().getApplicationId().toString(), config, Optional.<Path>absent()); GobblinYarnLogSource gobblinYarnLogSource = new GobblinYarnLogSource(); if (gobblinYarnLogSource.isLogSourcePresent()) { this.applicationLauncher .addService(gobblinYarnLogSource.buildLogCopier(config, containerId, this.fs, this.appWorkDir)); } this.applicationLauncher .addService(buildYarnService(config, applicationName, this.applicationId, yarnConfiguration, this.fs)); if (UserGroupInformation.isSecurityEnabled()) { LOGGER.info("Adding YarnContainerSecurityManager since security is enabled"); this.applicationLauncher.addService(buildYarnContainerSecurityManager(config, this.fs)); } }
JOYConstants.APP_TYPE, instanceName, containerId.getApplicationAttemptId().getApplicationId().toString(), containerId.toString());
container.getId().getApplicationAttemptId().getApplicationId().toString(), container.getId().toString()); ServiceRecord sr = null; try { JOYConstants.APP_TYPE, jstormMasterContext.instanceName, jstormMasterContext.appAttemptID.getApplicationId().toString()); String instancePath = RegistryUtils.serviceclassPath( JOYConstants.APP_TYPE, jstormMasterContext.instanceName); LOG.info("Registering application " + jstormMasterContext.appAttemptID.getApplicationId().toString());
daemonConf.set(ConfVars.LLAP_DAEMON_CONTAINER_ID.varname, containerIdStr); appName = ConverterUtils.toContainerId(containerIdStr) .getApplicationAttemptId().getApplicationId().toString(); } else { daemonConf.unset(ConfVars.LLAP_DAEMON_CONTAINER_ID.varname);
supervisorContainer.getId().getApplicationAttemptId().getApplicationId().toString(), supervisorContainer.getId().toString()); try { nimbusContainer.getId().getApplicationAttemptId().getApplicationId().toString(), nimbusContainer.getId().toString());
String containerPath = RegistryUtils.componentPath( JOYConstants.APP_TYPE, jstormMasterContext.instanceName, allocatedContainer.getId().getApplicationAttemptId().getApplicationId().toString(), allocatedContainer.getId().toString());