openvidu-server: some WARN level logging to INFO level

pull/370/head
pabloFuente 2019-12-03 15:36:31 +01:00
parent af31713c66
commit c6adaa2688
4 changed files with 16 additions and 16 deletions

View File

@ -331,8 +331,10 @@ public class KurentoParticipant extends Participant {
this.getParticipantPublicId(), remoteParticipantName);
}
}
if (publisher != null && publisher.getEndpoint() != null) {
releasePublisherEndpoint(reason, kmsDisconnectionTime);
}
}
/**
* Returns a {@link SubscriberEndpoint} for the given participant public id. The

View File

@ -515,7 +515,8 @@ public class KurentoSessionManager extends SessionManager {
// Also associate the KurentoSession with the Kms
kms.addKurentoSession(session);
log.warn("No session '{}' exists yet. Created one on KMS '{}'", session.getSessionId(), kms.getUri());
log.info("No session '{}' exists yet. Created one on KMS '{}' with ip '{}'", session.getSessionId(),
kms.getId(), kms.getIp());
sessionEventsHandler.onSessionCreated(session);
return session;
@ -847,7 +848,8 @@ public class KurentoSessionManager extends SessionManager {
}
@Override
public Participant publishIpcam(Session session, MediaOptions mediaOptions, String serverMetadata) throws Exception {
public Participant publishIpcam(Session session, MediaOptions mediaOptions, String serverMetadata)
throws Exception {
final String sessionId = session.getSessionId();
final KurentoMediaOptions kMediaOptions = (KurentoMediaOptions) mediaOptions;

View File

@ -98,22 +98,20 @@ public abstract class KmsManager {
return this.kmss.remove(kmsId);
}
public synchronized Kms getLessLoadedKms() throws NoSuchElementException {
return Collections.min(getKmsLoads()).kms;
}
public synchronized Kms getLessLoadedAndRunningKms() throws NoSuchElementException {
List<KmsLoad> kmsLoads = getKmsLoads().stream()
.filter(kmsLoad -> mediaNodeStatusManager.isRunning(kmsLoad.kms.getId())).collect(Collectors.toList());
return Collections.min(kmsLoads).kms;
}
public Kms getKms(String kmsId) {
return this.kmss.get(kmsId);
public synchronized List<KmsLoad> getKmssSortedByLoad() {
List<KmsLoad> kmsLoads = getKmsLoads();
Collections.sort(kmsLoads);
return kmsLoads;
}
public boolean kmsWithUriExists(String kmsUri) {
return this.kmss.values().stream().anyMatch(kms -> kms.getUri().equals(kmsUri));
public Kms getKms(String kmsId) {
return this.kmss.get(kmsId);
}
public KmsLoad getKmsLoad(String kmsId) {
@ -125,10 +123,8 @@ public abstract class KmsManager {
return this.kmss.values();
}
public synchronized List<KmsLoad> getKmssSortedByLoad() {
List<KmsLoad> kmsLoads = getKmsLoads();
Collections.sort(kmsLoads);
return kmsLoads;
public boolean kmsWithUriExists(String kmsUri) {
return this.kmss.values().stream().anyMatch(kms -> kms.getUri().equals(kmsUri));
}
private List<KmsLoad> getKmsLoads() {

View File

@ -603,7 +603,7 @@ public class RecordingManager {
log.warn("No KMSs were defined in kms.uris array. Recording path check aborted");
} else {
MediaPipeline pipeline = this.kmsManager.getLessLoadedKms().getKurentoClient().createMediaPipeline();
MediaPipeline pipeline = this.kmsManager.getLessLoadedAndRunningKms().getKurentoClient().createMediaPipeline();
RecorderEndpoint recorder = new RecorderEndpoint.Builder(pipeline, "file://" + testFilePath).build();
final AtomicBoolean kurentoRecorderError = new AtomicBoolean(false);