Support also different version of Hadoop (=Fedora).
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Sun, 18 Jan 2015 12:15:01 +0000 (13:15 +0100)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Sun, 18 Jan 2015 12:15:01 +0000 (13:15 +0100)
files/accounting/quota.awk

index b3b0a44..8aa92da 100644 (file)
@@ -19,8 +19,13 @@ BEGIN {
        print "INSERT INTO measure (name) VALUES ('quota');";
 }
 
-{
+/^[0-9]+[      ]+[0-9]+[       ]+\/.*/ {
        used=$1
        user=$4
        print "INSERT INTO quota (id_measure, user, used) VALUES (last_insert_id(), " dbstr(user) ", " dbi(used) ");"
 }
+/^[0-9]+[      ]+\/.*/ {
+       used=$1
+       user=$3
+       print "INSERT INTO quota (id_measure, user, used) VALUES (last_insert_id(), " dbstr(user) ", " dbi(used) ");"
+}