On Mon, Mar 17, 2014 at 11:42 PM, Inosh Goonewardena <[email protected]> wrote:

> Hi Udara,
>
> I have deployed your toolbox and check. Actually, custom index are getting
> created properly. Following are the corresponding IndexCF for the custom
> index properties you have defined.
>
> 867513878
> 489450871
>
> But there is a problem with secondary index creation. It's because there
> are dots('.') in attribute names. Following logs prints in console when
> deploying the toolbox.
>
> [2014-03-17 18:52:27,935]  WARN
> {org.wso2.carbon.databridge.persistence.cassandra.datastore.CassandraConnector}
> -  Secondary Index creation is not successful...
> me.prettyprint.hector.api.exceptions.HInvalidRequestException:
> InvalidRequestException(why:Illegal index name payload_actor.id_index).
>
> Actually, if you want to create secondary indexes, you can directly use
> 'Cassandra Keyspace' UI in management console too. But because you have
> dots in your column keys you are not allowed to do that in there too. I
> think it's better to use underscore instead of dot since those attributes
> are used as column keys.
>

Even after I change attribute names it gives,

[2014-03-18 11:20:05,512]  WARN
{org.wso2.carbon.databridge.persistence.cassandra.datastore.CassandraConnector}
-  Secondary Index creation is not successful...
me.prettyprint.hector.api.exceptions.HInvalidRequestException:
InvalidRequestException(why:Illegal index name  payload_context_id_index)

But even with (.) character within attribute name you can run "CREATE INDEX
ON" query on cqlsh without any trouble.

>
>
> On Mon, Mar 17, 2014 at 6:47 PM, Udara Rathnayake <[email protected]> wrote:
>
>>
>>
>>
>> On Mon, Mar 17, 2014 at 11:09 PM, Inosh Goonewardena <[email protected]>wrote:
>>
>>> On Mon, Mar 17, 2014 at 6:15 PM, Udara Rathnayake <[email protected]>wrote:
>>>
>>>>
>>>> Hi Inosh,
>>>>
>>>>  On Mon, Mar 17, 2014 at 9:04 PM, Inosh Goonewardena <[email protected]>wrote:
>>>>
>>>>> On Mon, Mar 17, 2014 at 4:13 PM, Udara Rathnayake <[email protected]>wrote:
>>>>>
>>>>>> Hi Inosh/Maninda,
>>>>>>
>>>>>> As per the chat I had with Maninda I have deployed a toolbox with the
>>>>>> following content.
>>>>>>
>>>>>> *wso2_social_data_publisher_def*
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> *{    'streamId':'org.wso2.social.activity:4.0.0',
>>>>>> 'name':'org.wso2.social.activity',    'version':'4.0.0',    
>>>>>> 'description':
>>>>>> 'store json object and mete-data describing each activity',
>>>>>> 'tags':['social', 'activity'],     'metaData':[    ],
>>>>>> 'correlationData':[    ],    'payloadData':[
>>>>>> {'name':'id','type':'STRING'},        {'name':'context.id
>>>>>> <http://context.id>','type':'STRING'},         {'name':'actor.id
>>>>>> <http://actor.id>','type':'STRING'},        {'name':'tenant.id
>>>>>> <http://tenant.id>','type':'STRING'},
>>>>>> {'name':'body','type':'STRING'}    ]}*
>>>>>>
>>>>>> *streams.properties*
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> *streams.definitions=defn1streams.definitions.defn1.filename=wso2_social_data_publisher_def
>>>>>> streams.definitions.defn1.username=adminstreams.definitions.defn1.password=adminstreams.definitions.defn1.description=This
>>>>>> is the datastream published from wso2
>>>>>> socialstreams.definitions.defn1.secondaryindexes=context.id
>>>>>> <http://context.id>,actor.id <http://actor.id>,tenant.id 
>>>>>> <http://tenant.id>
>>>>>> streams.definitions.defn1.customindexes=context.id 
>>>>>> <http://context.id>,id*
>>>>>>
>>>>>> Then I have published few activities using a simple client.
>>>>>> Everything(key-space creation, publishing activities) work perfectly
>>>>>> but I don't see any indexes when I browse the column family though admin
>>>>>> console.
>>>>>>
>>>>>
>>>>> In which keyspace did u check? IndexCF name is a random generated
>>>>> number and getting created in EVENT_INDEX_KEYSPACE.
>>>>>
>>>>
>>>> I checked column family information ( EVENT_KS >
>>>> org_wso2_social_activity) where we display Column Name, Validator Type,
>>>> Index Name, Actions details. For every colum index name value is "--NOT
>>>> INDEXED--".
>>>>
>>>> Yes. This is the correct place to check whether secondary indexes have
>>> been created. In your case it seems they are not created.
>>>
>>>>
>>>> Now I checked key-space information EVENT_INDEX_KS, still I don't see
>>>> any index related information there.
>>>>
>>>
>>> Here you have the Custom Index CFs. According to the current
>>> implementation separate CF created per index property.
>>>
>>> Can you share your toolbox with me so that I can have a look.
>>>
>>
>> Find the attached toolbox.
>>
>>>
>>>> Thanks for looking into this.
>>>>
>>>>>
>>>>>> I have used  WSO2 BAM 2.4.1 alpha pack for this.
>>>>>>
>>>>>> What am I doing wrong here?
>>>>>>
>>>>>> Regards,
>>>>>> UdaraR
>>>>>> --
>>>>>> *Udara Rathnayake*
>>>>>> Software Engineer
>>>>>> WSO2 Inc. : http://wso2.com
>>>>>>
>>>>>> Mobile : +94 772207239
>>>>>> Twitter : http://twitter.com/udarakr
>>>>>> Blog    : http://udarakr.blogspot.com
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Regards,
>>>>>
>>>>> Inosh Goonewardena
>>>>> Associate Technical Lead- WSO2 Inc.
>>>>> Mobile: +94779966317
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> *Udara Rathnayake*
>>>> Software Engineer
>>>> WSO2 Inc. : http://wso2.com
>>>>
>>>> Mobile : +94 772207239
>>>> Twitter : http://twitter.com/udarakr
>>>> Blog    : http://udarakr.blogspot.com
>>>>
>>>>
>>>
>>>
>>> --
>>> Regards,
>>>
>>> Inosh Goonewardena
>>> Associate Technical Lead- WSO2 Inc.
>>> Mobile: +94779966317
>>>
>>
>>
>>
>> --
>> *Udara Rathnayake*
>> Software Engineer
>> WSO2 Inc. : http://wso2.com
>>
>> Mobile : +94 772207239
>> Twitter : http://twitter.com/udarakr
>> Blog    : http://udarakr.blogspot.com
>>
>>
>
>
> --
> Regards,
>
> Inosh Goonewardena
> Associate Technical Lead- WSO2 Inc.
> Mobile: +94779966317
>



-- 
*Udara Rathnayake*
Software Engineer
WSO2 Inc. : http://wso2.com

Mobile : +94 772207239
Twitter : http://twitter.com/udarakr
Blog    : http://udarakr.blogspot.com
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to