本文整理了Java中org.apache.helix.model.Message.getResultMap()
方法的一些代码示例,展示了Message.getResultMap()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.getResultMap()
方法的具体详情如下:
包路径:org.apache.helix.model.Message
类名称:Message
方法名:getResultMap
[英]Get the results of message execution
[中]获取消息执行的结果
代码示例来源:origin: org.apache.helix/helix-core
@Override
public void onReplyMessage(Message message) {
String time = message.getResultMap().get("BOOTSTRAP_TIME");
if (bootstrapTime == null || time.compareTo(bootstrapTime) > -1) {
bootstrapTime = message.getResultMap().get("BOOTSTRAP_TIME");
bootstrapUrl = message.getResultMap().get("BOOTSTRAP_URL");
}
}
代码示例来源:origin: apache/helix
@Override
public void onReplyMessage(Message message) {
String time = message.getResultMap().get("BOOTSTRAP_TIME");
if (bootstrapTime == null || time.compareTo(bootstrapTime) > -1) {
bootstrapTime = message.getResultMap().get("BOOTSTRAP_TIME");
bootstrapUrl = message.getResultMap().get("BOOTSTRAP_URL");
}
}
代码示例来源:origin: apache/helix
@Override
public void onReplyMessage(Message message) {
_logger.info("Update for scheduler msg " + _originalMessage.getMsgId() + " Message "
+ message.getMsgSrc() + " id " + message.getCorrelationId() + " completed");
String key = "MessageResult " + message.getMsgSrc() + " " + UUID.randomUUID();
_resultSummaryMap.put(key, message.getResultMap());
if (this.isDone()) {
_logger.info("Scheduler msg " + _originalMessage.getMsgId() + " completed");
_statusUpdateUtil.logInfo(_originalMessage, SchedulerAsyncCallback.class,
"Scheduler task completed", _manager);
addSummary(_resultSummaryMap, _originalMessage, _manager, false);
}
}
代码示例来源:origin: org.apache.helix/helix-core
@Override
public void onReplyMessage(Message message) {
_logger.info("Update for scheduler msg " + _originalMessage.getMsgId() + " Message "
+ message.getMsgSrc() + " id " + message.getCorrelationId() + " completed");
String key = "MessageResult " + message.getMsgSrc() + " " + UUID.randomUUID();
_resultSummaryMap.put(key, message.getResultMap());
if (this.isDone()) {
_logger.info("Scheduler msg " + _originalMessage.getMsgId() + " completed");
_statusUpdateUtil.logInfo(_originalMessage, SchedulerAsyncCallback.class,
"Scheduler task completed", _manager);
addSummary(_resultSummaryMap, _originalMessage, _manager, false);
}
}
代码示例来源:origin: apache/helix
/**
* Create a ZNRecord for a message, which stores the content of the message (stored in
* simple fields) into the ZNRecord mapFields. In this way, the message update can be
* merged with the previous status update record in the zookeeper. See ZNRecord.merge()
* for more details.
*/
ZNRecord createMessageLogRecord(Message message) {
ZNRecord result = new ZNRecord(getStatusUpdateRecordName(message));
String mapFieldKey = "MESSAGE " + message.getMsgId();
result.setMapField(mapFieldKey, new TreeMap<String, String>());
// Store all the simple fields of the message in the new ZNRecord's map
// field.
for (String simpleFieldKey : message.getRecord().getSimpleFields().keySet()) {
result.getMapField(mapFieldKey).put(simpleFieldKey,
message.getRecord().getSimpleField(simpleFieldKey));
}
if (message.getResultMap() != null) {
result.setMapField("MessageResult", message.getResultMap());
}
return result;
}
代码示例来源:origin: org.apache.helix/helix-core
/**
* Create a ZNRecord for a message, which stores the content of the message (stored in
* simple fields) into the ZNRecord mapFields. In this way, the message update can be
* merged with the previous status update record in the zookeeper. See ZNRecord.merge()
* for more details.
*/
ZNRecord createMessageLogRecord(Message message) {
ZNRecord result = new ZNRecord(getStatusUpdateRecordName(message));
String mapFieldKey = "MESSAGE " + message.getMsgId();
result.setMapField(mapFieldKey, new TreeMap<String, String>());
// Store all the simple fields of the message in the new ZNRecord's map
// field.
for (String simpleFieldKey : message.getRecord().getSimpleFields().keySet()) {
result.getMapField(mapFieldKey).put(simpleFieldKey,
message.getRecord().getSimpleField(simpleFieldKey));
}
if (message.getResultMap() != null) {
result.setMapField("MessageResult", message.getResultMap());
}
return result;
}
代码示例来源:origin: apache/helix
manager.getMessagingService().sendAndWait(cr2, schedulerMessage, callback, -1);
String msgId =
callback._message.getResultMap().get(
DefaultSchedulerMessageHandlerFactory.SCHEDULER_MSG_ID);
代码示例来源:origin: apache/helix
manager.getMessagingService().sendAndWait(cr2, schedulerMessage, callback, -1);
String msgId =
callback._message.getResultMap()
.get(DefaultSchedulerMessageHandlerFactory.SCHEDULER_MSG_ID);
代码示例来源:origin: apache/helix
manager.getMessagingService().sendAndWait(cr2, schedulerMessage, callback, -1);
String msgIdPrime =
callback._message.getResultMap()
.get(DefaultSchedulerMessageHandlerFactory.SCHEDULER_MSG_ID);
manager.getMessagingService().sendAndWait(cr2, schedulerMessage, callback, -1);
String msgId =
callback._message.getResultMap().get(
DefaultSchedulerMessageHandlerFactory.SCHEDULER_MSG_ID);
msgIds.add(msgId);
代码示例来源:origin: apache/helix
manager.getMessagingService().sendAndWait(cr2, schedulerMessage, callback, -1);
String msgId =
callback._message.getResultMap()
.get(DefaultSchedulerMessageHandlerFactory.SCHEDULER_MSG_ID);
内容来源于网络,如有侵权,请联系作者删除!