incubator-trafficcontrol git commit: Update Version numbers to 2.0

2017-02-23 Thread friede
Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/2.0.x [created] c09abce24


Update Version numbers to 2.0


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/c09abce2
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/c09abce2
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/c09abce2

Branch: refs/heads/2.0.x
Commit: c09abce24fd68698afff90dbefc7da150ca9c8e3
Parents: feffd67
Author: Eric Friedrich 
Authored: Thu Feb 23 21:07:47 2017 -0500
Committer: Eric Friedrich 
Committed: Thu Feb 23 21:07:47 2017 -0500

--
 traffic_monitor/pom.xml  |  2 +-
 traffic_router/build/pom.xml |  2 +-
 traffic_router/configuration/pom.xml |  2 +-
 traffic_router/connector/pom.xml |  2 +-
 traffic_router/core/pom.xml  |  2 +-
 traffic_router/geolocation/pom.xml   |  2 +-
 traffic_router/neustar/pom.xml   |  2 +-
 traffic_router/pom.xml   |  2 +-
 traffic_router/shared/#pom.xml#  | 99 +++
 traffic_router/shared/.#pom.xml  |  1 +
 traffic_router/shared/pom.xml|  2 +-
 11 files changed, 109 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/c09abce2/traffic_monitor/pom.xml
--
diff --git a/traffic_monitor/pom.xml b/traffic_monitor/pom.xml
index 7c59495..2538022 100644
--- a/traffic_monitor/pom.xml
+++ b/traffic_monitor/pom.xml
@@ -26,7 +26,7 @@ under the License.
 
com.comcast.cdn.traffic_control
traffic_monitor
-   1.9.0
+   2.0.0
war
 


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/c09abce2/traffic_router/build/pom.xml
--
diff --git a/traffic_router/build/pom.xml b/traffic_router/build/pom.xml
index a860b15..ceef9b4 100644
--- a/traffic_router/build/pom.xml
+++ b/traffic_router/build/pom.xml
@@ -22,7 +22,7 @@


com.comcast.cdn.traffic_control.traffic_router
traffic_router
-   1.9.0
+   2.0..0

 


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/c09abce2/traffic_router/configuration/pom.xml
--
diff --git a/traffic_router/configuration/pom.xml 
b/traffic_router/configuration/pom.xml
index 0d0ff89..1bd7820 100644
--- a/traffic_router/configuration/pom.xml
+++ b/traffic_router/configuration/pom.xml
@@ -25,7 +25,7 @@ under the License.

traffic_router

com.comcast.cdn.traffic_control.traffic_router
-   1.9.0
+   2.0.0

4.0.0
 

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/c09abce2/traffic_router/connector/pom.xml
--
diff --git a/traffic_router/connector/pom.xml b/traffic_router/connector/pom.xml
index 2dd5f83..251e41a 100644
--- a/traffic_router/connector/pom.xml
+++ b/traffic_router/connector/pom.xml
@@ -19,7 +19,7 @@


com.comcast.cdn.traffic_control.traffic_router
traffic_router
-1.9.0
+2.0.0

 
traffic_router_connector

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/c09abce2/traffic_router/core/pom.xml
--
diff --git a/traffic_router/core/pom.xml b/traffic_router/core/pom.xml
index e3d8788..136c84b 100644
--- a/traffic_router/core/pom.xml
+++ b/traffic_router/core/pom.xml
@@ -18,7 +18,7 @@


com.comcast.cdn.traffic_control.traffic_router
traffic_router
-   1.9.0
+   2.0.0

 
traffic_router_core

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/c09abce2/traffic_router/geolocation/pom.xml
--
diff --git a/traffic_router/geolocation/pom.xml 
b/traffic_router/geolocation/pom.xml
index 94186a2..1866ef3 100644
--- a/traffic_router/geolocation/pom.xml
+++ b/traffic_router/geolocation/pom.xml
@@ -25,7 +25,7 @@ under the License.

traffic_router

com.comcast.cdn.traffic_control.traffic_router
-   1.9.0
+   2.0.0

4.0.0
 

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/c09abce2/traffic_router/neustar/pom.xml
--
diff --git 

[2/2] incubator-trafficcontrol git commit: This closes #303.

2017-02-23 Thread dangogh
This closes #303.


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/feffd67e
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/feffd67e
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/feffd67e

Branch: refs/heads/master
Commit: feffd67e711d3c62889b61ae747233ea90ce689e
Parents: 7f704f5
Author: Dan Kirkwood 
Authored: Thu Feb 23 17:49:41 2017 -0700
Committer: Dan Kirkwood 
Committed: Thu Feb 23 17:49:41 2017 -0700

--

--




[1/2] incubator-trafficcontrol git commit: riak_adapter and ssl_key tests now pass

2017-02-23 Thread dangogh
Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master c25149c8a -> feffd67e7


riak_adapter and ssl_key tests now pass


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/7f704f52
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/7f704f52
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/7f704f52

Branch: refs/heads/master
Commit: 7f704f52c7ecf94bc836673a94b7e7dd48fd2c8e
Parents: c25149c
Author: Dave Neuman 
Authored: Thu Feb 23 14:41:23 2017 -0700
Committer: Dan Kirkwood 
Committed: Thu Feb 23 17:49:07 2017 -0700

--
 traffic_ops/app/lib/Connection/RiakAdapter.pm |  2 +-
 traffic_ops/app/t/api/1.1/riak_adapter.t  | 11 +++
 2 files changed, 4 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/7f704f52/traffic_ops/app/lib/Connection/RiakAdapter.pm
--
diff --git a/traffic_ops/app/lib/Connection/RiakAdapter.pm 
b/traffic_ops/app/lib/Connection/RiakAdapter.pm
index 474bc69..440903f 100755
--- a/traffic_ops/app/lib/Connection/RiakAdapter.pm
+++ b/traffic_ops/app/lib/Connection/RiakAdapter.pm
@@ -108,7 +108,7 @@ sub delete {
my $key = shift || confess("Supply a key");
my $key_uri = $self->get_key_uri( $bucket, $key );
my $key_ctx = $self->get_url($key_uri);
-   return $ua->delete( $self->$key_ctx );
+   return $ua->delete( $key_ctx );
 }
 
 sub get {

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/7f704f52/traffic_ops/app/t/api/1.1/riak_adapter.t
--
diff --git a/traffic_ops/app/t/api/1.1/riak_adapter.t 
b/traffic_ops/app/t/api/1.1/riak_adapter.t
index 1c2a3d4..5f0d8a6 100644
--- a/traffic_ops/app/t/api/1.1/riak_adapter.t
+++ b/traffic_ops/app/t/api/1.1/riak_adapter.t
@@ -52,12 +52,12 @@ is( $key_uri, "/riak/" . BUCKET . "/" . KEY );
 my $response = $riak_util->get( BUCKET, KEY );
 is( $response->{_rc},200 );
 is( $response->{_headers}->{'content-type'}, 'application/json' );
-is( $fake_answer,$response->{_content} );
+is( $fake_answer, $response->{_content} );
 
 #PUT
 $response = $riak_util->put( BUCKET, KEY, "value1" );
 is( $response->{_rc}, 200 );
-is( $fake_answer, $response->{_content} );
+is( $fake_answer, $response->{_content} );
 
 #PUT - With Content Type
 $response = $riak_util->put( BUCKET, KEY, "value1", "application/json" );
@@ -67,7 +67,7 @@ is( $fake_answer, $response->{_content} );
 #DELETE
 $response = $riak_util->delete( BUCKET, KEY );
 is( $response->{_rc}, 200 );
-is( $fake_answer, $response->{_content} );
+is( $fake_answer, $response->{_content} );
 
 #PING
 $response = $riak_util->ping();
@@ -79,9 +79,4 @@ $response = $riak_util->stats();
 is( $response->{_rc}, 200 );
 is( $fake_answer, $response->{_content} );
 
-#diag "response: " . Dumper($response);
-#my $response = $riak_util->send_retry( sub { Utils::Riak->get( BUCKET, KEY ) 
} );
-
-#my $response = $riak_util->get( BUCKET, KEY );
-
 done_testing();



[2/2] incubator-trafficcontrol git commit: use uri form for pg_dump connection

2017-02-23 Thread dewrich
use uri form for pg_dump connection


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/bbc4d837
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/bbc4d837
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/bbc4d837

Branch: refs/heads/master
Commit: bbc4d8375a4a54ebeab3d7f9feac4f15c79df9eb
Parents: 386b6f4
Author: Dan Kirkwood 
Authored: Thu Jan 19 14:23:23 2017 -0700
Committer: Dewayne Richardson 
Committed: Thu Feb 23 12:07:05 2017 -0700

--
 traffic_ops/app/lib/UI/GenDbDump.pm | 19 +++
 1 file changed, 11 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/bbc4d837/traffic_ops/app/lib/UI/GenDbDump.pm
--
diff --git a/traffic_ops/app/lib/UI/GenDbDump.pm 
b/traffic_ops/app/lib/UI/GenDbDump.pm
index 1fa8088..600b77d 100644
--- a/traffic_ops/app/lib/UI/GenDbDump.pm
+++ b/traffic_ops/app/lib/UI/GenDbDump.pm
@@ -22,22 +22,25 @@ sub dbdump {
my $self = shift;
my $filename = $self->param('filename');
 
+   my ($db_name, $host, $port) = $Schema::dsn =~ 
/:database=([^;]*);host=([^;]+);port=(\d+)/;
my $db_user = $Schema::user;
my $db_pass = $Schema::pass;
-   my $db_name = $Schema::dsn;
-   my $host;
-   my $port;
-   my $dsn = $Schema::dsn;
-   ($db_name, $host, $port) = $dsn =~ 
/:database=(\w+);host=(\w+);port=(\d+)/;
+   my $uri = sprintf 'postgresql://%s:%s@%s:%s/%s', $db_user, $db_pass, 
$host, $port, $db_name;
 
-   my $cmd = "pg_dump -U " . $db_user . " -h localhost -C --column-insert";
-   my $extension = ".psql";
+   my $ok = open my $fh, '-|', "pg_dump $uri -C --column-insert";
+   if (! $ok ) {
+   $self->internal_server_error( { Error => "Error dumping 
database" } );  
+   return;
+   }
 
-   my $data = `$cmd`;
+   # slurp it in..
+   undef $/;
+   my $data = <$fh>;
 
$self->res->headers->content_type("application/download");
$self->res->headers->content_disposition( "attachment; filename=\"" . 
$filename . "\"" );
$self->render( data => $data );
+   close $fh;
 }
 
 1;



[1/2] incubator-trafficcontrol git commit: This closes #302

2017-02-23 Thread dewrich
Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master 386b6f47d -> c25149c8a


This closes #302


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/c25149c8
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/c25149c8
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/c25149c8

Branch: refs/heads/master
Commit: c25149c8a3233c8448da71f86693b1fec195c4a0
Parents: bbc4d83
Author: Dewayne Richardson 
Authored: Thu Feb 23 12:07:05 2017 -0700
Committer: Dewayne Richardson 
Committed: Thu Feb 23 12:07:05 2017 -0700

--

--




[2/4] incubator-trafficcontrol git commit: Moved the rp fix from syncCacheStat to syncDeliveryServiceStat

2017-02-23 Thread neuman
Moved the rp fix from syncCacheStat to syncDeliveryServiceStat


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/815fc8a4
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/815fc8a4
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/815fc8a4

Branch: refs/heads/master
Commit: 815fc8a4d9287d9445b7ab1db6368e118c2b533d
Parents: b54a347
Author: Steve Malenfant 
Authored: Wed Feb 15 14:39:50 2017 -0500
Committer: David Neuman 
Committed: Thu Feb 23 08:54:00 2017 -0700

--
 .../influxdb_tools/sync/sync_ts_databases.go | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/815fc8a4/traffic_stats/influxdb_tools/sync/sync_ts_databases.go
--
diff --git a/traffic_stats/influxdb_tools/sync/sync_ts_databases.go 
b/traffic_stats/influxdb_tools/sync/sync_ts_databases.go
index 6d00f8a..3e3692c 100644
--- a/traffic_stats/influxdb_tools/sync/sync_ts_databases.go
+++ b/traffic_stats/influxdb_tools/sync/sync_ts_databases.go
@@ -177,16 +177,11 @@ func syncDailyDb(ch chan string, sourceClient 
influx.Client, targetClient influx
 func syncCacheStat(sourceClient influx.Client, targetClient influx.Client, 
statName string, days int) {
//get records from source DB
db := cache
-   rp := "monthly"
-
-   if strings.Contains(statName, "1day") {
-   rp = "indefinite"
-   }
 
bps, _ := influx.NewBatchPoints(influx.BatchPointsConfig{
Database:db,
Precision:   "ms",
-   RetentionPolicy: rp,
+   RetentionPolicy: "monthly",
})
 
queryString := fmt.Sprintf("select time, cdn, hostname, type, value 
from \"%s\".\"%s\"", rp, statName)
@@ -251,10 +246,16 @@ func syncCacheStat(sourceClient influx.Client, 
targetClient influx.Client, statN
 func syncDeliveryServiceStat(sourceClient influx.Client, targetClient 
influx.Client, statName string, days int) {
 
db := deliveryService
+   rp := "monthly"
+
+   if strings.Contains(statName, "1day") {
+   rp = "indefinite"
+   }
+
bps, _ := influx.NewBatchPoints(influx.BatchPointsConfig{
Database:db,
Precision:   "ms",
-   RetentionPolicy: "monthly",
+   RetentionPolicy: rp,
})
 
queryString := fmt.Sprintf("select time, cachegroup, cdn, 
deliveryservice, value from \"monthly\".\"%s\"", statName)



[4/4] incubator-trafficcontrol git commit: This closes #281

2017-02-23 Thread neuman
This closes #281


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/386b6f47
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/386b6f47
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/386b6f47

Branch: refs/heads/master
Commit: 386b6f47da1deaed114461dce5ff2687f1e68c5e
Parents: 5b9d359
Author: David Neuman 
Authored: Thu Feb 23 08:54:14 2017 -0700
Committer: David Neuman 
Committed: Thu Feb 23 08:54:14 2017 -0700

--

--




[3/4] incubator-trafficcontrol git commit: Modifications to daily and deliveryservice migration - daily_stats: Put data in indefinite instead of DEFAULT - deliveryservice_stats: Fix copying indefinite

2017-02-23 Thread neuman
Modifications to daily and deliveryservice migration
- daily_stats: Put data in indefinite instead of DEFAULT
- deliveryservice_stats: Fix copying indefinite measurements


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/b54a3470
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/b54a3470
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/b54a3470

Branch: refs/heads/master
Commit: b54a347041365521f2d7e831e57da42548cd7f85
Parents: 0835dc7
Author: Steve Malenfant 
Authored: Mon Feb 13 16:04:21 2017 -0500
Committer: David Neuman 
Committed: Thu Feb 23 08:54:00 2017 -0700

--
 .../influxdb_tools/sync/sync_ts_databases.go  | 18 ++
 1 file changed, 14 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/b54a3470/traffic_stats/influxdb_tools/sync/sync_ts_databases.go
--
diff --git a/traffic_stats/influxdb_tools/sync/sync_ts_databases.go 
b/traffic_stats/influxdb_tools/sync/sync_ts_databases.go
index a09539b..6d00f8a 100644
--- a/traffic_stats/influxdb_tools/sync/sync_ts_databases.go
+++ b/traffic_stats/influxdb_tools/sync/sync_ts_databases.go
@@ -23,6 +23,7 @@ import (
"encoding/json"
"flag"
"fmt"
+   "strings"
"time"
 
"github.com/apache/incubator-trafficcontrol/traffic_stats/influxdb"
@@ -176,16 +177,24 @@ func syncDailyDb(ch chan string, sourceClient 
influx.Client, targetClient influx
 func syncCacheStat(sourceClient influx.Client, targetClient influx.Client, 
statName string, days int) {
//get records from source DB
db := cache
+   rp := "monthly"
+
+   if strings.Contains(statName, "1day") {
+   rp = "indefinite"
+   }
+
bps, _ := influx.NewBatchPoints(influx.BatchPointsConfig{
Database:db,
Precision:   "ms",
-   RetentionPolicy: "monthly",
+   RetentionPolicy: rp,
})
 
-   queryString := fmt.Sprintf("select time, cdn, hostname, type, value 
from \"monthly\".\"%s\"", statName)
+   queryString := fmt.Sprintf("select time, cdn, hostname, type, value 
from \"%s\".\"%s\"", rp, statName)
+
if days > 0 {
queryString = fmt.Sprintf("%s where time > now() - %dd", 
queryString, days)
}
+
fmt.Println("queryString ", queryString)
res, err := queryDB(sourceClient, queryString, db)
if err != nil {
@@ -305,8 +314,9 @@ func syncDailyStat(sourceClient influx.Client, targetClient 
influx.Client, statN
 
db := daily
bps, _ := influx.NewBatchPoints(influx.BatchPointsConfig{
-   Database:  db,
-   Precision: "s",
+   Database:db,
+   Precision:   "s",
+   RetentionPolicy: "indefinite",
})
//get records from source DB
queryString := fmt.Sprintf("select time, cdn, deliveryservice, value 
from \"%s\"", statName)



[1/4] incubator-trafficcontrol git commit: Fixing setting up the Query String

2017-02-23 Thread neuman
Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master 0835dc7e0 -> 386b6f47d


Fixing setting up the Query String


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/5b9d359a
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/5b9d359a
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/5b9d359a

Branch: refs/heads/master
Commit: 5b9d359aaa5e45f91014ceaf9fcf1d82f3d1de4a
Parents: 815fc8a
Author: Steve Malenfant 
Authored: Wed Feb 15 14:46:49 2017 -0500
Committer: David Neuman 
Committed: Thu Feb 23 08:54:00 2017 -0700

--
 traffic_stats/influxdb_tools/sync/sync_ts_databases.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/5b9d359a/traffic_stats/influxdb_tools/sync/sync_ts_databases.go
--
diff --git a/traffic_stats/influxdb_tools/sync/sync_ts_databases.go 
b/traffic_stats/influxdb_tools/sync/sync_ts_databases.go
index 3e3692c..b38c103 100644
--- a/traffic_stats/influxdb_tools/sync/sync_ts_databases.go
+++ b/traffic_stats/influxdb_tools/sync/sync_ts_databases.go
@@ -184,7 +184,7 @@ func syncCacheStat(sourceClient influx.Client, targetClient 
influx.Client, statN
RetentionPolicy: "monthly",
})
 
-   queryString := fmt.Sprintf("select time, cdn, hostname, type, value 
from \"%s\".\"%s\"", rp, statName)
+   queryString := fmt.Sprintf("select time, cdn, hostname, type, value 
from \"%s\".\"%s\"", "monthly", statName)
 
if days > 0 {
queryString = fmt.Sprintf("%s where time > now() - %dd", 
queryString, days)
@@ -258,7 +258,7 @@ func syncDeliveryServiceStat(sourceClient influx.Client, 
targetClient influx.Cli
RetentionPolicy: rp,
})
 
-   queryString := fmt.Sprintf("select time, cachegroup, cdn, 
deliveryservice, value from \"monthly\".\"%s\"", statName)
+   queryString := fmt.Sprintf("select time, cachegroup, cdn, 
deliveryservice, value from \"%s\".\"%s\"", rp, statName)
if days > 0 {
queryString = fmt.Sprintf("%s where time > now() - %dd", 
queryString, days)
}



incubator-trafficcontrol git commit: This closes #268

2017-02-23 Thread smalenfant
Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master 525fbec0d -> 0835dc7e0


This closes #268


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/0835dc7e
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/0835dc7e
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/0835dc7e

Branch: refs/heads/master
Commit: 0835dc7e0c2d29c475cccabe002e3fbf6bc5f1d3
Parents: 525fbec
Author: smalenfa 
Authored: Thu Feb 23 07:54:04 2017 -0500
Committer: smalenfa 
Committed: Thu Feb 23 07:54:04 2017 -0500

--

--




[1/2] incubator-trafficcontrol git commit: fixed an issue where duplicated keys were being created resulting in some data not being synced

2017-02-23 Thread smalenfant
Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master a448960a3 -> 525fbec0d


fixed an issue where duplicated keys were being created resulting in some data 
not being synced


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/96502735
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/96502735
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/96502735

Branch: refs/heads/master
Commit: 9650273584ac783657e6869593eba827c67f47b7
Parents: a448960
Author: David Neuman 
Authored: Thu Feb 9 10:10:20 2017 -0700
Committer: smalenfa 
Committed: Thu Feb 23 07:47:55 2017 -0500

--
 .../influxdb_tools/sync/sync_ts_databases.go| 22 ++--
 1 file changed, 16 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/96502735/traffic_stats/influxdb_tools/sync/sync_ts_databases.go
--
diff --git a/traffic_stats/influxdb_tools/sync/sync_ts_databases.go 
b/traffic_stats/influxdb_tools/sync/sync_ts_databases.go
index 122ff86..a09539b 100644
--- a/traffic_stats/influxdb_tools/sync/sync_ts_databases.go
+++ b/traffic_stats/influxdb_tools/sync/sync_ts_databases.go
@@ -127,8 +127,8 @@ func syncCsDb(ch chan string, sourceClient influx.Client, 
targetClient influx.Cl
//these take a long time so do them last
"bandwidth.1min",
"connections.1min",
-   //
}
+
for _, statName := range stats {
fmt.Printf("Syncing %s database with %s \n", db, statName)
syncCacheStat(sourceClient, targetClient, statName, days)
@@ -205,7 +205,8 @@ func syncCacheStat(sourceClient influx.Client, targetClient 
influx.Client, statN
for ssKey := range sourceStats {
ts := targetStats[ssKey]
ss := sourceStats[ssKey]
-   if ts.value > ss.value {
+
+   if ts.value >= ss.value {
//fmt.Printf("target value %v is at least equal to 
source value %v\n", ts.value, ss.value)
continue //target value is bigger so leave it
}
@@ -232,7 +233,10 @@ func syncCacheStat(sourceClient influx.Client, 
targetClient influx.Client, statN
}
bps.AddPoint(pt)
}
-   targetClient.Write(bps)
+   err = targetClient.Write(bps)
+   if err != nil {
+   fmt.Println("Error writing stat - ", err)
+   }
 }
 
 func syncDeliveryServiceStat(sourceClient influx.Client, targetClient 
influx.Client, statName string, days int) {
@@ -291,7 +295,10 @@ func syncDeliveryServiceStat(sourceClient influx.Client, 
targetClient influx.Cli
}
bps.AddPoint(pt)
}
-   targetClient.Write(bps)
+   err = targetClient.Write(bps)
+   if err != nil {
+   fmt.Println("Error writing stat - ", err)
+   }
 }
 
 func syncDailyStat(sourceClient influx.Client, targetClient influx.Client, 
statName string, days int) {
@@ -347,7 +354,10 @@ func syncDailyStat(sourceClient influx.Client, 
targetClient influx.Client, statN
}
bps.AddPoint(pt)
}
-   targetClient.Write(bps)
+   err = targetClient.Write(bps)
+   if err != nil {
+   fmt.Println("Error writing stat - ", err)
+   }
 }
 
 func getCacheStats(res []influx.Result) map[string]cacheStats {
@@ -374,7 +384,7 @@ func getCacheStats(res []influx.Result) 
map[string]cacheStats {
fmt.Printf("Couldn't parse value from 
record %v\n", record)
continue
}
-   key := data.t + data.cdn + data.hostname
+   key := data.t + data.cdn + data.cacheType + 
data.hostname
response[key] = *data
}
}



[2/2] incubator-trafficcontrol git commit: This closes 268

2017-02-23 Thread smalenfant
This closes 268


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/525fbec0
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/525fbec0
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/525fbec0

Branch: refs/heads/master
Commit: 525fbec0dd6548eb19a06e3b6677b4347fe47016
Parents: 9650273
Author: smalenfa 
Authored: Thu Feb 23 07:48:36 2017 -0500
Committer: smalenfa 
Committed: Thu Feb 23 07:48:36 2017 -0500

--

--