Ottomata has submitted this change and it was merged.

Change subject: Add --hdfs-mount option to script to dump webrequest status
......................................................................


Add --hdfs-mount option to script to dump webrequest status

Change-Id: Ie221f73bc169fa8e7022f9f22a32e6dc4f69fe29
---
M bin/refinery-dump-status-webrequest-partitions
1 file changed, 11 insertions(+), 3 deletions(-)

Approvals:
  Ottomata: Verified; Looks good to me, approved



diff --git a/bin/refinery-dump-status-webrequest-partitions 
b/bin/refinery-dump-status-webrequest-partitions
index 3ee8a88..1ac181c 100755
--- a/bin/refinery-dump-status-webrequest-partitions
+++ b/bin/refinery-dump-status-webrequest-partitions
@@ -9,6 +9,9 @@
 dumps the status of the raw webrequest partitions for the last few hours.
 
 Options:
+  --hdfs-mount MOUNT_POINT
+                  -- Assume that HDFS is mounted at MOUNT_POINT (needs
+                     to be an absolute path) instead of /mnt/hdfs .
   --quiet         -- Only produce output, if there are faulty partitions
 
 HOURS_TO_GO_BACK  -- number of hours to go back in time. (Default: 51)
@@ -21,9 +24,6 @@
 HOUR_OFFSET_MIN=3
 
 HDFS_MOUNT_DIR_ABS=/mnt/hdfs
-
-WEBREQUEST_DATA_DIR_ABS="$HDFS_MOUNT_DIR_ABS/wmf/data/raw/webrequest"
-WEBREQUEST_STATISTICS_DIR_ABS="$HDFS_MOUNT_DIR_ABS/wmf/data/raw/webrequests_faulty_hosts"
 
 HAS_FAULTY=
 QUIET=
@@ -43,6 +43,11 @@
             print_help
             exit 1
             ;;
+        "--hdfs-mount" )
+            [[ $# -gt 0 ]] || error "$PARAM expects a further parameter"
+            HDFS_MOUNT_DIR_ABS="$1"
+            shift
+            ;;
         "--quiet" )
             QUIET=yes
             ;;
@@ -57,6 +62,9 @@
     esac
 done
 
+WEBREQUEST_DATA_DIR_ABS="$HDFS_MOUNT_DIR_ABS/wmf/data/raw/webrequest"
+WEBREQUEST_STATISTICS_DIR_ABS="$HDFS_MOUNT_DIR_ABS/wmf/data/raw/webrequests_faulty_hosts"
+
 log_no_lf() {
     if [ -n "$QUIET" ]
     then

-- 
To view, visit https://gerrit.wikimedia.org/r/185440
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie221f73bc169fa8e7022f9f22a32e6dc4f69fe29
Gerrit-PatchSet: 1
Gerrit-Project: analytics/refinery
Gerrit-Branch: master
Gerrit-Owner: QChris <[email protected]>
Gerrit-Reviewer: Ottomata <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to