use of com.hortonworks.streamline.streams.storm.common.logger.LogLevelResponse in project streamline by hortonworks.
the class StormRestAPIClient method buildLogLevelResponse.
private LogLevelResponse buildLogLevelResponse(Map<String, Object> logLevelResponseMap) {
Map<String, Object> loggerToLevel = (Map<String, Object>) logLevelResponseMap.get("namedLoggerLevels");
if (loggerToLevel == null) {
return new LogLevelResponse();
}
LogLevelResponse response = new LogLevelResponse();
loggerToLevel.forEach((logger, level) -> {
LogLevelLoggerResponse loggerResponse = LogLevelLoggerResponse.of((Map<String, Object>) level);
response.addLoggerResponse(logger, loggerResponse);
});
return response;
}
use of com.hortonworks.streamline.streams.storm.common.logger.LogLevelResponse in project streamline by hortonworks.
the class StormTopologyActionsImpl method configureLogLevel.
@Override
public LogLevelInformation configureLogLevel(TopologyLayout topology, LogLevel targetLogLevel, int durationSecs, String asUser) throws Exception {
String stormTopologyId = StormTopologyUtil.findStormTopologyId(client, topology.getId(), asUser);
if (StringUtils.isEmpty(stormTopologyId)) {
return null;
}
LogLevelResponse response = client.configureLog(stormTopologyId, ROOT_LOGGER_NAME, targetLogLevel.name(), durationSecs, asUser);
return convertLogLevelResponseToLogLevelInformation(response);
}
use of com.hortonworks.streamline.streams.storm.common.logger.LogLevelResponse in project streamline by hortonworks.
the class StormTopologyActionsImpl method getLogLevel.
@Override
public LogLevelInformation getLogLevel(TopologyLayout topology, String asUser) throws Exception {
String stormTopologyId = StormTopologyUtil.findStormTopologyId(client, topology.getId(), asUser);
if (StringUtils.isEmpty(stormTopologyId)) {
return null;
}
LogLevelResponse response = client.getLogLevel(stormTopologyId, asUser);
return convertLogLevelResponseToLogLevelInformation(response);
}
Aggregations