From bdd2b021c36df13ed5c3a738bf281dc669d3bca6 Mon Sep 17 00:00:00 2001 From: Nan Deng Date: Wed, 16 Jul 2014 18:00:18 -0700 Subject: [PATCH] remove support for influxdb until influxdb/influxdb#756 get fixed --- storage/influxdb/influxdb.go | 4 +++- storage/influxdb/influxdb_test.go | 4 +++- storagedriver.go | 39 +++++++++++++++---------------- 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/storage/influxdb/influxdb.go b/storage/influxdb/influxdb.go index 99cb92c7..73ad78b0 100644 --- a/storage/influxdb/influxdb.go +++ b/storage/influxdb/influxdb.go @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// +build ignore + package influxdb import ( @@ -22,7 +24,7 @@ import ( "github.com/google/cadvisor/info" "github.com/google/cadvisor/storage" - "github.com/influxdb/influxdb-go" + "github.com/influxdb/influxdb/client" ) type influxdbStorage struct { diff --git a/storage/influxdb/influxdb_test.go b/storage/influxdb/influxdb_test.go index c5770d35..6dd675a6 100644 --- a/storage/influxdb/influxdb_test.go +++ b/storage/influxdb/influxdb_test.go @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// +build ignore + package influxdb import ( @@ -21,7 +23,7 @@ import ( "github.com/google/cadvisor/storage" "github.com/google/cadvisor/storage/test" - "github.com/influxdb/influxdb-go" + "github.com/influxdb/influxdb/client" ) func runStorageTest(f func(storage.StorageDriver, *testing.T), t *testing.T) { diff --git a/storagedriver.go b/storagedriver.go index 3de3f85d..e5136b2f 100644 --- a/storagedriver.go +++ b/storagedriver.go @@ -17,11 +17,8 @@ package main import ( "flag" "fmt" - "os" - "time" "github.com/google/cadvisor/storage" - "github.com/google/cadvisor/storage/influxdb" "github.com/google/cadvisor/storage/memory" ) @@ -43,24 +40,26 @@ func NewStorageDriver(driverName string) (storage.StorageDriver, error) { case "memory": storageDriver = memory.New(*argSampleSize, *argHistoryDuration) return storageDriver, nil - case "influxdb": - var hostname string - hostname, err = os.Hostname() - if err != nil { - return nil, err - } + /* + case "influxdb": + var hostname string + hostname, err = os.Hostname() + if err != nil { + return nil, err + } - storageDriver, err = influxdb.New( - hostname, - "cadvisorTable", - *argDbName, - *argDbUsername, - *argDbPassword, - *argDbHost, - *argDbIsSecure, - // TODO(monnand): One hour? Or user-defined? - 1*time.Hour, - ) + storageDriver, err = influxdb.New( + hostname, + "cadvisorTable", + *argDbName, + *argDbUsername, + *argDbPassword, + *argDbHost, + *argDbIsSecure, + // TODO(monnand): One hour? Or user-defined? + 1*time.Hour, + ) + */ default: err = fmt.Errorf("Unknown database driver: %v", *argDbDriver) }