Last active
November 14, 2017 10:27
-
-
Save abhilater/457ead54284285368953d062363cbd78 to your computer and use it in GitHub Desktop.
[Live ops] Live ops snippets #liveops
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bitter steps: | |
1. Rsync | |
2. Change ownership | |
3. Hbase-site copy from backup | |
4. local.clj copy from backup | |
create_namespace 'dataplat_analytics' | |
create 'dataplat_analytics:agent_issue_events' , {NAME => 'raw' ,VERSIONS => 1, COMPRESSION => 'SNAPPY'},{REGION_REPLICATION => 2}, METADATA => {'table-version' => 1} | |
create 'dataplat_analytics:queue_issue_events' , {NAME => 'raw' ,VERSIONS => 1, COMPRESSION => 'SNAPPY'},{REGION_REPLICATION => 2}, METADATA => {'table-version' => 1} | |
create 'dataplat_analytics:agent_live_aggregates' , {NAME => 'measure' , COMPRESSION => 'SNAPPY'},{REGION_REPLICATION => 2} , METADATA => {'table-version' => 1} | |
create 'dataplat_analytics:queue_live_aggregates' , {NAME => 'measure' , COMPRESSION => 'SNAPPY'},{REGION_REPLICATION => 2} , METADATA => {'table-version' => 1} | |
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d "name=Abhishek&email=abhilater@gmail.com&comments=Hi bhai" http://ayaneshuadvisors.com/php/contact.php | |
truncate 'dataplat_analytics:agent_live_aggregates' | |
truncate 'dataplat_analytics:queue_live_aggregates' | |
truncate 'dataplat_analytics:agent_issue_events' | |
truncate 'dataplat_analytics:queue_issue_events' | |
scan 'dataplat_analytics:agent_issue_events' | |
scan 'dataplat_analytics:queue_issue_events' | |
scan 'dataplat_analytics:agent_live_aggregates' | |
scan 'dataplat_analytics:queue_live_aggregates' | |
;; agent assign, reassign, and reply stuffs | |
cat create_issue_by_customer_new.json | ./kafka-console-producer.sh --broker-list sandbox.hortonworks.com:6667 --topic dashboard_events | |
=> queue_issue_events(2 cols), | |
cat assign_issue_to_agent_new.json | ./kafka-console-producer.sh --broker-list sandbox.hortonworks.com:6667 --topic dashboard_events | |
=> agent_issue_events (2 cols), queue_issue_events (fa_ts),queue_live_aggregates (tta) | |
cat reply_to_issue_by_agent.json | ./kafka-console-producer.sh --broker-list sandbox.hortonworks.com:6667 --topic dashboard_events (1st response) | |
=> agent_issue_events (fr), agent_live_aggregates (hold) | |
cat assign_issue_to_agent_with_previous.json | ./kafka-console-producer.sh --broker-list sandbox.hortonworks.com:6667 --topic dashboard_events | |
=> agent_issue_events (new agent) (2 cols), agent_live_aggregates old agent(int) | |
cat reply_to_issue_by_agent_2.json | ./kafka-console-producer.sh --broker-list sandbox.hortonworks.com:6667 --topic dashboard_events (1st response) | |
=> agent_issue_events (new agent) (fr), agent_live_aggregates new agent(hold) | |
cat reply_to_issue_by_agent_2.json | ./kafka-console-producer.sh --broker-list sandbox.hortonworks.com:6667 --topic dashboard_events (2nd response) | |
=> no change | |
cat assign_issue_to_agent_with_previous_2.json | ./kafka-console-producer.sh --broker-list sandbox.hortonworks.com:6667 --topic dashboard_events (back to agent 1 from 2) | |
=> agent_issue_events (agent 1) (2 cols overwritten), agent_live_aggregates (agent 2) (int) | |
cat reply_to_issue_by_agent_1_2.json | ./kafka-console-producer.sh --broker-list sandbox.hortonworks.com:6667 --topic dashboard_events (1st response) | |
=> agent_issue_events (fr), agent_live_aggregates (hold) | |
;; queue stuff | |
cat move_issue_back_to_queue_a1.json | ./kafka-console-producer.sh --broker-list sandbox.hortonworks.com:6667 --topic dashboard_events | |
=> queue_issue_events (move_in, fa), agent_live_aggregates (a1) (int), queue_live_agg (age) | |
cat assign_issue_to_agent_a3_after_back_queue.json | ./kafka-console-producer.sh --broker-list sandbox.hortonworks.com:6667 --topic dashboard_events | |
=> agent_issue_events (a3)(2 cols), queue_issue_events (fa_ts),queue_live_aggregates (tta) | |
cat change_issue_queue_a3_q2.json | ./kafka-console-producer.sh --broker-list sandbox.hortonworks.com:6667 --topic dashboard_events | |
=> queue_issue_events (q2) (move_in, fa), queue_live_agg (age) # agent_live_aggregates (a3) (int) will not update as there is no fr for a3 | |
cat assign_issue_to_agent_a4_after_change_queue.json | ./kafka-console-producer.sh --broker-list sandbox.hortonworks.com:6667 --topic dashboard_events | |
=> agent_issue_events (a4)(2 cols), queue_issue_events (q2)(fa_ts),queue_live_aggregates (q2)(tta) | |
cat reply_to_issue_by_agent_4.json | ./kafka-console-producer.sh --broker-list sandbox.hortonworks.com:6667 --topic dashboard_events (1st response) | |
=> agent_issue_events (a4) (fr), agent_live_aggregates (a4)(hold) | |
cat reply_to_issue_by_agent_4.json | ./kafka-console-producer.sh --broker-list sandbox.hortonworks.com:6667 --topic dashboard_events (2nd response) | |
=> no change | |
cat resolve_issue_by_agent_4.json | ./kafka-console-producer.sh --broker-list sandbox.hortonworks.com:6667 --topic dashboard_events | |
=> agent_live_aggregates (a4)(int), queue_live_aggregates (q2)(age) | |
cat feedback_by_customer_new.json | ./kafka-console-producer.sh --broker-list sandbox.hortonworks.com:6667 --topic dashboard_events | |
=> agent_live_aggregates (a4)(csat), queue_live_aggregates (q2)(csat) | |
cat reopen_issue_to_agent_4.json | ./kafka-console-producer.sh --broker-list sandbox.hortonworks.com:6667 --topic dashboard_events | |
=> agent_issue_events (a4)(2 cols), queue_issue_events (q2)(*move_in,fa_ts*) | |
;TODO check rare case of agent deletion between resolve and reopen | |
cat reject_issue_by_agent_4.json | ./kafka-console-producer.sh --broker-list sandbox.hortonworks.com:6667 --topic dashboard_events | |
=> no agent_live_aggregates (a4)(int) as no fr, queue_live_aggregates (q2)(age) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment