本文整理汇总了Java中org.apache.hadoop.yarn.server.applicationhistoryservice.records.ApplicationAttemptStartData类的典型用法代码示例。如果您正苦于以下问题:Java ApplicationAttemptStartData类的具体用法?Java ApplicationAttemptStartData怎么用?Java ApplicationAttemptStartData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ApplicationAttemptStartData类属于org.apache.hadoop.yarn.server.applicationhistoryservice.records包,在下文中一共展示了ApplicationAttemptStartData类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: applicationAttemptStarted
import org.apache.hadoop.yarn.server.applicationhistoryservice.records.ApplicationAttemptStartData; //导入依赖的package包/类
@Override
public void applicationAttemptStarted(
ApplicationAttemptStartData appAttemptStart) throws IOException {
ConcurrentMap<ApplicationAttemptId, ApplicationAttemptHistoryData> subMap =
getSubMap(appAttemptStart.getApplicationAttemptId().getApplicationId());
ApplicationAttemptHistoryData oldData =
subMap.putIfAbsent(appAttemptStart.getApplicationAttemptId(),
ApplicationAttemptHistoryData.newInstance(
appAttemptStart.getApplicationAttemptId(),
appAttemptStart.getHost(), appAttemptStart.getRPCPort(),
appAttemptStart.getMasterContainerId(), null, null, null, null));
if (oldData != null) {
throw new IOException("The start information of application attempt "
+ appAttemptStart.getApplicationAttemptId() + " is already stored.");
}
}
开发者ID:naver,项目名称:hadoop,代码行数:17,代码来源:MemoryApplicationHistoryStore.java
示例2: applicationAttemptStarted
import org.apache.hadoop.yarn.server.applicationhistoryservice.records.ApplicationAttemptStartData; //导入依赖的package包/类
@Override
public void applicationAttemptStarted(
ApplicationAttemptStartData appAttemptStart) throws IOException {
HistoryFileWriter hfWriter =
getHistoryFileWriter(appAttemptStart.getApplicationAttemptId()
.getApplicationId());
assert appAttemptStart instanceof ApplicationAttemptStartDataPBImpl;
try {
hfWriter.writeHistoryData(new HistoryDataKey(appAttemptStart
.getApplicationAttemptId().toString(), START_DATA_SUFFIX),
((ApplicationAttemptStartDataPBImpl) appAttemptStart).getProto()
.toByteArray());
LOG.info("Start information of application attempt "
+ appAttemptStart.getApplicationAttemptId() + " is written");
} catch (IOException e) {
LOG.error("Error when writing start information of application attempt "
+ appAttemptStart.getApplicationAttemptId(), e);
throw e;
}
}
开发者ID:naver,项目名称:hadoop,代码行数:21,代码来源:FileSystemApplicationHistoryStore.java
示例3: applicationAttemptStarted
import org.apache.hadoop.yarn.server.applicationhistoryservice.records.ApplicationAttemptStartData; //导入依赖的package包/类
@Override
public void applicationAttemptStarted(
ApplicationAttemptStartData appAttemptStart) throws IOException {
HistoryFileWriter hfWriter =
getHistoryFileWriter(appAttemptStart.getApplicationAttemptId()
.getApplicationId());
assert appAttemptStart instanceof ApplicationAttemptStartDataPBImpl;
try {
hfWriter.writeHistoryData(new HistoryDataKey(appAttemptStart
.getApplicationAttemptId().toString(), START_DATA_SUFFIX),
((ApplicationAttemptStartDataPBImpl) appAttemptStart).getProto()
.toByteArray());
LOG.info("Start information of application attempt "
+ appAttemptStart.getApplicationAttemptId() + " is written");
} catch (IOException e) {
LOG.error("Error when writing start information of application attempt "
+ appAttemptStart.getApplicationAttemptId());
throw e;
}
}
开发者ID:Seagate,项目名称:hadoop-on-lustre2,代码行数:21,代码来源:FileSystemApplicationHistoryStore.java
示例4: applicationAttemptStarted
import org.apache.hadoop.yarn.server.applicationhistoryservice.records.ApplicationAttemptStartData; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public void applicationAttemptStarted(RMAppAttempt appAttempt) {
if (historyServiceEnabled) {
dispatcher.getEventHandler().handle(
new WritingApplicationAttemptStartEvent(appAttempt.getAppAttemptId(),
ApplicationAttemptStartData.newInstance(appAttempt.getAppAttemptId(),
appAttempt.getHost(), appAttempt.getRpcPort(), appAttempt
.getMasterContainer().getId())));
}
}
开发者ID:naver,项目名称:hadoop,代码行数:11,代码来源:RMApplicationHistoryWriter.java
示例5: mergeApplicationAttemptHistoryData
import org.apache.hadoop.yarn.server.applicationhistoryservice.records.ApplicationAttemptStartData; //导入依赖的package包/类
private static void mergeApplicationAttemptHistoryData(
ApplicationAttemptHistoryData historyData,
ApplicationAttemptStartData startData) {
historyData.setHost(startData.getHost());
historyData.setRPCPort(startData.getRPCPort());
historyData.setMasterContainerId(startData.getMasterContainerId());
}
开发者ID:naver,项目名称:hadoop,代码行数:8,代码来源:FileSystemApplicationHistoryStore.java
示例6: WritingApplicationAttemptStartEvent
import org.apache.hadoop.yarn.server.applicationhistoryservice.records.ApplicationAttemptStartData; //导入依赖的package包/类
public WritingApplicationAttemptStartEvent(ApplicationAttemptId appAttemptId,
ApplicationAttemptStartData appAttemptStart) {
super(WritingHistoryEventType.APP_ATTEMPT_START);
this.appAttemptId = appAttemptId;
this.appAttemptStart = appAttemptStart;
}
开发者ID:naver,项目名称:hadoop,代码行数:7,代码来源:WritingApplicationAttemptStartEvent.java
示例7: getApplicationAttemptStartData
import org.apache.hadoop.yarn.server.applicationhistoryservice.records.ApplicationAttemptStartData; //导入依赖的package包/类
public ApplicationAttemptStartData getApplicationAttemptStartData() {
return appAttemptStart;
}
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:WritingApplicationAttemptStartEvent.java
示例8: applicationAttemptStarted
import org.apache.hadoop.yarn.server.applicationhistoryservice.records.ApplicationAttemptStartData; //导入依赖的package包/类
@Override
public void applicationAttemptStarted(
ApplicationAttemptStartData appAttemptStart) throws IOException {
}
开发者ID:naver,项目名称:hadoop,代码行数:5,代码来源:NullApplicationHistoryStore.java
示例9: getApplicationAttempt
import org.apache.hadoop.yarn.server.applicationhistoryservice.records.ApplicationAttemptStartData; //导入依赖的package包/类
@Override
public ApplicationAttemptHistoryData getApplicationAttempt(
ApplicationAttemptId appAttemptId) throws IOException {
HistoryFileReader hfReader =
getHistoryFileReader(appAttemptId.getApplicationId());
try {
boolean readStartData = false;
boolean readFinishData = false;
ApplicationAttemptHistoryData historyData =
ApplicationAttemptHistoryData.newInstance(appAttemptId, null, -1,
null, null, null, FinalApplicationStatus.UNDEFINED, null);
while ((!readStartData || !readFinishData) && hfReader.hasNext()) {
HistoryFileReader.Entry entry = hfReader.next();
if (entry.key.id.equals(appAttemptId.toString())) {
if (entry.key.suffix.equals(START_DATA_SUFFIX)) {
ApplicationAttemptStartData startData =
parseApplicationAttemptStartData(entry.value);
mergeApplicationAttemptHistoryData(historyData, startData);
readStartData = true;
} else if (entry.key.suffix.equals(FINISH_DATA_SUFFIX)) {
ApplicationAttemptFinishData finishData =
parseApplicationAttemptFinishData(entry.value);
mergeApplicationAttemptHistoryData(historyData, finishData);
readFinishData = true;
}
}
}
if (!readStartData && !readFinishData) {
return null;
}
if (!readStartData) {
LOG.warn("Start information is missing for application attempt "
+ appAttemptId);
}
if (!readFinishData) {
LOG.warn("Finish information is missing for application attempt "
+ appAttemptId);
}
LOG.info("Completed reading history information of application attempt "
+ appAttemptId);
return historyData;
} catch (IOException e) {
LOG.error("Error when reading history file of application attempt"
+ appAttemptId, e);
throw e;
} finally {
hfReader.close();
}
}
开发者ID:naver,项目名称:hadoop,代码行数:50,代码来源:FileSystemApplicationHistoryStore.java
示例10: parseApplicationAttemptStartData
import org.apache.hadoop.yarn.server.applicationhistoryservice.records.ApplicationAttemptStartData; //导入依赖的package包/类
private static ApplicationAttemptStartData parseApplicationAttemptStartData(
byte[] value) throws InvalidProtocolBufferException {
return new ApplicationAttemptStartDataPBImpl(
ApplicationAttemptStartDataProto.parseFrom(value));
}
开发者ID:naver,项目名称:hadoop,代码行数:6,代码来源:FileSystemApplicationHistoryStore.java
示例11: writeApplicationAttemptStartData
import org.apache.hadoop.yarn.server.applicationhistoryservice.records.ApplicationAttemptStartData; //导入依赖的package包/类
protected void writeApplicationAttemptStartData(
ApplicationAttemptId appAttemptId) throws IOException {
store.applicationAttemptStarted(ApplicationAttemptStartData.newInstance(
appAttemptId, appAttemptId.toString(), 0,
ContainerId.newContainerId(appAttemptId, 1)));
}
开发者ID:naver,项目名称:hadoop,代码行数:7,代码来源:ApplicationHistoryStoreTestUtils.java
注:本文中的org.apache.hadoop.yarn.server.applicationhistoryservice.records.ApplicationAttemptStartData类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论