Hi, These have to be fixed from the data agents, where if you make any changes to the stream definition, and try to save it, you will have to force the user to increment the version and save it, or probably automatically increment it and show it to the user. Basically allowing the user to use the same version where they are sending different events would be wrong. Worse case, probably, if the user insists, we should be able to delete the earlier stream definition for that version and re-create it.
Cheers, Anjana. On Wed, Feb 26, 2014 at 9:45 AM, Pandula Kariyawasam <[email protected]>wrote: > > Hi All. > > This is a small concern that we have came across while testing BAM241. > > For all the Agents such as Data Publishers, it allows to save the > configuration with different versions. When we do so, it will create the > stream definition with relevant to that version. > > The problem occurs if we want to use a previous configuration with same > version number. Unless the user set exact configuration as previous > version, Agent won't send the messages to BAM after saving with same > previous version number. > > > Please consider the following scenario. > > - Consider a scenario that multiple users have access to the system. > - 1st user configure the Agent for the first time setting the version as > 1.0.0, with specifying some properties. > - 2nd user altering that Agent with adding and removing properties, and > save it as 1.0.1 > - Now the 3rd user tries to role back to version 1.0.0, and he cannot > figure out the initial configuration of version 1.0.0. > - In a situation like this, if the 3rd user save it as 1.0.0 with > configurations which are different from initial 1.0.0 configuration, the > configuration will get saved properly. But when he trigger the app/service, > the data sending to BAM will fail with prompting below error [1]. > > > All the Agents which use versioning such as Data Publishers, have this > limitation. Better if we can implement a mechanism to handle this, such as > adding a drop down to list/load the previous versions with configurations, > or etc. > > I have added this as an improvement under [2] > [2] https://wso2.org/jira/browse/BAM-1453 > > > WDUT? > > > > [1] > > [2014-02-25 14:05:33,006] ERROR > {org.wso2.carbon.databridge.agent.thrift.AsyncDataPublisher} - Stream > definition already exist > org.wso2.carbon.databridge.commons.exception.DifferentStreamDefinitionAlreadyDefinedException: > Same stream id with different definition already defined before sending > this event definitions to TCP,10.100.5.9:7611,TCP,10.100.5.9:7711 > at > org.wso2.carbon.databridge.agent.thrift.internal.publisher.client.EventPublisher.defineStream(EventPublisher.java:237) > > at > org.wso2.carbon.databridge.agent.thrift.DataPublisher.defineStream(DataPublisher.java:295) > > at > org.wso2.carbon.databridge.agent.thrift.AsyncDataPublisher$DataPublishWorker.run(AsyncDataPublisher.java:690) > > at java.lang.Thread.run(Thread.java:662) > Caused by: > org.wso2.carbon.databridge.commons.exception.DifferentStreamDefinitionAlreadyDefinedException: > Thrift Different Stream Definition Already Defined > at > org.wso2.carbon.databridge.agent.thrift.internal.publisher.client.ThriftEventPublisher.defineStream(ThriftEventPublisher.java:112) > > at > org.wso2.carbon.databridge.agent.thrift.internal.publisher.client.EventPublisher.defineStream(EventPublisher.java:222) > > ... 3 more > Caused by: > ThriftDifferentStreamDefinitionAlreadyDefinedException(message:Similar > event stream for > StreamDefinition{ > streamId='bam_webapp_statistics:1.0.0', > name='bam_webapp_statistics', > version='1.0.0', > nickName='WebappDataAgent', > description='Publish webapp statistics events', > tags=null, > metaData=[Attribute{name='serverAddess', type=STRING}, > Attribute{name='serverName', type=STRING}, Attribute{name='tenantId', > type=INT}, Attribute{name='webappOwnerTenant', type=STRING}, > Attribute{name='userTenant', type=STRING}, Attribute{name='AAA', > type=STRING}], > correlationData=null, > payloadData=[Attribute{name='webappName', type=STRING}, > Attribute{name='webappVersion', type=STRING}, Attribute{name='userId', > type=STRING}, Attribute{name='resourcePath', type=STRING}, > Attribute{name='webappType', type=STRING}, > Attribute{name='webappDisplayName', type=STRING}, > Attribute{name='webappContext', type=STRING}, Attribute{name='sessionId', > type=STRING}, Attribute{name='httpMethod', type=STRING}, > Attribute{name='contentType', type=STRING}, > Attribute{name='responseContentType', type=STRING}, > Attribute{name='remoteAddress', type=STRING}, Attribute{name='referer', > type=STRING}, Attribute{name='remoteUser', type=STRING}, > Attribute{name='authType', type=STRING}, Attribute{name='userAgent', > type=STRING}, Attribute{name='browser', type=STRING}, > Attribute{name='browserVersion', type=STRING}, > Attribute{name='operatingSystem', type=STRING}, > Attribute{name='operatingSystemVersion', type=STRING}, > Attribute{name='searchEngine', type=STRING}, Attribute{name='country', > type=STRING}, Attribute{name='timestamp', type=LONG}, > Attribute{name='responseHttpStatusCode', type=INT}, > Attribute{name='responseTime', type=LONG}, Attribute{name='requestCount', > type=INT}, Attribute{name='responceCount', type=INT}, > Attribute{name='faultCount', type=INT}, Attribute{name='requestSizeBytes', > type=LONG}, Attribute{name='responseSizeBytes', type=LONG}], > } > with the same name and version already exist: > StreamDefinition{ > streamId='bam_webapp_statistics:1.0.0', > name='bam_webapp_statistics', > version='1.0.0', > nickName='WebappDataAgent', > description='Publish webapp statistics events', > tags=null, > metaData=[Attribute{name='serverAddess', type=STRING}, > Attribute{name='serverName', type=STRING}, Attribute{name='tenantId', > type=INT}, Attribute{name='webappOwnerTenant', type=STRING}, > Attribute{name='userTenant', type=STRING}], > correlationData=null, > payloadData=[Attribute{name='webappName', type=STRING}, > Attribute{name='webappVersion', type=STRING}, Attribute{name='userId', > type=STRING}, Attribute{name='resourcePath', type=STRING}, > Attribute{name='webappType', type=STRING}, > Attribute{name='webappDisplayName', type=STRING}, > Attribute{name='webappContext', type=STRING}, Attribute{name='sessionId', > type=STRING}, Attribute{name='httpMethod', type=STRING}, > Attribute{name='contentType', type=STRING}, > Attribute{name='responseContentType', type=STRING}, > Attribute{name='remoteAddress', type=STRING}, Attribute{name='referer', > type=STRING}, Attribute{name='remoteUser', type=STRING}, > Attribute{name='authType', type=STRING}, Attribute{name='userAgent', > type=STRING}, Attribute{name='browser', type=STRING}, > Attribute{name='browserVersion', type=STRING}, > Attribute{name='operatingSystem', type=STRING}, > Attribute{name='operatingSystemVersion', type=STRING}, > Attribute{name='searchEngine', type=STRING}, Attribute{name='country', > type=STRING}, Attribute{name='timestamp', type=LONG}, > Attribute{name='responseHttpStatusCode', type=INT}, > Attribute{name='responseTime', type=LONG}, Attribute{name='requestCount', > type=INT}, Attribute{name='responceCount', type=INT}, > Attribute{name='faultCount', type=INT}, Attribute{name='requestSizeBytes', > type=LONG}, Attribute{name='responseSizeBytes', type=LONG}], > } > ) > at > org.wso2.carbon.databridge.commons.thrift.service.general.ThriftEventTransmissionService$defineStream_result.read(ThriftEventTransmissionService.java:1441) > > at > org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78) > at > org.wso2.carbon.databridge.commons.thrift.service.general.ThriftEventTransmissionService$Client.recv_defineStream(ThriftEventTransmissionService.java:80) > > at > org.wso2.carbon.databridge.commons.thrift.service.general.ThriftEventTransmissionService$Client.defineStream(ThriftEventTransmissionService.java:66) > > at > org.wso2.carbon.databridge.agent.thrift.internal.publisher.client.ThriftEventPublisher.defineStream(ThriftEventPublisher.java:109) > > ... 4 more > [2014-02-25 14:05:51,833] ERROR > {org.wso2.carbon.databridge.agent.thrift.AsyncDataPublisher} - Stream > definition already exist > org.wso2.carbon.databridge.commons.exception.DifferentStreamDefinitionAlreadyDefinedException: > Same stream id with different definition already defined before sending > this event definitions to TCP,10.100.5.9:7611,TCP,10.100.5.9:7711 > at > org.wso2.carbon.databridge.agent.thrift.internal.publisher.client.EventPublisher.defineStream(EventPublisher.java:237) > > at > org.wso2.carbon.databridge.agent.thrift.DataPublisher.defineStream(DataPublisher.java:295) > > at > org.wso2.carbon.databridge.agent.thrift.AsyncDataPublisher$DataPublishWorker.run(AsyncDataPublisher.java:690) > > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > at java.util.concurrent.FutureTask.run(FutureTask.java:138) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) > > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) > > at java.lang.Thread.run(Thread.java:662) > Caused by: > org.wso2.carbon.databridge.commons.exception.DifferentStreamDefinitionAlreadyDefinedException: > Thrift Different Stream Definition Already Defined > at > org.wso2.carbon.databridge.agent.thrift.internal.publisher.client.ThriftEventPublisher.defineStream(ThriftEventPublisher.java:112) > > at > org.wso2.carbon.databridge.agent.thrift.internal.publisher.client.EventPublisher.defineStream(EventPublisher.java:222) > > ... 8 more > Caused by: > ThriftDifferentStreamDefinitionAlreadyDefinedException(message:Similar > event stream for > StreamDefinition{ > streamId='bam_webapp_statistics:1.0.0', > name='bam_webapp_statistics', > version='1.0.0', > nickName='WebappDataAgent', > description='Publish webapp statistics events', > tags=null, > metaData=[Attribute{name='serverAddess', type=STRING}, > Attribute{name='serverName', type=STRING}, Attribute{name='tenantId', > type=INT}, Attribute{name='webappOwnerTenant', type=STRING}, > Attribute{name='userTenant', type=STRING}, Attribute{name='AAA', > type=STRING}], > correlationData=null, > payloadData=[Attribute{name='webappName', type=STRING}, > Attribute{name='webappVersion', type=STRING}, Attribute{name='userId', > type=STRING}, Attribute{name='resourcePath', type=STRING}, > Attribute{name='webappType', type=STRING}, > Attribute{name='webappDisplayName', type=STRING}, > Attribute{name='webappContext', type=STRING}, Attribute{name='sessionId', > type=STRING}, Attribute{name='httpMethod', type=STRING}, > Attribute{name='contentType', type=STRING}, > Attribute{name='responseContentType', type=STRING}, > Attribute{name='remoteAddress', type=STRING}, Attribute{name='referer', > type=STRING}, Attribute{name='remoteUser', type=STRING}, > Attribute{name='authType', type=STRING}, Attribute{name='userAgent', > type=STRING}, Attribute{name='browser', type=STRING}, > Attribute{name='browserVersion', type=STRING}, > Attribute{name='operatingSystem', type=STRING}, > Attribute{name='operatingSystemVersion', type=STRING}, > Attribute{name='searchEngine', type=STRING}, Attribute{name='country', > type=STRING}, Attribute{name='timestamp', type=LONG}, > Attribute{name='responseHttpStatusCode', type=INT}, > Attribute{name='responseTime', type=LONG}, Attribute{name='requestCount', > type=INT}, Attribute{name='responceCount', type=INT}, > Attribute{name='faultCount', type=INT}, Attribute{name='requestSizeBytes', > type=LONG}, Attribute{name='responseSizeBytes', type=LONG}], > } > with the same name and version already exist: > StreamDefinition{ > streamId='bam_webapp_statistics:1.0.0', > name='bam_webapp_statistics', > version='1.0.0', > nickName='WebappDataAgent', > description='Publish webapp statistics events', > tags=null, > metaData=[Attribute{name='serverAddess', type=STRING}, > Attribute{name='serverName', type=STRING}, Attribute{name='tenantId', > type=INT}, Attribute{name='webappOwnerTenant', type=STRING}, > Attribute{name='userTenant', type=STRING}], > correlationData=null, > payloadData=[Attribute{name='webappName', type=STRING}, > Attribute{name='webappVersion', type=STRING}, Attribute{name='userId', > type=STRING}, Attribute{name='resourcePath', type=STRING}, > Attribute{name='webappType', type=STRING}, > Attribute{name='webappDisplayName', type=STRING}, > Attribute{name='webappContext', type=STRING}, Attribute{name='sessionId', > type=STRING}, Attribute{name='httpMethod', type=STRING}, > Attribute{name='contentType', type=STRING}, > Attribute{name='responseContentType', type=STRING}, > Attribute{name='remoteAddress', type=STRING}, Attribute{name='referer', > type=STRING}, Attribute{name='remoteUser', type=STRING}, > Attribute{name='authType', type=STRING}, Attribute{name='userAgent', > type=STRING}, Attribute{name='browser', type=STRING}, > Attribute{name='browserVersion', type=STRING}, > Attribute{name='operatingSystem', type=STRING}, > Attribute{name='operatingSystemVersion', type=STRING}, > Attribute{name='searchEngine', type=STRING}, Attribute{name='country', > type=STRING}, Attribute{name='timestamp', type=LONG}, > Attribute{name='responseHttpStatusCode', type=INT}, > Attribute{name='responseTime', type=LONG}, Attribute{name='requestCount', > type=INT}, Attribute{name='responceCount', type=INT}, > Attribute{name='faultCount', type=INT}, Attribute{name='requestSizeBytes', > type=LONG}, Attribute{name='responseSizeBytes', type=LONG}], > } > ) > at > org.wso2.carbon.databridge.commons.thrift.service.general.ThriftEventTransmissionService$defineStream_result.read(ThriftEventTransmissionService.java:1441) > > at > org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78) > at > org.wso2.carbon.databridge.commons.thrift.service.general.ThriftEventTransmissionService$Client.recv_defineStream(ThriftEventTransmissionService.java:80) > > at > org.wso2.carbon.databridge.commons.thrift.service.general.ThriftEventTransmissionService$Client.defineStream(ThriftEventTransmissionService.java:66) > > at > org.wso2.carbon.databridge.agent.thrift.internal.publisher.client.ThriftEventPublisher.defineStream(ThriftEventPublisher.java:109) > > ... 9 more > > > > > Thanks, > Pandula > > -- > > *Pandula Kariyawasam K.B.* > *Senior Software Engineer - QA* > Mobile: +94772314510 > > <http://www.wso2.com> > -- *Anjana Fernando* Technical Lead WSO2 Inc. | http://wso2.com lean . enterprise . middleware
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
