From b60875f32ffdaf1151bcae46634406f5b6255ef3 Mon Sep 17 00:00:00 2001 From: Shlomi Noach Date: Thu, 25 Aug 2016 13:55:34 +0200 Subject: [PATCH] added and improved sample hooks --- resources/hooks-sample/gh-ost-on-before-cut-over-hook | 5 +++++ resources/hooks-sample/gh-ost-on-before-row-copy-hook | 5 +++++ resources/hooks-sample/gh-ost-on-begin-postponed-hook | 5 +++++ resources/hooks-sample/gh-ost-on-failure-hook | 5 +++++ resources/hooks-sample/gh-ost-on-interactive-command-hook | 5 +++++ resources/hooks-sample/gh-ost-on-row-copy-complete-hook | 5 +++++ resources/hooks-sample/gh-ost-on-rowcount-complete-hook | 5 +++++ resources/hooks-sample/gh-ost-on-startup-hook | 5 +++++ resources/hooks-sample/gh-ost-on-status-hook | 5 +++++ resources/hooks-sample/gh-ost-on-stop-replication-hook | 5 +++++ resources/hooks-sample/gh-ost-on-success-hook | 5 +++++ resources/hooks-sample/gh-ost-on-success-hook-2 | 5 +++++ resources/hooks-sample/gh-ost-on-validated-hook | 5 +++++ 13 files changed, 65 insertions(+) create mode 100755 resources/hooks-sample/gh-ost-on-before-cut-over-hook create mode 100755 resources/hooks-sample/gh-ost-on-before-row-copy-hook create mode 100755 resources/hooks-sample/gh-ost-on-begin-postponed-hook create mode 100755 resources/hooks-sample/gh-ost-on-failure-hook create mode 100755 resources/hooks-sample/gh-ost-on-interactive-command-hook create mode 100755 resources/hooks-sample/gh-ost-on-row-copy-complete-hook create mode 100755 resources/hooks-sample/gh-ost-on-rowcount-complete-hook create mode 100755 resources/hooks-sample/gh-ost-on-startup-hook create mode 100755 resources/hooks-sample/gh-ost-on-status-hook create mode 100755 resources/hooks-sample/gh-ost-on-stop-replication-hook create mode 100755 resources/hooks-sample/gh-ost-on-success-hook create mode 100755 resources/hooks-sample/gh-ost-on-success-hook-2 create mode 100755 resources/hooks-sample/gh-ost-on-validated-hook diff --git a/resources/hooks-sample/gh-ost-on-before-cut-over-hook b/resources/hooks-sample/gh-ost-on-before-cut-over-hook new file mode 100755 index 0000000..41bf2d0 --- /dev/null +++ b/resources/hooks-sample/gh-ost-on-before-cut-over-hook @@ -0,0 +1,5 @@ +#!/bin/bash + +# Sample hook file for gh-ost-on-before-cut-over + +echo "$(date) gh-ost-on-before-cut-over $GH_OST_DATABASE_NAME.$GH_OST_TABLE_NAME" >> /tmp/gh-ost.log diff --git a/resources/hooks-sample/gh-ost-on-before-row-copy-hook b/resources/hooks-sample/gh-ost-on-before-row-copy-hook new file mode 100755 index 0000000..4282bcd --- /dev/null +++ b/resources/hooks-sample/gh-ost-on-before-row-copy-hook @@ -0,0 +1,5 @@ +#!/bin/bash + +# Sample hook file for gh-ost-on-before-row-copy + +echo "$(date) gh-ost-on-before-row-copy $GH_OST_DATABASE_NAME.$GH_OST_TABLE_NAME" >> /tmp/gh-ost.log diff --git a/resources/hooks-sample/gh-ost-on-begin-postponed-hook b/resources/hooks-sample/gh-ost-on-begin-postponed-hook new file mode 100755 index 0000000..85cc7a1 --- /dev/null +++ b/resources/hooks-sample/gh-ost-on-begin-postponed-hook @@ -0,0 +1,5 @@ +#!/bin/bash + +# Sample hook file for gh-ost-on-begin-postponed + +echo "$(date) gh-ost-on-begin-postponed $GH_OST_DATABASE_NAME.$GH_OST_TABLE_NAME" >> /tmp/gh-ost.log diff --git a/resources/hooks-sample/gh-ost-on-failure-hook b/resources/hooks-sample/gh-ost-on-failure-hook new file mode 100755 index 0000000..42ccaea --- /dev/null +++ b/resources/hooks-sample/gh-ost-on-failure-hook @@ -0,0 +1,5 @@ +#!/bin/bash + +# Sample hook file for gh-ost-on-failure + +echo "$(date) gh-ost-on-failure $GH_OST_DATABASE_NAME.$GH_OST_TABLE_NAME; ghost: $GH_OST_OLD_TABLE_NAME" >> /tmp/gh-ost.log diff --git a/resources/hooks-sample/gh-ost-on-interactive-command-hook b/resources/hooks-sample/gh-ost-on-interactive-command-hook new file mode 100755 index 0000000..09b35ea --- /dev/null +++ b/resources/hooks-sample/gh-ost-on-interactive-command-hook @@ -0,0 +1,5 @@ +#!/bin/bash + +# Sample hook file for gh-ost-on-interactive-command + +echo "$(date) gh-ost-on-interactive-command $GH_OST_COMMAND" >> /tmp/gh-ost.log diff --git a/resources/hooks-sample/gh-ost-on-row-copy-complete-hook b/resources/hooks-sample/gh-ost-on-row-copy-complete-hook new file mode 100755 index 0000000..1718ee4 --- /dev/null +++ b/resources/hooks-sample/gh-ost-on-row-copy-complete-hook @@ -0,0 +1,5 @@ +#!/bin/bash + +# Sample hook file for gh-ost-on-row-copy-complete + +echo "$(date) gh-ost-on-row-copy-complete $GH_OST_DATABASE_NAME.$GH_OST_TABLE_NAME" >> /tmp/gh-ost.log diff --git a/resources/hooks-sample/gh-ost-on-rowcount-complete-hook b/resources/hooks-sample/gh-ost-on-rowcount-complete-hook new file mode 100755 index 0000000..970e127 --- /dev/null +++ b/resources/hooks-sample/gh-ost-on-rowcount-complete-hook @@ -0,0 +1,5 @@ +#!/bin/bash + +# Sample hook file for gh-ost-on-rowcount-complete + +echo "$(date) gh-ost-on-rowcount-complete $GH_OST_DATABASE_NAME.$GH_OST_TABLE_NAME" >> /tmp/gh-ost.log diff --git a/resources/hooks-sample/gh-ost-on-startup-hook b/resources/hooks-sample/gh-ost-on-startup-hook new file mode 100755 index 0000000..f439af5 --- /dev/null +++ b/resources/hooks-sample/gh-ost-on-startup-hook @@ -0,0 +1,5 @@ +#!/bin/bash + +# Sample hook file for gh-ost-on-startup + +echo "$(date) gh-ost-on-startup $GH_OST_DATABASE_NAME.$GH_OST_TABLE_NAME" >> /tmp/gh-ost.log diff --git a/resources/hooks-sample/gh-ost-on-status-hook b/resources/hooks-sample/gh-ost-on-status-hook new file mode 100755 index 0000000..50bd934 --- /dev/null +++ b/resources/hooks-sample/gh-ost-on-status-hook @@ -0,0 +1,5 @@ +#!/bin/bash + +# Sample hook file for gh-ost-on-status + +echo "$(date) gh-ost-on-status; elapsed: ${GH_OST_ELAPSED_SECONDS}; msg: ${GH_OST_STATUS}" >> /tmp/gh-ost.log diff --git a/resources/hooks-sample/gh-ost-on-stop-replication-hook b/resources/hooks-sample/gh-ost-on-stop-replication-hook new file mode 100755 index 0000000..232ad95 --- /dev/null +++ b/resources/hooks-sample/gh-ost-on-stop-replication-hook @@ -0,0 +1,5 @@ +#!/bin/bash + +# Sample hook file for gh-ost-on-stop-replication + +echo "$(date) gh-ost-on-stop-replication $GH_OST_DATABASE_NAME.$GH_OST_TABLE_NAME $GH_OST_MIGRATED_HOST" >> /tmp/gh-ost.log diff --git a/resources/hooks-sample/gh-ost-on-success-hook b/resources/hooks-sample/gh-ost-on-success-hook new file mode 100755 index 0000000..aa4aedc --- /dev/null +++ b/resources/hooks-sample/gh-ost-on-success-hook @@ -0,0 +1,5 @@ +#!/bin/bash + +# Sample hook file for gh-ost-on-success + +echo "$(date) gh-ost-on-success $GH_OST_DATABASE_NAME.$GH_OST_TABLE_NAME" >> /tmp/gh-ost.log diff --git a/resources/hooks-sample/gh-ost-on-success-hook-2 b/resources/hooks-sample/gh-ost-on-success-hook-2 new file mode 100755 index 0000000..aa4aedc --- /dev/null +++ b/resources/hooks-sample/gh-ost-on-success-hook-2 @@ -0,0 +1,5 @@ +#!/bin/bash + +# Sample hook file for gh-ost-on-success + +echo "$(date) gh-ost-on-success $GH_OST_DATABASE_NAME.$GH_OST_TABLE_NAME" >> /tmp/gh-ost.log diff --git a/resources/hooks-sample/gh-ost-on-validated-hook b/resources/hooks-sample/gh-ost-on-validated-hook new file mode 100755 index 0000000..efef4e5 --- /dev/null +++ b/resources/hooks-sample/gh-ost-on-validated-hook @@ -0,0 +1,5 @@ +#!/bin/bash + +# Sample hook file for gh-ost-on-validated + +echo "$(date) gh-ost-on-validated $GH_OST_DATABASE_NAME.$GH_OST_TABLE_NAME" >> /tmp/gh-ost.log