Skip to content

martensa/se-event-lab-1

Repository files navigation

se-event-lab-1

Author: Alexander Martens

Deploy the pre-requisites

  1. Log in to virtual machine where Ambari server is running
ssh -i .ssh/<private_key_pem_file> cloudbreak@<ambari_host>
  1. Change user to root
sudo -i
  1. Change user to root
git clone https://github.com/martensa/se-event-lab-1
  1. Execute the deployment script
cd se-event-lab-1
./deployPreRequisites.sh
  1. Start CometD messaging container
./startContainer.sh

Go to NiFi UI

  1. Upload NiFi template nifi-credit-fraud.xml (see NiFiFlow folder in this repository).

Alt text

  1. Add the uploaded template to the canvas per drag & drop.

Alt text

  1. Review the entire flow and get a understanding of the single steps.
  2. Resolve the two warnings at "QueryRecord" and “QueueIncomingTransaction” processors. Therefore, you need to go to Settings > Controller Services.

Alt text

Please edit the HortonworksSchemaRegistry service and update the host name of the Schema Registry URL. Then, you can enable this service and all the referencing components.

Alt text

The warnings should get resolved. 5. Update the Kafka broker URLs of both “QueueIncomingTransaction” processors with the appropriate host name. 6. Start the entire flow in NiFi.\n

Alt text

Go to Schema Registry UI

  1. Make sure that the following schemas exists: original_transaction, incoming_transaction, customer_validation
  2. Review the schemas for the different events in order to get a feeling about the data.

Start Credit Card Transaction Simulator

  1. Log in to virtual machine where Ambari server is running
ssh -i .ssh/<private_key_pem_file> cloudbreak@<ambari_host>
  1. Change user to root
sudo -i
  1. Execute the start script
cd se-event-lab-1
./startSimulation.sh

Go to Streaming Analytcis Manager UI

  1. Use the navigation bar at the right to open the built-in model registry.
  2. Click on +,upload the PMML Credit Fraud model pmml-credit-fraud.xml (see PMMLModel folder in this repository) and name it "credit-fraud".

Alt text

  1. Download the CreditCard Fraud streaming application credit-fraud.json (see SAMTopology folder in this repository)

  2. Replace all occurences of {{HOST1}} with your Ambari hostname.

  3. Navigate to "My Applications", import the existing application and name it "Credit-Fraud".

Alt text

Alt text

  1. Review the analytics pipeline and get a understanding of the single steps.

  2. Make sure that you have the right hostname provided for the following processors: "IncomingTransactions", "GetCustomerDetails", "GetPurchaseAmountStats", "GetLastTransaction", "GetTransactionDistance", "SendStatusLegitimate", "SendStatusFraud", "UpsertLegitTransaction", "UpsertFraudTransaction", "TransactionHistoryOLAPIndex".

  3. Start the streaming application

Alt text

Alt text

Explore the legitimate and fraudulemt transaction data

  1. Create your own visualization using Zeppelin
  2. Finalize the demo: TransactionMonitorUI TransactionMonitorMobileApp

PMML model generation

  1. Import notebook note.json into Zeppelin (see Zeppelin folder in this repository)
  2. Review the Zeppelin notebook that was used to learn the PMML model

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors