Migrator seems to no longer work.
fake-name opened this issue · comments
C W commented
durr@graphical:~/whisper-migrator$ go run migration.go -wspinfo -wspPath=/tank/carbon/whisper/
# command-line-arguments
./migration.go:515:38: cannot use tsmPoint.key (type string) as type []byte in argument to tsmWriter.Write
I'm not familiar with go at all, so I can't really help fix.
C W commented
Ok, seems like it's at least partially fixed by:
durr@graphical:~/whisper-migrator$ git diff
diff --git a/migration.go b/migration.go
old mode 100644
new mode 100755
index 6b70a9c..e5c0104
--- a/migration.go
+++ b/migration.go
@@ -60,7 +60,7 @@ type MigrationData struct {
}
type TsmPoint struct {
- key string
+ key []byte
values []tsm1.Value
}
@@ -113,6 +113,7 @@ func main() {
return
}
if err := migrationData.GetWhisperInfo(); err != nil {
+ log.Fatal(err)
fmt.Println("Error in Getting Whisper File information")
}
return
@@ -550,7 +551,7 @@ func (migrationData *MigrationData) WriteTSMPoints(filename string,
}
//Create TSM Key from measurement, tags and field
-func CreateTSMKey(mtf *MTF) string {
+func CreateTSMKey(mtf *MTF) []byte {
key := mtf.Measurement
if len(mtf.Tags) > 0 {
for _, tagKeyValue := range mtf.Tags {
@@ -558,7 +559,7 @@ func CreateTSMKey(mtf *MTF) string {
key = key + tagKeyValue.Tagkey + "=" + tagKeyValue.Tagvalue
}
}
- return key + "#!~#" + mtf.Field
+ return []byte(key + "#!~#" + mtf.Field)
}
// Get measurement, tags and field by matching the whisper filename with a