Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Build presto image and push the images to a exsting repository
    1. Download and extract presto package version v0.0.2: presto-v0.0.2.tar.gz
    2. docker build -t presto:v0.0.2 .
    3. docker tag presto:v0.0.2 registry.baidubce.com/onap/presto:v0.0.2
    4. docker push registry.baidubce.com/onap/presto:v0.0.2
    5. Note: Replace the repository path with your own repository.
  2. Install presto service
    1. kubectl -n onap run dl-presto --image=presto:v0.0.2 --env="MongoDB_IP=dcae-mongohost" --env="MongoDB_PORT=27017" --image-pull-policy=IfNotPresent
    2. kubectl expose pod dl-presto --name=dl-presto --port=9000 --target-port=9000 --type=NodePort -n onap
  3. Login to the dev-dcae-datalake-postgres-primary container and execute following sql commands:

    Code Block
    titledatalake-db init_data
    linenumberstrue
    psql -Udatalake -ddatalake
    \dt
    delete from map_db_topic;
    delete from map_db_design;
    delete from db;
    delete from data_exposure ;
    insert into db (id, db_type_id, enabled, encrypt, name,host,port,database_name) values (2, 'MONGO', true, true, 'MongoDB 1','dcae-mongohost',27017,'datalake');
    insert into map_db_topic(db_id,topic_id) select db.id, topic.id from db_type, db, topic where db.db_type_id=db_type.id and db_type.tool=false;
    update kafka set secure=true, pass='admin_secret' where id=1;
    insert into topic_name (id) values ('unauthenticated.PERFORMANCE_MEASUREMENTS');
    insert into topic(id, topic_name_id,correlate_cleared_message,enabled, message_id_path,data_format) values (6, 'unauthenticated.PERFORMANCE_MEASUREMENTS',true,true,'/event/commonEventHeader','JSON');
     insert into data_exposure(id, note,sql_template,db_id) values ('pm_datapDUSessionEstSR','pm_message', 'SELECT json_format(CAST( event.perf3gppFields.measDataCollection.measInfoList[1].measTypes.sMeasTypesListmeasValuesList[1].measResults[1].sValue AS JSON)) AS sMeasTypesListpDUSessionEstSR, json_format(CAST( event.perf3gppFields.measDataCollection.measInfoList[1].measValuesListcommonEventHeader.startEpochMicrosec AS JSON)) AS measValuesList timeStamp FROM unauthenticatedperformancemeasurements WHERE any_match(event.perf3gppFields.measDataCollection.measInfoList[1].measTypes.sMeasTypesList, e -> e like ''${snssaiid}'') AND event.commonEventHeader.startEpochMicrosec >= ${timetimeStamp}',2); //db_id refers to mongodb in table db, this template filters PM data based on snssai and startEpochMicrosec;