Merge pull request #717 from ayyoob/new-master

removed temporary logs
revert-70aa11f8
Ruwan 8 years ago committed by GitHub
commit fd88a18fd5

@ -214,6 +214,9 @@ public class DeviceTypePublisherAdminServiceImpl implements DeviceTypePublisherA
} catch (RegistryException e) { } catch (RegistryException e) {
log.error("Failed to load tenant, tenantDomain: " + tenantDomain, e); log.error("Failed to load tenant, tenantDomain: " + tenantDomain, e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
} catch (ParseException e) {
log.error("Invalid stream definition for device type" + type " for tenant, tenantDomain: " + tenantDomain, e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
} }
} }
@ -335,7 +338,7 @@ public class DeviceTypePublisherAdminServiceImpl implements DeviceTypePublisherA
} }
private void publishDynamicEventStream(String deviceType, String tenantDomain, List<String> streamList) private void publishDynamicEventStream(String deviceType, String tenantDomain, List<String> streamList)
throws IOException, UserStoreException, JWTClientException { throws IOException, UserStoreException, JWTClientException, ParseException {
PrivilegedCarbonContext.startTenantFlow(); PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true); PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true);
@ -382,14 +385,9 @@ public class DeviceTypePublisherAdminServiceImpl implements DeviceTypePublisherA
String version = (String) steamJson.get("version"); String version = (String) steamJson.get("version");
String streamId = name +":"+version; String streamId = name +":"+version;
if (eventStreamAdminServiceStub.getStreamDefinitionDto(streamId) == null) { if (eventStreamAdminServiceStub.getStreamDefinitionDto(streamId) == null) {
log.error("its not there");
eventStreamAdminServiceStub.addEventStreamDefinitionAsString(streamContent); eventStreamAdminServiceStub.addEventStreamDefinitionAsString(streamContent);
} else {
log.error("its there");
} }
} }
} catch (ParseException e) {
e.printStackTrace();
} finally { } finally {
cleanup(eventStreamAdminServiceStub); cleanup(eventStreamAdminServiceStub);
PrivilegedCarbonContext.endTenantFlow(); PrivilegedCarbonContext.endTenantFlow();

Loading…
Cancel
Save