Hi hasitha,

There is already a documentation on how the BAM tenant aspects work on [1],
I believe you can get all the answers for your questions while going
through this. :)

[1] http://docs.wso2.org/wiki/display/BAM230/Multi+Tenancy+Configuration

Thanks,
Sinthuja.


On Mon, Jun 17, 2013 at 1:05 PM, Hasitha Hiranya <[email protected]> wrote:

> CC ing to Dev.
>
> Hi,
>
> I need to know the following on BAM  tenancy aspect.
>
> 1. When using BAM in tenancy environment we use RSS (now SS) to gain
> multi-tenancy when writing to MySQL.
> 2. We edit etc/rss-config.xml accordingly.
> 4. When we write a hive script should it have some tenancy configuration
> too? Or does BAM handle it internally? Or is it "same script for every
> tenant, but when we invoke we say get data specific to this tenant" ?
> 5. If some configuration as above exists, summery data writing should be
> happen via SS server right?  Summery data can differ from one tenant to
> another. Editing $BAM_HOME/repository/conf/advanced/hive-site.xml we tell
> hive to write summery data to MySQL. Does this have some SS configuration
> so that summery data is written tenancy-wise?
> 6. Also when publishing, they publish as tenants. How do we separate
> tenant-wise data in Cassandra level (some internal details please,
> different rows, or columns or use some flag?)?
>
> Thanks.
>
>
>
> On Sun, Jun 16, 2013 at 12:07 PM, Hasitha Hiranya <[email protected]>wrote:
>
>> Hi,
>>
>> Do we have tenant support in BAM 2.0.1 ?
>> In new version I find rich documents on the subject, but are they
>> relevant to 2.0.1 version?
>>
>> Thanks.
>>
>>
>> On Fri, Jun 14, 2013 at 10:04 PM, Sinthuja Ragendran 
>> <[email protected]>wrote:
>>
>>>
>>>
>>>
>>> On Fri, Jun 14, 2013 at 9:51 PM, Hasitha Hiranya <[email protected]>wrote:
>>>
>>>> Can you explain this syntax?
>>>>
>>>> analyzers.scripts.webapp.cron=0 0/2 * * * ?
>>>>
>>>> It is for scheduling the BAM analytic script, right?
>>>>
>>> yes. It'll deploy the hive script with scheduling.
>>>
>>>> Does this say how often it is running?
>>>>
>>>
>>> It will run the scrip every 2 mins. For Eg: 1:00, 1:02, 1:04, and so
>>> on..
>>>
>>>>
>>>>
>>>> On Thu, Jun 13, 2013 at 12:53 PM, Maninda Edirisooriya <
>>>> [email protected]> wrote:
>>>>
>>>>> Attached the article HTML as a compressed zip.
>>>>>
>>>>> *
>>>>> Maninda Edirisooriya*
>>>>> Software Engineer
>>>>> *WSO2, Inc.
>>>>> *lean.enterprise.middleware.
>>>>>
>>>>> *Blog* : http://maninda.blogspot.com/
>>>>> *Phone* : +94 777603226
>>>>>
>>>>>
>>>>> On Thu, Jun 13, 2013 at 12:18 PM, Hasitha Hiranya 
>>>>> <[email protected]>wrote:
>>>>>
>>>>>> Thank you very much people. It is more clearer now.
>>>>>> Anyway, Maninda if you can see the document somehow, save it as a
>>>>>> .html and attach to the mail.
>>>>>>
>>>>>> Thanks again.
>>>>>>
>>>>>>
>>>>>> On Thu, Jun 13, 2013 at 11:02 AM, Maninda Edirisooriya <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Ah! yes. I just saw it. Anyway similar content may still available
>>>>>>> in the doc as well.
>>>>>>>
>>>>>>> *
>>>>>>> Maninda Edirisooriya*
>>>>>>> Software Engineer
>>>>>>> *WSO2, Inc.
>>>>>>> *lean.enterprise.middleware.
>>>>>>>
>>>>>>> *Blog* : http://maninda.blogspot.com/
>>>>>>> *Phone* : +94 777603226
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Jun 13, 2013 at 10:43 AM, Sinthuja Ragendran <
>>>>>>> [email protected]> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>> Hi maninda,
>>>>>>>>
>>>>>>>> On Thu, Jun 13, 2013 at 10:31 AM, Maninda Edirisooriya <
>>>>>>>> [email protected]> wrote:
>>>>>>>>
>>>>>>>>> Hi Hasitha,
>>>>>>>>>
>>>>>>>>> All the explanations related to Activity Monitoring Hive script is
>>>>>>>>> there in
>>>>>>>>> http://wso2.org/library/articles/2013/03/getting-started-hive-analytics-wso2-bamwhich
>>>>>>>>>  was used to create the doc pointed by Sinthuja.
>>>>>>>>>
>>>>>>>>
>>>>>>>> I can't view this link. :(
>>>>>>>> I think it didn't get published yet isn't it? If so we can't see
>>>>>>>> that until it's published.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> sinthuja.
>>>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>> For the UI design, you will have to go through an existing toolbox
>>>>>>>>> for the Jaggery implementation. The easy way is hacking an existing
>>>>>>>>> dashboard.
>>>>>>>>>
>>>>>>>>> *
>>>>>>>>> Maninda Edirisooriya*
>>>>>>>>> Software Engineer
>>>>>>>>> *WSO2, Inc.
>>>>>>>>> *lean.enterprise.middleware.
>>>>>>>>>
>>>>>>>>> *Blog* : http://maninda.blogspot.com/
>>>>>>>>> *Phone* : +94 777603226
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, Jun 13, 2013 at 7:32 AM, Hasitha Hiranya <
>>>>>>>>> [email protected]> wrote:
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Hi Maninda/Kasun,
>>>>>>>>>>
>>>>>>>>>> Can you please point me to some documents to learn hive queries?
>>>>>>>>>> Also I want a end-to-end scenario like
>>>>>>>>>>
>>>>>>>>>> 1. define stream definition
>>>>>>>>>> 2. how stream definition match with hive query
>>>>>>>>>>
>>>>>>>>>> 3. Actually what does this mean step by step
>>>>>>>>>>
>>>>>>>>>> CREATE EXTERNAL TABLE IF NOT EXISTS ActivityDataTable
>>>>>>>>>> (messageID STRING, sentTimestamp BIGINT, activityID STRING,
>>>>>>>>>> version STRING, soapHeader STRING, soapBody STRING, host STRING)
>>>>>>>>>>  STORED BY
>>>>>>>>>> 'org.apache.hadoop.hive.cassandra.CassandraStorageHandler'
>>>>>>>>>> WITH SERDEPROPERTIES (
>>>>>>>>>>   "cassandra.host" = "127.0.0.1" ,
>>>>>>>>>>  "cassandra.port" = "9160" ,
>>>>>>>>>> "cassandra.ks.name" = "EVENT_KS" ,
>>>>>>>>>>  "cassandra.ks.username" = "admin" ,
>>>>>>>>>> "cassandra.ks.password" = "admin" ,
>>>>>>>>>>  "cassandra.cf.name" = "org_wso2_bam_activity_monitoring" ,
>>>>>>>>>> "cassandra.columns.mapping" =
>>>>>>>>>>  ":key, payload_timestamp, correlation_bam_activity_id, Version,
>>>>>>>>>> payload_SOAPHeader, payload_SOAPBody, meta_host" );
>>>>>>>>>>
>>>>>>>>>> CREATE EXTERNAL TABLE IF NOT EXISTS ActivitySummaryTable(
>>>>>>>>>>  messageRowID STRING, sentTimestamp BIGINT, bamActivityID
>>>>>>>>>> STRING, soapHeader STRING, soapBody STRING, host STRING)
>>>>>>>>>> STORED BY
>>>>>>>>>> 'org.wso2.carbon.hadoop.hive.jdbc.storage.JDBCStorageHandler'
>>>>>>>>>>  TBLPROPERTIES (
>>>>>>>>>> 'wso2.carbon.datasource.name'='WSO2BAM_DATASOURCE',
>>>>>>>>>>  'hive.jdbc.update.on.duplicate' = 'true' ,
>>>>>>>>>> 'hive.jdbc.primary.key.fields' = 'messageRowID' ,
>>>>>>>>>>  'hive.jdbc.table.create.query' =
>>>>>>>>>> 'CREATE TABLE ActivitySummary (messageRowID VARCHAR(100) NOT NULL
>>>>>>>>>> PRIMARY KEY,
>>>>>>>>>>  sentTimestamp BIGINT, bamActivityID VARCHAR(40), soapHeader
>>>>>>>>>> TEXT, soapBody TEXT, host VARCHAR(25))' );
>>>>>>>>>>
>>>>>>>>>> insert overwrite table ActivitySummaryTable
>>>>>>>>>>  select messageID, sentTimestamp, activityID, soapHeader,
>>>>>>>>>> soapBody, host
>>>>>>>>>> from ActivityDataTable
>>>>>>>>>> where version= "1.0.0";
>>>>>>>>>>
>>>>>>>>>> 4. How to write a toolBox step by step to show what I want. (how
>>>>>>>>>> to design the UI to show what I want)
>>>>>>>>>>
>>>>>>>>>> And is there a way to debug hive queries?
>>>>>>>>>>
>>>>>>>>>> For following I get an error while executing query.
>>>>>>>>>>
>>>>>>>>>> CREATE EXTERNAL TABLE IF NOT EXISTS ActivityDataTable
>>>>>>>>>> (messageID STRING, sentTimestamp BIGINT, activityID STRING,
>>>>>>>>>> version STRING, soapHeader STRING, soapBody STRING, host STRING)
>>>>>>>>>>  STORED BY
>>>>>>>>>> 'org.apache.hadoop.hive.cassandra.CassandraStorageHandler'
>>>>>>>>>> WITH SERDEPROPERTIES (
>>>>>>>>>>   "cassandra.host" = "127.0.0.1" ,
>>>>>>>>>>  "cassandra.port" = "9160" ,
>>>>>>>>>> "cassandra.ks.name" = "EVENT_KS" ,
>>>>>>>>>>  "cassandra.ks.username" = "admin" ,
>>>>>>>>>> "cassandra.ks.password" = "admin" ,
>>>>>>>>>>  "cassandra.cf.name" = "stream_1" ,
>>>>>>>>>> "cassandra.columns.mapping" =
>>>>>>>>>>  ":key, payload_timestamp, correlation_bam_activity_id, Version,
>>>>>>>>>> payload_SOAPHeader, payload_SOAPBody, meta_host" );
>>>>>>>>>>
>>>>>>>>>> CREATE EXTERNAL TABLE IF NOT EXISTS ActivitySummaryTable(
>>>>>>>>>>  messageRowID STRING, sentTimestamp BIGINT, bamActivityID
>>>>>>>>>> STRING, soapHeader STRING, soapBody STRING, host STRING)
>>>>>>>>>> STORED BY
>>>>>>>>>> 'org.wso2.carbon.hadoop.hive.jdbc.storage.JDBCStorageHandler'
>>>>>>>>>>  TBLPROPERTIES (
>>>>>>>>>> 'wso2.carbon.datasource.name'='WSO2BAM_DATASOURCE',
>>>>>>>>>>  'hive.jdbc.update.on.duplicate' = 'true' ,
>>>>>>>>>> 'hive.jdbc.primary.key.fields' = 'messageRowID' ,
>>>>>>>>>>  'hive.jdbc.table.create.query' =
>>>>>>>>>> 'CREATE TABLE ActivitySummary (messageRowID VARCHAR(100) NOT NULL
>>>>>>>>>> PRIMARY KEY,
>>>>>>>>>>  sentTimestamp BIGINT, bamActivityID VARCHAR(40), soapHeader
>>>>>>>>>> TEXT, soapBody TEXT, host VARCHAR(25))' );
>>>>>>>>>>
>>>>>>>>>> insert overwrite table ActivitySummaryTable
>>>>>>>>>>  select messageID, sentTimestamp, activityID, soapHeader,
>>>>>>>>>> soapBody, host
>>>>>>>>>> from ActivityDataTable
>>>>>>>>>> where version= "1.0.0";
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>    * ERROR: Error while executing Hive script.Query returned
>>>>>>>>>> non-zero code: 9, cause: FAILED: Execution Error, return code 2 from
>>>>>>>>>> org.apache.hadoop.hive.ql.exec.MapRedTask *
>>>>>>>>>>
>>>>>>>>>> Docs seems not have answers :(
>>>>>>>>>>
>>>>>>>>>> Thank You.
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> *Hasitha Abeykoon*
>>>>>>>>>> Software Engineer; WSO2, Inc.; http://wso2.com
>>>>>>>>>> *cell:* *+94 719363063*
>>>>>>>>>> *blog: **abeykoon.blogspot.com* <http://abeykoon.blogspot.com>* *
>>>>>>>>>> *
>>>>>>>>>> *
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> *Sinthuja Rajendran*
>>>>>>>>
>>>>>>>> Software Engineer <http://wso2.com/>
>>>>>>>> WSO2, Inc.:http://wso2.com
>>>>>>>>
>>>>>>>> Blog: http://sinthu-rajan.blogspot.com/
>>>>>>>> Mobile: +94774273955
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> *Hasitha Abeykoon*
>>>>>> Software Engineer; WSO2, Inc.; http://wso2.com
>>>>>> *cell:* *+94 719363063*
>>>>>> *blog: **abeykoon.blogspot.com* <http://abeykoon.blogspot.com>* *
>>>>>> *
>>>>>> *
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> *Hasitha Abeykoon*
>>>> Software Engineer; WSO2, Inc.; http://wso2.com
>>>> *cell:* *+94 719363063*
>>>> *blog: **abeykoon.blogspot.com* <http://abeykoon.blogspot.com>* *
>>>> *
>>>> *
>>>>
>>>
>>>
>>>
>>> --
>>> *Sinthuja Rajendran*
>>> Software Engineer <http://wso2.com/>
>>> WSO2, Inc.:http://wso2.com
>>>
>>> Blog: http://sinthu-rajan.blogspot.com/
>>> Mobile: +94774273955
>>>
>>>
>>>
>>
>>
>> --
>> *Hasitha Abeykoon*
>> Software Engineer; WSO2, Inc.; http://wso2.com
>> *cell:* *+94 719363063*
>> *blog: **abeykoon.blogspot.com* <http://abeykoon.blogspot.com>* *
>> *
>> *
>>
>
>
>
> --
> *Hasitha Abeykoon*
> Software Engineer; WSO2, Inc.; http://wso2.com
> *cell:* *+94 719363063*
> *blog: **abeykoon.blogspot.com* <http://abeykoon.blogspot.com>* *
> *
> *
>



-- 
*Sinthuja Rajendran*
Software Engineer <http://wso2.com/>
WSO2, Inc.:http://wso2.com

Blog: http://sinthu-rajan.blogspot.com/
Mobile: +94774273955
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to