diff --git a/binary_build/build.sh b/binary_build/build.sh index 87f2b489..072c2ef6 100755 --- a/binary_build/build.sh +++ b/binary_build/build.sh @@ -97,16 +97,16 @@ export CGO_LDFLAGS="-L$rocksdb_dir/lib -L/usr/local/lib -lrocksdb -lstdc++ -lm - juno_version_info="-X juno/pkg/version.BuildTime=$build_time -X juno/pkg/version.Revision=$code_revision -X juno/pkg/version.BuildId=$JUNO_BUILD_NUMBER" juno_executables="\ - juno/cmd/proxy \ - juno/cmd/storageserv \ - juno/cmd/storageserv/storage/db/dbcopy \ - juno/cmd/tools/junocli \ - juno/cmd/clustermgr \ - juno/cmd/dbscanserv \ - juno/cmd/dbscanserv/junoctl \ - juno/test/drv/junoload \ - juno/cmd/tools/junostats\ - juno/cmd/tools/junocfg\ + github.com/paypal/junodb/cmd/proxy \ + github.com/paypal/junodb/cmd/storageserv \ + github.com/paypal/junodb/cmd/storageserv/storage/db/dbcopy \ + github.com/paypal/junodb/cmd/tools/junocli \ + github.com/paypal/junodb/cmd/clustermgr \ + github.com/paypal/junodb/cmd/dbscanserv \ + github.com/paypal/junodb/cmd/dbscanserv/junoctl \ + github.com/paypal/junodb/test/drv/junoload \ + github.com/paypal/junodb/cmd/tools/junostats\ + github.com/paypal/junodb/cmd/tools/junocfg\ " # DO NOT include junoload in any package diff --git a/cmd/clustermgr/clusterctl/clusterctl.go b/cmd/clustermgr/clusterctl/clusterctl.go index d806cf62..7d2f17be 100644 --- a/cmd/clustermgr/clusterctl/clusterctl.go +++ b/cmd/clustermgr/clusterctl/clusterctl.go @@ -28,11 +28,11 @@ import ( "path/filepath" "strings" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/version" + "github.com/paypal/junodb/pkg/version" - "juno/cmd/clustermgr/cmd" + "github.com/paypal/junodb/cmd/clustermgr/cmd" ) // diff --git a/cmd/clustermgr/clustermgr.go b/cmd/clustermgr/clustermgr.go index 756f8f07..6ccba001 100644 --- a/cmd/clustermgr/clustermgr.go +++ b/cmd/clustermgr/clustermgr.go @@ -27,11 +27,11 @@ import ( "os" "path/filepath" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/version" + "github.com/paypal/junodb/pkg/version" - "juno/cmd/clustermgr/cmd" + "github.com/paypal/junodb/cmd/clustermgr/cmd" ) var ( diff --git a/cmd/clustermgr/cmd/cmd.go b/cmd/clustermgr/cmd/cmd.go index f9fce42f..f684f9fa 100644 --- a/cmd/clustermgr/cmd/cmd.go +++ b/cmd/clustermgr/cmd/cmd.go @@ -27,10 +27,10 @@ import ( "strings" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/cluster" - "juno/pkg/etcd" + "github.com/paypal/junodb/pkg/cluster" + "github.com/paypal/junodb/pkg/etcd" ) func GetStatus(configFile string) { diff --git a/cmd/clustermgr/cmd/config.go b/cmd/clustermgr/cmd/config.go index 8d67d49a..4089b994 100644 --- a/cmd/clustermgr/cmd/config.go +++ b/cmd/clustermgr/cmd/config.go @@ -26,10 +26,10 @@ import ( "github.com/BurntSushi/toml" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/cluster" - "juno/pkg/etcd" + "github.com/paypal/junodb/pkg/cluster" + "github.com/paypal/junodb/pkg/etcd" ) var ( diff --git a/cmd/dbscanserv/app/cmd.go b/cmd/dbscanserv/app/cmd.go index a642a978..59b3beeb 100644 --- a/cmd/dbscanserv/app/cmd.go +++ b/cmd/dbscanserv/app/cmd.go @@ -28,12 +28,12 @@ import ( "strings" "time" - "juno/third_party/forked/golang/glog" - "juno/third_party/forked/tecbot/gorocksdb" + "github.com/paypal/junodb/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/tecbot/gorocksdb" - "juno/cmd/dbscanserv/prime" - "juno/cmd/storageserv/compact" - "juno/cmd/storageserv/storage/db" + "github.com/paypal/junodb/cmd/dbscanserv/prime" + "github.com/paypal/junodb/cmd/storageserv/compact" + "github.com/paypal/junodb/cmd/storageserv/storage/db" ) type CmdLine struct { diff --git a/cmd/dbscanserv/app/collect.go b/cmd/dbscanserv/app/collect.go index 5d8a49d9..7cd2f358 100644 --- a/cmd/dbscanserv/app/collect.go +++ b/cmd/dbscanserv/app/collect.go @@ -25,10 +25,10 @@ import ( "sync/atomic" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/dbscanserv/prime" - "juno/pkg/logging" + "github.com/paypal/junodb/cmd/dbscanserv/prime" + "github.com/paypal/junodb/pkg/logging" ) type Collector struct { diff --git a/cmd/dbscanserv/app/init.go b/cmd/dbscanserv/app/init.go index d81a98c8..1feb7864 100644 --- a/cmd/dbscanserv/app/init.go +++ b/cmd/dbscanserv/app/init.go @@ -27,15 +27,15 @@ import ( "github.com/BurntSushi/toml" - "juno/third_party/forked/golang/glog" - - "juno/cmd/clustermgr/cmd" - "juno/cmd/dbscanserv/config" - "juno/cmd/dbscanserv/prime" - "juno/cmd/storageserv/storage/db" - "juno/pkg/cluster" - "juno/pkg/etcd" - "juno/pkg/sec" + "github.com/paypal/junodb/third_party/forked/golang/glog" + + "github.com/paypal/junodb/cmd/clustermgr/cmd" + "github.com/paypal/junodb/cmd/dbscanserv/config" + "github.com/paypal/junodb/cmd/dbscanserv/prime" + "github.com/paypal/junodb/cmd/storageserv/storage/db" + "github.com/paypal/junodb/pkg/cluster" + "github.com/paypal/junodb/pkg/etcd" + "github.com/paypal/junodb/pkg/sec" ) type CmdConfig cmd.Config diff --git a/cmd/dbscanserv/app/patch.go b/cmd/dbscanserv/app/patch.go index 70bf2e93..d1f8acbe 100644 --- a/cmd/dbscanserv/app/patch.go +++ b/cmd/dbscanserv/app/patch.go @@ -27,14 +27,14 @@ import ( "sync" "time" - "juno/third_party/forked/golang/glog" - "juno/third_party/forked/tecbot/gorocksdb" - - "juno/cmd/dbscanserv/config" - "juno/cmd/dbscanserv/prime" - "juno/cmd/storageserv/storage/db" - "juno/pkg/proto" - "juno/pkg/util" + "github.com/paypal/junodb/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/tecbot/gorocksdb" + + "github.com/paypal/junodb/cmd/dbscanserv/config" + "github.com/paypal/junodb/cmd/dbscanserv/prime" + "github.com/paypal/junodb/cmd/storageserv/storage/db" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/util" ) type CmdUpdatePatch struct { diff --git a/cmd/dbscanserv/app/remote.go b/cmd/dbscanserv/app/remote.go index 46d4ca4d..b6aa6f8f 100644 --- a/cmd/dbscanserv/app/remote.go +++ b/cmd/dbscanserv/app/remote.go @@ -30,11 +30,11 @@ import ( "sync/atomic" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/dbscanserv/config" - "juno/cmd/dbscanserv/prime" - "juno/pkg/net/netutil" + "github.com/paypal/junodb/cmd/dbscanserv/config" + "github.com/paypal/junodb/cmd/dbscanserv/prime" + "github.com/paypal/junodb/pkg/net/netutil" ) type Remote int diff --git a/cmd/dbscanserv/app/rpcclient.go b/cmd/dbscanserv/app/rpcclient.go index e468557e..b02449fd 100644 --- a/cmd/dbscanserv/app/rpcclient.go +++ b/cmd/dbscanserv/app/rpcclient.go @@ -27,10 +27,10 @@ import ( "strings" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/dbscanserv/config" - "juno/cmd/dbscanserv/prime" + "github.com/paypal/junodb/cmd/dbscanserv/config" + "github.com/paypal/junodb/cmd/dbscanserv/prime" ) type RpcClient struct { diff --git a/cmd/dbscanserv/app/scan.go b/cmd/dbscanserv/app/scan.go index 331a63d4..0321514f 100644 --- a/cmd/dbscanserv/app/scan.go +++ b/cmd/dbscanserv/app/scan.go @@ -24,11 +24,11 @@ import ( "sync/atomic" "time" - "juno/third_party/forked/golang/glog" - "juno/third_party/forked/tecbot/gorocksdb" + "github.com/paypal/junodb/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/tecbot/gorocksdb" - "juno/cmd/dbscanserv/prime" - "juno/cmd/storageserv/storage/db" + "github.com/paypal/junodb/cmd/dbscanserv/prime" + "github.com/paypal/junodb/cmd/storageserv/storage/db" ) // Map from zoneid, shardid to Scanner diff --git a/cmd/dbscanserv/junoctl/junoctl.go b/cmd/dbscanserv/junoctl/junoctl.go index c03045c3..2d6894fe 100644 --- a/cmd/dbscanserv/junoctl/junoctl.go +++ b/cmd/dbscanserv/junoctl/junoctl.go @@ -25,9 +25,9 @@ import ( "os" "path/filepath" - "juno/cmd/dbscanserv/app" - "juno/pkg/version" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/cmd/dbscanserv/app" + "github.com/paypal/junodb/pkg/version" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) func main() { diff --git a/cmd/dbscanserv/main.go b/cmd/dbscanserv/main.go index de9fe60a..1a8461ff 100644 --- a/cmd/dbscanserv/main.go +++ b/cmd/dbscanserv/main.go @@ -27,11 +27,11 @@ import ( "strconv" "strings" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/dbscanserv/app" - "juno/cmd/dbscanserv/prime" - "juno/pkg/version" + "github.com/paypal/junodb/cmd/dbscanserv/app" + "github.com/paypal/junodb/cmd/dbscanserv/prime" + "github.com/paypal/junodb/pkg/version" ) func parseKeyRange(keyRange string, cmd string) (start int, stop int, skip int) { diff --git a/cmd/dbscanserv/patch/relay.go b/cmd/dbscanserv/patch/relay.go index a3014f34..8c73a2ab 100644 --- a/cmd/dbscanserv/patch/relay.go +++ b/cmd/dbscanserv/patch/relay.go @@ -22,12 +22,12 @@ package patch import ( "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/dbscanserv/app" - "juno/cmd/dbscanserv/config" - "juno/cmd/storageserv/storage/db" - "juno/pkg/proto" + "github.com/paypal/junodb/cmd/dbscanserv/app" + "github.com/paypal/junodb/cmd/dbscanserv/config" + "github.com/paypal/junodb/cmd/storageserv/storage/db" + "github.com/paypal/junodb/pkg/proto" ) // Called by storageserv. diff --git a/cmd/dbscanserv/prime/db.go b/cmd/dbscanserv/prime/db.go index 5e240a5f..42719e01 100644 --- a/cmd/dbscanserv/prime/db.go +++ b/cmd/dbscanserv/prime/db.go @@ -26,10 +26,10 @@ import ( "sync/atomic" "time" - "juno/third_party/forked/golang/glog" - "juno/third_party/forked/tecbot/gorocksdb" + "github.com/paypal/junodb/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/tecbot/gorocksdb" - "juno/cmd/storageserv/storage/db" + "github.com/paypal/junodb/cmd/storageserv/storage/db" ) // Map from zoneid, nodeid to db handle diff --git a/cmd/dbscanserv/prime/log.go b/cmd/dbscanserv/prime/log.go index 6cf9312c..efb1de63 100644 --- a/cmd/dbscanserv/prime/log.go +++ b/cmd/dbscanserv/prime/log.go @@ -23,7 +23,7 @@ import ( "fmt" "os" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) var ( diff --git a/cmd/dbscanserv/prime/meta.go b/cmd/dbscanserv/prime/meta.go index b1036384..61d752b8 100644 --- a/cmd/dbscanserv/prime/meta.go +++ b/cmd/dbscanserv/prime/meta.go @@ -28,9 +28,9 @@ import ( "sync/atomic" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/storageserv/storage/db" + "github.com/paypal/junodb/cmd/storageserv/storage/db" ) type Meta struct { diff --git a/cmd/dbscanserv/prime/opdata.go b/cmd/dbscanserv/prime/opdata.go index 58e198b8..20176e6e 100644 --- a/cmd/dbscanserv/prime/opdata.go +++ b/cmd/dbscanserv/prime/opdata.go @@ -26,10 +26,10 @@ import ( "sync/atomic" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/storageserv/storage/db" - "juno/pkg/proto" + "github.com/paypal/junodb/cmd/storageserv/storage/db" + "github.com/paypal/junodb/pkg/proto" ) type OpRecord struct { diff --git a/cmd/dbscanserv/prime/replicate.go b/cmd/dbscanserv/prime/replicate.go index abde2776..2a4d392c 100644 --- a/cmd/dbscanserv/prime/replicate.go +++ b/cmd/dbscanserv/prime/replicate.go @@ -24,12 +24,12 @@ import ( "runtime" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/internal/cli" - "juno/pkg/io" - "juno/pkg/proto" - "juno/pkg/sec" + "github.com/paypal/junodb/internal/cli" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/sec" ) var ( diff --git a/cmd/dbscanserv/prime/result.go b/cmd/dbscanserv/prime/result.go index d68b9251..9e589903 100644 --- a/cmd/dbscanserv/prime/result.go +++ b/cmd/dbscanserv/prime/result.go @@ -23,10 +23,10 @@ import ( "strings" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/client" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/pkg/util" ) type KeyList struct { diff --git a/cmd/proxy/app/proxy.go b/cmd/proxy/app/proxy.go index bfc55518..6855cf23 100644 --- a/cmd/proxy/app/proxy.go +++ b/cmd/proxy/app/proxy.go @@ -30,13 +30,13 @@ import ( "os/exec" "path/filepath" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/proxy/config" - "juno/pkg/cmd" - "juno/pkg/initmgr" - "juno/pkg/sec" - "juno/pkg/version" + "github.com/paypal/junodb/cmd/proxy/config" + "github.com/paypal/junodb/pkg/cmd" + "github.com/paypal/junodb/pkg/initmgr" + "github.com/paypal/junodb/pkg/sec" + "github.com/paypal/junodb/pkg/version" ) func Main() { diff --git a/cmd/proxy/app/proxymgr.go b/cmd/proxy/app/proxymgr.go index 19cc1433..f1692190 100644 --- a/cmd/proxy/app/proxymgr.go +++ b/cmd/proxy/app/proxymgr.go @@ -28,17 +28,17 @@ import ( "strings" "syscall" - "juno/third_party/forked/golang/glog" - - "juno/cmd/proxy/config" - "juno/cmd/proxy/stats" - "juno/pkg/cmd" - "juno/pkg/initmgr" - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/sec" - "juno/pkg/service" - "juno/pkg/util" + "github.com/paypal/junodb/third_party/forked/golang/glog" + + "github.com/paypal/junodb/cmd/proxy/config" + "github.com/paypal/junodb/cmd/proxy/stats" + "github.com/paypal/junodb/pkg/cmd" + "github.com/paypal/junodb/pkg/initmgr" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/sec" + "github.com/paypal/junodb/pkg/service" + "github.com/paypal/junodb/pkg/util" ) const ( diff --git a/cmd/proxy/app/proxymonwkr.go b/cmd/proxy/app/proxymonwkr.go index 28ed4e7e..73ef97e7 100644 --- a/cmd/proxy/app/proxymonwkr.go +++ b/cmd/proxy/app/proxymonwkr.go @@ -24,14 +24,14 @@ import ( "strings" "sync" - "juno/third_party/forked/golang/glog" - - "juno/cmd/proxy/config" - "juno/cmd/proxy/stats" - "juno/pkg/initmgr" - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/logging/otel" + "github.com/paypal/junodb/third_party/forked/golang/glog" + + "github.com/paypal/junodb/cmd/proxy/config" + "github.com/paypal/junodb/cmd/proxy/stats" + "github.com/paypal/junodb/pkg/initmgr" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/logging/otel" ) type ( diff --git a/cmd/proxy/app/proxywkr.go b/cmd/proxy/app/proxywkr.go index 56107f29..b2f8d92b 100644 --- a/cmd/proxy/app/proxywkr.go +++ b/cmd/proxy/app/proxywkr.go @@ -28,24 +28,24 @@ import ( "strconv" "time" - "juno/third_party/forked/golang/glog" - - "juno/cmd/proxy/config" - "juno/cmd/proxy/handler" - "juno/cmd/proxy/replication" - "juno/cmd/proxy/stats" - "juno/cmd/proxy/stats/shmstats" - "juno/cmd/proxy/watcher" - "juno/pkg/cluster" - "juno/pkg/etcd" - "juno/pkg/initmgr" - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/logging/otel" - "juno/pkg/sec" - "juno/pkg/service" - "juno/pkg/udf" - "juno/pkg/util" + "github.com/paypal/junodb/third_party/forked/golang/glog" + + "github.com/paypal/junodb/cmd/proxy/config" + "github.com/paypal/junodb/cmd/proxy/handler" + "github.com/paypal/junodb/cmd/proxy/replication" + "github.com/paypal/junodb/cmd/proxy/stats" + "github.com/paypal/junodb/cmd/proxy/stats/shmstats" + "github.com/paypal/junodb/cmd/proxy/watcher" + "github.com/paypal/junodb/pkg/cluster" + "github.com/paypal/junodb/pkg/etcd" + "github.com/paypal/junodb/pkg/initmgr" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/logging/otel" + "github.com/paypal/junodb/pkg/sec" + "github.com/paypal/junodb/pkg/service" + "github.com/paypal/junodb/pkg/udf" + "github.com/paypal/junodb/pkg/util" ) type ( diff --git a/cmd/proxy/config/config.go b/cmd/proxy/config/config.go index 8c399ad6..b00c5994 100644 --- a/cmd/proxy/config/config.go +++ b/cmd/proxy/config/config.go @@ -26,21 +26,21 @@ import ( "path/filepath" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" "github.com/BurntSushi/toml" - repconfig "juno/cmd/proxy/replication/config" - "juno/pkg/cluster" - "juno/pkg/etcd" - "juno/pkg/initmgr" - "juno/pkg/io" - cal "juno/pkg/logging/cal/config" - otel "juno/pkg/logging/otel/config" - "juno/pkg/sec" - "juno/pkg/service" - "juno/pkg/util" - "juno/pkg/version" + repconfig "github.com/paypal/junodb/cmd/proxy/replication/config" + "github.com/paypal/junodb/pkg/cluster" + "github.com/paypal/junodb/pkg/etcd" + "github.com/paypal/junodb/pkg/initmgr" + "github.com/paypal/junodb/pkg/io" + cal "github.com/paypal/junodb/pkg/logging/cal/config" + otel "github.com/paypal/junodb/pkg/logging/otel/config" + "github.com/paypal/junodb/pkg/sec" + "github.com/paypal/junodb/pkg/service" + "github.com/paypal/junodb/pkg/util" + "github.com/paypal/junodb/pkg/version" ) var ( @@ -211,7 +211,7 @@ func (c *Config) IsEncryptionEnabled() bool { return c.ReplicationEncryptionEnabled || c.PayloadEncryptionEnabled } -///TODO find a better name +// /TODO find a better name func (c *Config) GetSecFlag() (f sec.Flag) { if c.IsTLSEnabled(true) { f |= sec.KFlagServerTlsEnabled diff --git a/cmd/proxy/config/limitscfg.go b/cmd/proxy/config/limitscfg.go index 9d475c02..51d23fdd 100644 --- a/cmd/proxy/config/limitscfg.go +++ b/cmd/proxy/config/limitscfg.go @@ -24,9 +24,9 @@ import ( "math" "sync" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/cfg" + "github.com/paypal/junodb/pkg/cfg" ) var ( diff --git a/cmd/proxy/handler/requestHandler.go b/cmd/proxy/handler/requestHandler.go index 6d55adad..85d67abc 100644 --- a/cmd/proxy/handler/requestHandler.go +++ b/cmd/proxy/handler/requestHandler.go @@ -22,15 +22,15 @@ package handler import ( "os" - "juno/third_party/forked/golang/glog" - - "juno/cmd/proxy/config" - "juno/cmd/proxy/proc" - "juno/cmd/proxy/stats" - "juno/pkg/io" - "juno/pkg/net/netutil" - "juno/pkg/proto" - "juno/pkg/service" + "github.com/paypal/junodb/third_party/forked/golang/glog" + + "github.com/paypal/junodb/cmd/proxy/config" + "github.com/paypal/junodb/cmd/proxy/proc" + "github.com/paypal/junodb/cmd/proxy/stats" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/net/netutil" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/service" ) var _ io.IRequestHandler = (*RequestHandler)(nil) diff --git a/cmd/proxy/main.go b/cmd/proxy/main.go index 5e18bcd4..540b7e91 100644 --- a/cmd/proxy/main.go +++ b/cmd/proxy/main.go @@ -19,7 +19,7 @@ package main -import "juno/cmd/proxy/app" +import "github.com/paypal/junodb/cmd/proxy/app" func main() { app.Main() diff --git a/cmd/proxy/proc/base.go b/cmd/proxy/proc/base.go index e5e18c3f..48b65f89 100644 --- a/cmd/proxy/proc/base.go +++ b/cmd/proxy/proc/base.go @@ -28,22 +28,22 @@ import ( "strings" "time" - "juno/third_party/forked/golang/glog" - - "juno/cmd/proxy/config" - "juno/cmd/proxy/replication" - proxystats "juno/cmd/proxy/stats" - "juno/pkg/cluster" - "juno/pkg/debug" - "juno/pkg/errors" - "juno/pkg/io" - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/logging/otel" - "juno/pkg/proto" - "juno/pkg/shard" - "juno/pkg/stats" - "juno/pkg/util" + "github.com/paypal/junodb/third_party/forked/golang/glog" + + "github.com/paypal/junodb/cmd/proxy/config" + "github.com/paypal/junodb/cmd/proxy/replication" + proxystats "github.com/paypal/junodb/cmd/proxy/stats" + "github.com/paypal/junodb/pkg/cluster" + "github.com/paypal/junodb/pkg/debug" + "github.com/paypal/junodb/pkg/errors" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/logging/otel" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/shard" + "github.com/paypal/junodb/pkg/stats" + "github.com/paypal/junodb/pkg/util" ) const ( diff --git a/cmd/proxy/proc/create.go b/cmd/proxy/proc/create.go index 7268698f..04904990 100644 --- a/cmd/proxy/proc/create.go +++ b/cmd/proxy/proc/create.go @@ -23,11 +23,11 @@ import ( "fmt" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/logging/cal" - "juno/pkg/logging/otel" - "juno/pkg/proto" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/logging/otel" + "github.com/paypal/junodb/pkg/proto" ) var _ ITwoPhaseProcessor = (*CreateProcessor)(nil) diff --git a/cmd/proxy/proc/destroy.go b/cmd/proxy/proc/destroy.go index e5c17c57..2c2fe5dc 100644 --- a/cmd/proxy/proc/destroy.go +++ b/cmd/proxy/proc/destroy.go @@ -20,7 +20,7 @@ package proc import ( - "juno/pkg/proto" + "github.com/paypal/junodb/pkg/proto" ) var _ IOnePhaseProcessor = (*DestroyProcessor)(nil) diff --git a/cmd/proxy/proc/destroy2.go b/cmd/proxy/proc/destroy2.go index 2cd78632..82ab5129 100644 --- a/cmd/proxy/proc/destroy2.go +++ b/cmd/proxy/proc/destroy2.go @@ -20,9 +20,9 @@ package proc import ( - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/proto" + "github.com/paypal/junodb/pkg/proto" ) // SUCCESS: NoError, AlreadyFulfilled, NoKey diff --git a/cmd/proxy/proc/get.go b/cmd/proxy/proc/get.go index 5cfdf4ba..561c6ec8 100644 --- a/cmd/proxy/proc/get.go +++ b/cmd/proxy/proc/get.go @@ -20,10 +20,10 @@ package proc import ( - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/logging" - "juno/pkg/proto" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/proto" ) // SUCCESS: NoError, NoKey, MarkedDelete diff --git a/cmd/proxy/proc/inbreqctx.go b/cmd/proxy/proc/inbreqctx.go index 3314366d..f4b614c1 100644 --- a/cmd/proxy/proc/inbreqctx.go +++ b/cmd/proxy/proc/inbreqctx.go @@ -24,15 +24,15 @@ import ( goio "io" "time" - "juno/third_party/forked/golang/glog" - - "juno/cmd/proxy/config" - "juno/cmd/proxy/replication" - "juno/pkg/io" - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/logging/otel" - "juno/pkg/proto" + "github.com/paypal/junodb/third_party/forked/golang/glog" + + "github.com/paypal/junodb/cmd/proxy/config" + "github.com/paypal/junodb/cmd/proxy/replication" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/logging/otel" + "github.com/paypal/junodb/pkg/proto" ) type IInbRequestContext interface { @@ -47,7 +47,7 @@ type IInbRequestContext interface { ReplyStatus(st proto.OpStatus) } -//InboundRequestContext Proxy Inbound request context +// InboundRequestContext Proxy Inbound request context type InboundRequestContext struct { io.InboundRequestContext proto.OperationalMessage diff --git a/cmd/proxy/proc/pconfig.go b/cmd/proxy/proc/pconfig.go index 93beff00..c9a2c269 100644 --- a/cmd/proxy/proc/pconfig.go +++ b/cmd/proxy/proc/pconfig.go @@ -22,12 +22,12 @@ package proc import ( "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/proxy/config" - "juno/pkg/cfg" - "juno/pkg/io" - "juno/pkg/proto" + "github.com/paypal/junodb/cmd/proxy/config" + "github.com/paypal/junodb/pkg/cfg" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/proto" ) var ( diff --git a/cmd/proxy/proc/proc_logging.go b/cmd/proxy/proc/proc_logging.go index b1eab84a..b332433a 100644 --- a/cmd/proxy/proc/proc_logging.go +++ b/cmd/proxy/proc/proc_logging.go @@ -20,11 +20,11 @@ package proc import ( - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/proto" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/proto" ) var ( diff --git a/cmd/proxy/proc/processor.go b/cmd/proxy/proc/processor.go index 64eafb42..ba29072c 100644 --- a/cmd/proxy/proc/processor.go +++ b/cmd/proxy/proc/processor.go @@ -22,12 +22,12 @@ package proc import ( "fmt" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/logging/otel" - "juno/pkg/proto" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/logging/otel" + "github.com/paypal/junodb/pkg/proto" ) type IOnePhaseProcessor interface { diff --git a/cmd/proxy/proc/reqProcessorPool.go b/cmd/proxy/proc/reqProcessorPool.go index b62ffec3..6e7b1238 100644 --- a/cmd/proxy/proc/reqProcessorPool.go +++ b/cmd/proxy/proc/reqProcessorPool.go @@ -20,9 +20,9 @@ package proc import ( - "juno/cmd/proxy/stats" - "juno/pkg/proto" - "juno/pkg/util" + "github.com/paypal/junodb/cmd/proxy/stats" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/util" ) type ReqProcessorPool struct { diff --git a/cmd/proxy/proc/set.go b/cmd/proxy/proc/set.go index c3c5fb8d..7f8e3e85 100644 --- a/cmd/proxy/proc/set.go +++ b/cmd/proxy/proc/set.go @@ -22,10 +22,10 @@ package proc import ( "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/logging/cal" - "juno/pkg/proto" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/proto" ) var _ ITwoPhaseProcessor = (*SetProcessor)(nil) diff --git a/cmd/proxy/proc/state.go b/cmd/proxy/proc/state.go index 62547cc7..ac8588ea 100644 --- a/cmd/proxy/proc/state.go +++ b/cmd/proxy/proc/state.go @@ -20,11 +20,11 @@ package proc import ( - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/debug" - "juno/pkg/errors" - "juno/pkg/proto" + "github.com/paypal/junodb/pkg/debug" + "github.com/paypal/junodb/pkg/errors" + "github.com/paypal/junodb/pkg/proto" ) type RequestAndStats struct { @@ -42,7 +42,7 @@ type RequestAndStats struct { funcIsSuccess func(proto.OpStatus) bool } -///TODO may just change to *SSRequestContext +// /TODO may just change to *SSRequestContext type ResponseWrapper struct { ssRequest *SSRequestContext } diff --git a/cmd/proxy/proc/udfget.go b/cmd/proxy/proc/udfget.go index 3d3c9108..91cfe219 100644 --- a/cmd/proxy/proc/udfget.go +++ b/cmd/proxy/proc/udfget.go @@ -20,9 +20,9 @@ package proc import ( - "juno/pkg/proto" - "juno/pkg/udf" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/udf" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) var _ IOnePhaseProcessor = (*UDFGetProcessor)(nil) diff --git a/cmd/proxy/proc/update.go b/cmd/proxy/proc/update.go index c38503c4..9f3d6d15 100644 --- a/cmd/proxy/proc/update.go +++ b/cmd/proxy/proc/update.go @@ -22,11 +22,11 @@ package proc import ( "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/proto" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/proto" ) var _ ITwoPhaseProcessor = (*UpdateProcessor)(nil) diff --git a/cmd/proxy/replication/config/repcfg.go b/cmd/proxy/replication/config/repcfg.go index 4278f208..93a00a74 100644 --- a/cmd/proxy/replication/config/repcfg.go +++ b/cmd/proxy/replication/config/repcfg.go @@ -24,8 +24,8 @@ import ( "strings" "time" - "juno/pkg/io" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/util" ) var ( diff --git a/cmd/proxy/replication/pingreqctx.go b/cmd/proxy/replication/pingreqctx.go index 0d715d62..c7abf39f 100644 --- a/cmd/proxy/replication/pingreqctx.go +++ b/cmd/proxy/replication/pingreqctx.go @@ -24,12 +24,12 @@ import ( goio "io" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/io" - "juno/pkg/proto" - "juno/pkg/proto/mayfly" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/proto/mayfly" + "github.com/paypal/junodb/pkg/util" ) type ( diff --git a/cmd/proxy/replication/replicaterequest.go b/cmd/proxy/replication/replicaterequest.go index e3bd8c85..bfc05e82 100644 --- a/cmd/proxy/replication/replicaterequest.go +++ b/cmd/proxy/replication/replicaterequest.go @@ -24,15 +24,15 @@ import ( goio "io" "time" - "juno/third_party/forked/golang/glog" - - "juno/pkg/io" - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/logging/otel" - "juno/pkg/proto" - "juno/pkg/proto/mayfly" - "juno/pkg/util" + "github.com/paypal/junodb/third_party/forked/golang/glog" + + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/logging/otel" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/proto/mayfly" + "github.com/paypal/junodb/pkg/util" ) var ( diff --git a/cmd/proxy/replication/replicator.go b/cmd/proxy/replication/replicator.go index 4abcd607..b0a36b80 100644 --- a/cmd/proxy/replication/replicator.go +++ b/cmd/proxy/replication/replicator.go @@ -28,16 +28,16 @@ import ( "sync" "time" - "juno/third_party/forked/golang/glog" - - repconfig "juno/cmd/proxy/replication/config" - proxystats "juno/cmd/proxy/stats" - "juno/cmd/proxy/stats/shmstats" - "juno/pkg/io" - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/proto" - "juno/pkg/util" + "github.com/paypal/junodb/third_party/forked/golang/glog" + + repconfig "github.com/paypal/junodb/cmd/proxy/replication/config" + proxystats "github.com/paypal/junodb/cmd/proxy/stats" + "github.com/paypal/junodb/cmd/proxy/stats/shmstats" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/util" ) var ( diff --git a/cmd/proxy/stats/clsConTmpl.go b/cmd/proxy/stats/clsConTmpl.go index ad3fc5c0..a41efdaa 100644 --- a/cmd/proxy/stats/clsConTmpl.go +++ b/cmd/proxy/stats/clsConTmpl.go @@ -24,7 +24,7 @@ import ( "fmt" "html/template" - "juno/pkg/version" + "github.com/paypal/junodb/pkg/version" ) var ( diff --git a/cmd/proxy/stats/htmlsect.go b/cmd/proxy/stats/htmlsect.go index d490aade..b9cfdc43 100644 --- a/cmd/proxy/stats/htmlsect.go +++ b/cmd/proxy/stats/htmlsect.go @@ -25,10 +25,10 @@ import ( "html/template" "time" - "juno/cmd/proxy/config" - "juno/cmd/proxy/stats/shmstats" - "juno/pkg/cluster" - "juno/pkg/stats" + "github.com/paypal/junodb/cmd/proxy/config" + "github.com/paypal/junodb/cmd/proxy/stats/shmstats" + "github.com/paypal/junodb/pkg/cluster" + "github.com/paypal/junodb/pkg/stats" ) type ( diff --git a/cmd/proxy/stats/httphandler.go b/cmd/proxy/stats/httphandler.go index 46637934..9db66df8 100644 --- a/cmd/proxy/stats/httphandler.go +++ b/cmd/proxy/stats/httphandler.go @@ -23,13 +23,13 @@ import ( "fmt" "net/http" - //"juno/third_party/forked/golang/glog" + //"github.com/paypal/junodb/third_party/forked/golang/glog" "github.com/BurntSushi/toml" - "juno/cmd/proxy/config" - "juno/cmd/proxy/stats/qry" - "juno/pkg/stats" - "juno/pkg/version" + "github.com/paypal/junodb/cmd/proxy/config" + "github.com/paypal/junodb/cmd/proxy/stats/qry" + "github.com/paypal/junodb/pkg/stats" + "github.com/paypal/junodb/pkg/version" ) var ( diff --git a/cmd/proxy/stats/monhandler.go b/cmd/proxy/stats/monhandler.go index aac7d7a8..cbf728eb 100644 --- a/cmd/proxy/stats/monhandler.go +++ b/cmd/proxy/stats/monhandler.go @@ -31,12 +31,12 @@ import ( "strings" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/proxy/config" - "juno/cmd/proxy/stats/shmstats" - "juno/pkg/stats" - "juno/pkg/version" + "github.com/paypal/junodb/cmd/proxy/config" + "github.com/paypal/junodb/cmd/proxy/stats/shmstats" + "github.com/paypal/junodb/pkg/stats" + "github.com/paypal/junodb/pkg/version" ) var () diff --git a/cmd/proxy/stats/qry/infoquery.go b/cmd/proxy/stats/qry/infoquery.go index 0b6e6fc9..a3f363af 100644 --- a/cmd/proxy/stats/qry/infoquery.go +++ b/cmd/proxy/stats/qry/infoquery.go @@ -27,7 +27,7 @@ import ( "strconv" "strings" - "juno/pkg/cluster" + "github.com/paypal/junodb/pkg/cluster" ) var ( diff --git a/cmd/proxy/stats/shmstats/shmstats.go b/cmd/proxy/stats/shmstats/shmstats.go index 46debf13..42969265 100644 --- a/cmd/proxy/stats/shmstats/shmstats.go +++ b/cmd/proxy/stats/shmstats/shmstats.go @@ -34,12 +34,12 @@ import ( "unsafe" // "github.com/BurntSushi/toml" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/proxy/config" - "juno/pkg/io" - "juno/pkg/stats" - "juno/pkg/util" + "github.com/paypal/junodb/cmd/proxy/config" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/stats" + "github.com/paypal/junodb/pkg/util" ) const ( @@ -944,7 +944,7 @@ func GetListenerStats() (stats []ListenerStats) { return } -//TODO make sure shmStats has been initialized.... +// TODO make sure shmStats has been initialized.... func GetCurrentWorkerStatsManager() *workerStatsManagerT { return shmStats.current } diff --git a/cmd/proxy/stats/shmstatswr.go b/cmd/proxy/stats/shmstatswr.go index e8b2aba8..b2ab3d90 100644 --- a/cmd/proxy/stats/shmstatswr.go +++ b/cmd/proxy/stats/shmstatswr.go @@ -25,9 +25,9 @@ import ( "time" "unsafe" - "juno/cmd/proxy/stats/shmstats" - "juno/pkg/logging/cal" - "juno/pkg/stats" + "github.com/paypal/junodb/cmd/proxy/stats/shmstats" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/stats" ) var ( diff --git a/cmd/proxy/stats/statelog.go b/cmd/proxy/stats/statelog.go index bf604907..d8a86328 100644 --- a/cmd/proxy/stats/statelog.go +++ b/cmd/proxy/stats/statelog.go @@ -31,13 +31,13 @@ import ( "syscall" "time" - // "juno/third_party/forked/golang/glog" + // "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/cluster" - "juno/pkg/io" - "juno/pkg/proto" - "juno/pkg/stats" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/cluster" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/stats" + "github.com/paypal/junodb/pkg/util" ) // counters diff --git a/cmd/proxy/stats/statsinit.go b/cmd/proxy/stats/statsinit.go index c06d369a..55d6da3c 100644 --- a/cmd/proxy/stats/statsinit.go +++ b/cmd/proxy/stats/statsinit.go @@ -22,9 +22,9 @@ package stats import ( "fmt" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/proxy/stats/shmstats" + "github.com/paypal/junodb/cmd/proxy/stats/shmstats" ) const ( @@ -39,9 +39,9 @@ type ( ) /* - Arguments - arg 0: Type stats.Type - arg 1: WorkerId int, if Type == KTypeWorker +Arguments +arg 0: Type stats.Type +arg 1: WorkerId int, if Type == KTypeWorker */ func Initialize(args ...interface{}) (err error) { var ( diff --git a/cmd/proxy/stats/statslogger.go b/cmd/proxy/stats/statslogger.go index 80cd7d0f..bff0eba5 100644 --- a/cmd/proxy/stats/statslogger.go +++ b/cmd/proxy/stats/statslogger.go @@ -29,12 +29,12 @@ import ( "path/filepath" "time" - "juno/cmd/proxy/config" - "juno/cmd/proxy/stats/shmstats" - "juno/pkg/io" - "juno/pkg/logging/cal" - "juno/pkg/logging/otel" - "juno/pkg/stats" + "github.com/paypal/junodb/cmd/proxy/config" + "github.com/paypal/junodb/cmd/proxy/stats/shmstats" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/logging/otel" + "github.com/paypal/junodb/pkg/stats" ) var ( diff --git a/cmd/proxy/watcher/watcher.go b/cmd/proxy/watcher/watcher.go index 35befb7d..056b44c7 100644 --- a/cmd/proxy/watcher/watcher.go +++ b/cmd/proxy/watcher/watcher.go @@ -28,12 +28,12 @@ import ( clientv3 "go.etcd.io/etcd/client/v3" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/proxy/proc" - "juno/pkg/cluster" - "juno/pkg/etcd" - "juno/pkg/util" + "github.com/paypal/junodb/cmd/proxy/proc" + "github.com/paypal/junodb/pkg/cluster" + "github.com/paypal/junodb/pkg/etcd" + "github.com/paypal/junodb/pkg/util" ) type Watcher struct { diff --git a/cmd/storageserv/app/ssmgr.go b/cmd/storageserv/app/ssmgr.go index 4ee27b01..2a1f4d18 100644 --- a/cmd/storageserv/app/ssmgr.go +++ b/cmd/storageserv/app/ssmgr.go @@ -26,14 +26,14 @@ import ( "net" "os" - "juno/third_party/forked/golang/glog" - - "juno/cmd/storageserv/config" - "juno/pkg/cmd" - "juno/pkg/initmgr" - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/net/netutil" + "github.com/paypal/junodb/third_party/forked/golang/glog" + + "github.com/paypal/junodb/cmd/storageserv/config" + "github.com/paypal/junodb/pkg/cmd" + "github.com/paypal/junodb/pkg/initmgr" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/net/netutil" ) const ( @@ -97,7 +97,7 @@ func (c *Manager) Parse(args []string) (err error) { return } -///TODO refactoring +// /TODO refactoring func (c *Manager) Exec() { initmgr.Register(config.Initializer, c.optConfigFile) diff --git a/cmd/storageserv/app/ssmonwkr.go b/cmd/storageserv/app/ssmonwkr.go index dbe9ada7..6e2311f5 100644 --- a/cmd/storageserv/app/ssmonwkr.go +++ b/cmd/storageserv/app/ssmonwkr.go @@ -24,14 +24,14 @@ import ( "strings" "sync" - "juno/third_party/forked/golang/glog" - - "juno/cmd/storageserv/config" - "juno/cmd/storageserv/stats" - "juno/pkg/initmgr" - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/logging/otel" + "github.com/paypal/junodb/third_party/forked/golang/glog" + + "github.com/paypal/junodb/cmd/storageserv/config" + "github.com/paypal/junodb/cmd/storageserv/stats" + "github.com/paypal/junodb/pkg/initmgr" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/logging/otel" ) type ( diff --git a/cmd/storageserv/app/sswkr.go b/cmd/storageserv/app/sswkr.go index 73c7474f..10aa38c2 100644 --- a/cmd/storageserv/app/sswkr.go +++ b/cmd/storageserv/app/sswkr.go @@ -26,24 +26,24 @@ import ( "os" "strconv" - "juno/third_party/forked/golang/glog" - - "juno/cmd/dbscanserv/patch" - "juno/cmd/storageserv/config" - "juno/cmd/storageserv/handler" - "juno/cmd/storageserv/redist" - "juno/cmd/storageserv/stats" - "juno/cmd/storageserv/storage" - - "juno/cmd/storageserv/compact" - "juno/cmd/storageserv/watcher" - "juno/pkg/cluster" - "juno/pkg/initmgr" - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/logging/otel" - "juno/pkg/service" - "juno/pkg/util" + "github.com/paypal/junodb/third_party/forked/golang/glog" + + "github.com/paypal/junodb/cmd/dbscanserv/patch" + "github.com/paypal/junodb/cmd/storageserv/config" + "github.com/paypal/junodb/cmd/storageserv/handler" + "github.com/paypal/junodb/cmd/storageserv/redist" + "github.com/paypal/junodb/cmd/storageserv/stats" + "github.com/paypal/junodb/cmd/storageserv/storage" + + "github.com/paypal/junodb/cmd/storageserv/compact" + "github.com/paypal/junodb/cmd/storageserv/watcher" + "github.com/paypal/junodb/pkg/cluster" + "github.com/paypal/junodb/pkg/initmgr" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/logging/otel" + "github.com/paypal/junodb/pkg/service" + "github.com/paypal/junodb/pkg/util" ) type Worker struct { diff --git a/cmd/storageserv/app/storagemgr.go b/cmd/storageserv/app/storagemgr.go index ee9c288d..20b88626 100644 --- a/cmd/storageserv/app/storagemgr.go +++ b/cmd/storageserv/app/storagemgr.go @@ -34,10 +34,10 @@ import ( "syscall" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/storageserv/stats/shmstats" - "juno/pkg/util" + "github.com/paypal/junodb/cmd/storageserv/stats/shmstats" + "github.com/paypal/junodb/pkg/util" ) type ( diff --git a/cmd/storageserv/app/storageserv.go b/cmd/storageserv/app/storageserv.go index 11d8ac57..f2d1b4bd 100644 --- a/cmd/storageserv/app/storageserv.go +++ b/cmd/storageserv/app/storageserv.go @@ -26,9 +26,9 @@ import ( "path/filepath" "strings" - "juno/pkg/cmd" - "juno/pkg/initmgr" - "juno/pkg/version" + "github.com/paypal/junodb/pkg/cmd" + "github.com/paypal/junodb/pkg/initmgr" + "github.com/paypal/junodb/pkg/version" ) func init() { @@ -96,7 +96,7 @@ func Main() { } -//TODO may customize this or remove inappalicable glob flags +// TODO may customize this or remove inappalicable glob flags func printUsage() { progName := filepath.Base(os.Args[0]) fmt.Printf(` diff --git a/cmd/storageserv/compact/dbclient.go b/cmd/storageserv/compact/dbclient.go index 6d92d985..4428530a 100644 --- a/cmd/storageserv/compact/dbclient.go +++ b/cmd/storageserv/compact/dbclient.go @@ -28,10 +28,10 @@ import ( "path/filepath" "time" - "juno/cmd/storageserv/storage/db" - "juno/pkg/service" - "juno/third_party/forked/golang/glog" - "juno/third_party/forked/tecbot/gorocksdb" + "github.com/paypal/junodb/cmd/storageserv/storage/db" + "github.com/paypal/junodb/pkg/service" + "github.com/paypal/junodb/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/tecbot/gorocksdb" ) type DbClient struct { diff --git a/cmd/storageserv/compact/filter.go b/cmd/storageserv/compact/filter.go index 226e4aa6..53d0cace 100644 --- a/cmd/storageserv/compact/filter.go +++ b/cmd/storageserv/compact/filter.go @@ -24,7 +24,7 @@ import ( "github.com/BurntSushi/toml" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) type namespaceFilter struct { diff --git a/cmd/storageserv/config/config.go b/cmd/storageserv/config/config.go index 524a3de3..253d1f70 100644 --- a/cmd/storageserv/config/config.go +++ b/cmd/storageserv/config/config.go @@ -29,23 +29,23 @@ import ( "path/filepath" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" "github.com/BurntSushi/toml" - dbscan "juno/cmd/dbscanserv/config" - "juno/cmd/storageserv/redist" - "juno/cmd/storageserv/storage/db" - "juno/pkg/cluster" - "juno/pkg/etcd" - "juno/pkg/initmgr" - "juno/pkg/io" - cal "juno/pkg/logging/cal/config" - otel "juno/pkg/logging/otel/config" - "juno/pkg/service" - "juno/pkg/shard" - "juno/pkg/util" - "juno/pkg/version" + dbscan "github.com/paypal/junodb/cmd/dbscanserv/config" + "github.com/paypal/junodb/cmd/storageserv/redist" + "github.com/paypal/junodb/cmd/storageserv/storage/db" + "github.com/paypal/junodb/pkg/cluster" + "github.com/paypal/junodb/pkg/etcd" + "github.com/paypal/junodb/pkg/initmgr" + "github.com/paypal/junodb/pkg/io" + cal "github.com/paypal/junodb/pkg/logging/cal/config" + otel "github.com/paypal/junodb/pkg/logging/otel/config" + "github.com/paypal/junodb/pkg/service" + "github.com/paypal/junodb/pkg/shard" + "github.com/paypal/junodb/pkg/util" + "github.com/paypal/junodb/pkg/version" ) var Initializer initmgr.IInitializer = initmgr.NewInitializer(initialize, finalize) diff --git a/cmd/storageserv/handler/reqhandler.go b/cmd/storageserv/handler/reqhandler.go index 9c8fe70e..a029b790 100644 --- a/cmd/storageserv/handler/reqhandler.go +++ b/cmd/storageserv/handler/reqhandler.go @@ -20,12 +20,12 @@ package handler import ( - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/storageserv/config" - "juno/cmd/storageserv/storage" - "juno/pkg/io" - "juno/pkg/util" + "github.com/paypal/junodb/cmd/storageserv/config" + "github.com/paypal/junodb/cmd/storageserv/storage" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/util" ) var _ io.IRequestHandler = (*RequestHandler)(nil) diff --git a/cmd/storageserv/main.go b/cmd/storageserv/main.go index 271a0523..1c7fb879 100644 --- a/cmd/storageserv/main.go +++ b/cmd/storageserv/main.go @@ -19,7 +19,7 @@ package main -import "juno/cmd/storageserv/app" +import "github.com/paypal/junodb/cmd/storageserv/app" func main() { app.Main() diff --git a/cmd/storageserv/redist/config.go b/cmd/storageserv/redist/config.go index 48aa4ea5..4134fc8a 100644 --- a/cmd/storageserv/redist/config.go +++ b/cmd/storageserv/redist/config.go @@ -20,9 +20,10 @@ package redist import ( - "juno/pkg/io" - "juno/pkg/util" "time" + + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/util" ) type Config struct { diff --git a/cmd/storageserv/redist/ratelimiter.go b/cmd/storageserv/redist/ratelimiter.go index b98359a8..5cf06cc0 100644 --- a/cmd/storageserv/redist/ratelimiter.go +++ b/cmd/storageserv/redist/ratelimiter.go @@ -20,8 +20,9 @@ package redist import ( - "juno/third_party/forked/golang/glog" "time" + + "github.com/paypal/junodb/third_party/forked/golang/glog" ) // A variantion of token bucket algorithm diff --git a/cmd/storageserv/redist/redist.go b/cmd/storageserv/redist/redist.go index d4d6a9d7..baf3fd43 100644 --- a/cmd/storageserv/redist/redist.go +++ b/cmd/storageserv/redist/redist.go @@ -26,13 +26,13 @@ import ( "sync/atomic" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/etcd" - "juno/pkg/io" - "juno/pkg/proto" - "juno/pkg/shard" - redistst "juno/pkg/stats/redist" + "github.com/paypal/junodb/pkg/etcd" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/shard" + redistst "github.com/paypal/junodb/pkg/stats/redist" ) type IDBRedistHandler interface { diff --git a/cmd/storageserv/redist/replicator.go b/cmd/storageserv/redist/replicator.go index c7a28a56..4ea068c8 100644 --- a/cmd/storageserv/redist/replicator.go +++ b/cmd/storageserv/redist/replicator.go @@ -24,14 +24,14 @@ import ( "sync" "time" - cerr "juno/pkg/errors" - "juno/pkg/etcd" - "juno/pkg/io" - "juno/pkg/proto" - "juno/pkg/shard" - redistst "juno/pkg/stats/redist" - - "juno/third_party/forked/golang/glog" + cerr "github.com/paypal/junodb/pkg/errors" + "github.com/paypal/junodb/pkg/etcd" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/shard" + redistst "github.com/paypal/junodb/pkg/stats/redist" + + "github.com/paypal/junodb/third_party/forked/golang/glog" ) type Replicator struct { diff --git a/cmd/storageserv/redist/reqctx.go b/cmd/storageserv/redist/reqctx.go index 249abd99..f0edfaec 100644 --- a/cmd/storageserv/redist/reqctx.go +++ b/cmd/storageserv/redist/reqctx.go @@ -24,12 +24,12 @@ import ( "io" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - . "juno/pkg/io" - "juno/pkg/proto" - redistst "juno/pkg/stats/redist" - "juno/pkg/util" + . "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/proto" + redistst "github.com/paypal/junodb/pkg/stats/redist" + "github.com/paypal/junodb/pkg/util" ) type RedistRequestContext struct { diff --git a/cmd/storageserv/stats/htmlsect.go b/cmd/storageserv/stats/htmlsect.go index 86d45177..11d02fbc 100644 --- a/cmd/storageserv/stats/htmlsect.go +++ b/cmd/storageserv/stats/htmlsect.go @@ -25,8 +25,8 @@ import ( "html/template" "time" - "juno/cmd/storageserv/stats/shmstats" - "juno/pkg/stats" + "github.com/paypal/junodb/cmd/storageserv/stats/shmstats" + "github.com/paypal/junodb/pkg/stats" ) type ( diff --git a/cmd/storageserv/stats/htmltmpl.go b/cmd/storageserv/stats/htmltmpl.go index 5fbe57ed..687ce5fd 100644 --- a/cmd/storageserv/stats/htmltmpl.go +++ b/cmd/storageserv/stats/htmltmpl.go @@ -23,7 +23,7 @@ import ( "fmt" "html/template" - "juno/pkg/stats" + "github.com/paypal/junodb/pkg/stats" ) var ( diff --git a/cmd/storageserv/stats/httphandler.go b/cmd/storageserv/stats/httphandler.go index e4b1608a..b36d8eed 100644 --- a/cmd/storageserv/stats/httphandler.go +++ b/cmd/storageserv/stats/httphandler.go @@ -25,11 +25,11 @@ import ( "github.com/BurntSushi/toml" - "juno/cmd/proxy/stats/qry" - "juno/cmd/storageserv/config" - "juno/cmd/storageserv/storage/db" - "juno/pkg/stats" - "juno/pkg/version" + "github.com/paypal/junodb/cmd/proxy/stats/qry" + "github.com/paypal/junodb/cmd/storageserv/config" + "github.com/paypal/junodb/cmd/storageserv/storage/db" + "github.com/paypal/junodb/pkg/stats" + "github.com/paypal/junodb/pkg/version" ) var ( diff --git a/cmd/storageserv/stats/monhandler.go b/cmd/storageserv/stats/monhandler.go index d965aa1b..0eb335b5 100644 --- a/cmd/storageserv/stats/monhandler.go +++ b/cmd/storageserv/stats/monhandler.go @@ -29,12 +29,12 @@ import ( "strconv" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/storageserv/config" - "juno/cmd/storageserv/stats/shmstats" - "juno/pkg/stats" - "juno/pkg/version" + "github.com/paypal/junodb/cmd/storageserv/config" + "github.com/paypal/junodb/cmd/storageserv/stats/shmstats" + "github.com/paypal/junodb/pkg/stats" + "github.com/paypal/junodb/pkg/version" ) type ( diff --git a/cmd/storageserv/stats/shmstats/shmstats.go b/cmd/storageserv/stats/shmstats/shmstats.go index 66b1e7d3..87ecfdc8 100644 --- a/cmd/storageserv/stats/shmstats/shmstats.go +++ b/cmd/storageserv/stats/shmstats/shmstats.go @@ -32,10 +32,10 @@ import ( "time" "unsafe" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/storageserv/config" - "juno/pkg/stats" + "github.com/paypal/junodb/cmd/storageserv/config" + "github.com/paypal/junodb/pkg/stats" ) const ( diff --git a/cmd/storageserv/stats/shmstatswr.go b/cmd/storageserv/stats/shmstatswr.go index 042e0b39..d2fb50c7 100644 --- a/cmd/storageserv/stats/shmstatswr.go +++ b/cmd/storageserv/stats/shmstatswr.go @@ -25,8 +25,8 @@ import ( "time" "unsafe" - "juno/cmd/storageserv/stats/shmstats" - "juno/pkg/stats" + "github.com/paypal/junodb/cmd/storageserv/stats/shmstats" + "github.com/paypal/junodb/pkg/stats" ) var ( diff --git a/cmd/storageserv/stats/statelog.go b/cmd/storageserv/stats/statelog.go index 723cf7e9..66d27b6f 100644 --- a/cmd/storageserv/stats/statelog.go +++ b/cmd/storageserv/stats/statelog.go @@ -31,9 +31,9 @@ import ( "syscall" "time" - "juno/cmd/storageserv/storage/db" - "juno/pkg/proto" - "juno/pkg/stats" + "github.com/paypal/junodb/cmd/storageserv/storage/db" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/stats" ) const ( @@ -46,7 +46,7 @@ const ( kNumRequestTypes ) -//Exponential Moving Average (EMA) +// Exponential Moving Average (EMA) var ( statsNumRequests uint64 statsNumRequestsPrev uint64 diff --git a/cmd/storageserv/stats/statsinit.go b/cmd/storageserv/stats/statsinit.go index d1e2ed95..8b7f4cfe 100644 --- a/cmd/storageserv/stats/statsinit.go +++ b/cmd/storageserv/stats/statsinit.go @@ -22,11 +22,11 @@ package stats import ( "fmt" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/storageserv/config" - "juno/cmd/storageserv/stats/shmstats" - "juno/pkg/debug" + "github.com/paypal/junodb/cmd/storageserv/config" + "github.com/paypal/junodb/cmd/storageserv/stats/shmstats" + "github.com/paypal/junodb/pkg/debug" ) func InitForManager(numChildren int) (err error) { diff --git a/cmd/storageserv/stats/statslogger.go b/cmd/storageserv/stats/statslogger.go index a36ca100..79ca3643 100644 --- a/cmd/storageserv/stats/statslogger.go +++ b/cmd/storageserv/stats/statslogger.go @@ -29,13 +29,13 @@ import ( "path/filepath" "time" - // "juno/third_party/forked/golang/glog" + // "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/storageserv/config" - "juno/cmd/storageserv/stats/shmstats" - "juno/pkg/logging/cal" - "juno/pkg/logging/otel" - "juno/pkg/stats" + "github.com/paypal/junodb/cmd/storageserv/config" + "github.com/paypal/junodb/cmd/storageserv/stats/shmstats" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/logging/otel" + "github.com/paypal/junodb/pkg/stats" ) var ( diff --git a/cmd/storageserv/storage/bench_test.go b/cmd/storageserv/storage/bench_test.go index 90070c04..580fce6e 100644 --- a/cmd/storageserv/storage/bench_test.go +++ b/cmd/storageserv/storage/bench_test.go @@ -23,7 +23,7 @@ import ( "testing" "time" - "juno/pkg/proto" + "github.com/paypal/junodb/pkg/proto" ) func BenchmarkSet(b *testing.B) { diff --git a/cmd/storageserv/storage/create_test.go b/cmd/storageserv/storage/create_test.go index 25dd5d47..77cd1d26 100644 --- a/cmd/storageserv/storage/create_test.go +++ b/cmd/storageserv/storage/create_test.go @@ -24,7 +24,7 @@ import ( "testing" "time" - "juno/pkg/proto" + "github.com/paypal/junodb/pkg/proto" ) var ( diff --git a/cmd/storageserv/storage/db/config.go b/cmd/storageserv/storage/db/config.go index f7df81f7..eb7ddd95 100644 --- a/cmd/storageserv/storage/db/config.go +++ b/cmd/storageserv/storage/db/config.go @@ -26,8 +26,8 @@ import ( "math/rand" "os" - "juno/third_party/forked/golang/glog" - "juno/third_party/forked/tecbot/gorocksdb" + "github.com/paypal/junodb/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/tecbot/gorocksdb" ) ///TODO need to add validation @@ -242,7 +242,7 @@ var defaultFlashConfig = Config{ var DBConfig = defaultFlashConfig -//Note: rocksdb C binding does not support getters for option types +// Note: rocksdb C binding does not support getters for option types func NewRocksDBptions() *gorocksdb.Options { options := gorocksdb.NewDefaultOptions() diff --git a/cmd/storageserv/storage/db/db.go b/cmd/storageserv/storage/db/db.go index 60b4d8b1..ed67979a 100644 --- a/cmd/storageserv/storage/db/db.go +++ b/cmd/storageserv/storage/db/db.go @@ -22,8 +22,8 @@ package db import ( "io" - "juno/cmd/storageserv/redist" - "juno/pkg/shard" + "github.com/paypal/junodb/cmd/storageserv/redist" + "github.com/paypal/junodb/pkg/shard" ) type IDatabase interface { diff --git a/cmd/storageserv/storage/db/dbcopy/cmd.go b/cmd/storageserv/storage/db/dbcopy/cmd.go index 3c66333a..c1fde68d 100644 --- a/cmd/storageserv/storage/db/dbcopy/cmd.go +++ b/cmd/storageserv/storage/db/dbcopy/cmd.go @@ -22,7 +22,7 @@ package main import ( "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) type CmdLine struct { diff --git a/cmd/storageserv/storage/db/dbcopy/compact.go b/cmd/storageserv/storage/db/dbcopy/compact.go index c5541641..fc280869 100644 --- a/cmd/storageserv/storage/db/dbcopy/compact.go +++ b/cmd/storageserv/storage/db/dbcopy/compact.go @@ -21,7 +21,8 @@ package main import ( "bytes" - "juno/third_party/forked/golang/glog" + + "github.com/paypal/junodb/third_party/forked/golang/glog" ) type CompactionFilter struct { diff --git a/cmd/storageserv/storage/db/dbcopy/config.go b/cmd/storageserv/storage/db/dbcopy/config.go index a1834ee4..7fe3da6b 100644 --- a/cmd/storageserv/storage/db/dbcopy/config.go +++ b/cmd/storageserv/storage/db/dbcopy/config.go @@ -28,9 +28,9 @@ import ( "github.com/BurntSushi/toml" - "juno/cmd/storageserv/config" - "juno/cmd/storageserv/storage/db" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/cmd/storageserv/config" + "github.com/paypal/junodb/cmd/storageserv/storage/db" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) var cfg = config.Config{ diff --git a/cmd/storageserv/storage/db/dbcopy/dbclient.go b/cmd/storageserv/storage/db/dbcopy/dbclient.go index d6b27c85..bfeae710 100644 --- a/cmd/storageserv/storage/db/dbcopy/dbclient.go +++ b/cmd/storageserv/storage/db/dbcopy/dbclient.go @@ -27,11 +27,11 @@ import ( "path/filepath" "time" - "juno/third_party/forked/golang/glog" - "juno/third_party/forked/tecbot/gorocksdb" + "github.com/paypal/junodb/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/tecbot/gorocksdb" - "juno/cmd/storageserv/storage/db" - "juno/pkg/util" + "github.com/paypal/junodb/cmd/storageserv/storage/db" + "github.com/paypal/junodb/pkg/util" ) type DbClient struct { diff --git a/cmd/storageserv/storage/db/dbcopy/main.go b/cmd/storageserv/storage/db/dbcopy/main.go index d0a767db..6c288aee 100644 --- a/cmd/storageserv/storage/db/dbcopy/main.go +++ b/cmd/storageserv/storage/db/dbcopy/main.go @@ -31,7 +31,7 @@ import ( "strings" "sync" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) func parseKeyRange(key string) (start int, stop int) { diff --git a/cmd/storageserv/storage/db/debug.go b/cmd/storageserv/storage/db/debug.go index 57f32f91..e73a7485 100644 --- a/cmd/storageserv/storage/db/debug.go +++ b/cmd/storageserv/storage/db/debug.go @@ -28,7 +28,7 @@ import ( "sync" "unsafe" - "juno/third_party/forked/tecbot/gorocksdb" + "github.com/paypal/junodb/third_party/forked/tecbot/gorocksdb" ) var ( diff --git a/cmd/storageserv/storage/db/record.go b/cmd/storageserv/storage/db/record.go index 9ae2675d..86557a3c 100644 --- a/cmd/storageserv/storage/db/record.go +++ b/cmd/storageserv/storage/db/record.go @@ -22,39 +22,38 @@ Package db implements Juno storage interfaces with gorocksdb. Record Encoding Format - Offset | Field | Size - --------+---------------------------------+--------------- - 0 | encoding version | 1 byte - --------+---------------------------------+--------------- - 1 | flag | 1 byte - --------+---------------------------------+--------------- - 2 | reserved | 2 bytes - --------+---------------------------------+--------------- - 4 | expiration time | 4 bytes - --------+---------------------------------+--------------- - 8 | version | 4 bytes - --------+---------------------------------+--------------- - 12 | creation time | 4 bytes - --------+---------------------------------+--------------- - 16 | last modification time | 8 bytes - --------+---------------------------------+--------------- - 24 | request Id of the last modifier | 16 bytes - --------+---------------------------------+--------------- - 40 | request Id of the originator | 16 bytes - --------+---------------------------------+--------------- - 56 | encapsulating payload | ... - - Record Flag - bit | 0| 1| 2| 3| 4| 5| 6| 7 - ------+------------+------------+------------+------------+------------+------------+------------+------------+ - | MarkDelete | - + Offset | Field | Size + --------+---------------------------------+--------------- + 0 | encoding version | 1 byte + --------+---------------------------------+--------------- + 1 | flag | 1 byte + --------+---------------------------------+--------------- + 2 | reserved | 2 bytes + --------+---------------------------------+--------------- + 4 | expiration time | 4 bytes + --------+---------------------------------+--------------- + 8 | version | 4 bytes + --------+---------------------------------+--------------- + 12 | creation time | 4 bytes + --------+---------------------------------+--------------- + 16 | last modification time | 8 bytes + --------+---------------------------------+--------------- + 24 | request Id of the last modifier | 16 bytes + --------+---------------------------------+--------------- + 40 | request Id of the originator | 16 bytes + --------+---------------------------------+--------------- + 56 | encapsulating payload | ... + + Record Flag + bit | 0| 1| 2| 3| 4| 5| 6| 7 + ------+------------+------------+------------+------------+------------+------------+------------+------------+ + | MarkDelete | Storage Key Format - ----------------------------+----------- +-------- - namespace length (1 byte) | namespace | key - ----------------------------+----------- +-------- + ----------------------------+----------- +-------- + namespace length (1 byte) | namespace | key + ----------------------------+----------- +-------- */ package db @@ -66,12 +65,12 @@ import ( "io" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/logging" - "juno/pkg/proto" - "juno/pkg/shard" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/shard" + "github.com/paypal/junodb/pkg/util" ) const ( @@ -234,7 +233,7 @@ func (rec *Record) EncodeToBuffer(buffer *bytes.Buffer) error { return nil } -///TODO validation. the slices +// /TODO validation. the slices func (rec *Record) Decode(data []byte) error { if data == nil || len(data) < kSzHeader { return errors.New("Decoding error: empty") diff --git a/cmd/storageserv/storage/db/recordid.go b/cmd/storageserv/storage/db/recordid.go index 8ff6103e..b46c5c1f 100644 --- a/cmd/storageserv/storage/db/recordid.go +++ b/cmd/storageserv/storage/db/recordid.go @@ -23,9 +23,9 @@ import ( "bytes" "encoding/binary" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/shard" + "github.com/paypal/junodb/pkg/shard" ) var enableMircoShardId bool = false // default false for backward compatibility diff --git a/cmd/storageserv/storage/db/recordid_test.go b/cmd/storageserv/storage/db/recordid_test.go index 29f07345..1da0f86d 100644 --- a/cmd/storageserv/storage/db/recordid_test.go +++ b/cmd/storageserv/storage/db/recordid_test.go @@ -22,8 +22,9 @@ package db import ( "bytes" "fmt" - "juno/pkg/shard" "testing" + + "github.com/paypal/junodb/pkg/shard" ) func TestNoMicroShard(t *testing.T) { diff --git a/cmd/storageserv/storage/db/rocksdb.go b/cmd/storageserv/storage/db/rocksdb.go index 11b1d13c..dd5a29bb 100644 --- a/cmd/storageserv/storage/db/rocksdb.go +++ b/cmd/storageserv/storage/db/rocksdb.go @@ -28,14 +28,14 @@ import ( "sync/atomic" "time" - "juno/third_party/forked/golang/glog" - "juno/third_party/forked/tecbot/gorocksdb" - - "juno/cmd/storageserv/redist" - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/proto" - "juno/pkg/shard" + "github.com/paypal/junodb/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/tecbot/gorocksdb" + + "github.com/paypal/junodb/cmd/storageserv/redist" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/shard" ) var ( @@ -92,7 +92,7 @@ func GetPrefixDB() *ShardingByPrefix { return nil } -///TODO xuli dbDir... +// /TODO xuli dbDir... func newDBSharding(numShards int, numMicroShards int, numMicroShardGroups int, numPrefixDbs int, dbnamePrefix string) (sharding IDBSharding) { if numPrefixDbs > 0 { // Use prefix key shardFilters := make([]*ShardFilter, numPrefixDbs, numPrefixDbs) @@ -115,7 +115,7 @@ func newDBSharding(numShards int, numMicroShards int, numMicroShardGroups int, n return } -///TODO dbDir... +// /TODO dbDir... func newRocksDB(numShards int, numMicroShards int, numMicroShardGroups int, numPrefixDbs int, zoneId int, nodeId int, shardMap shard.Map) *RocksDB { db := &RocksDB{ zoneId: zoneId, diff --git a/cmd/storageserv/storage/db/sharding.go b/cmd/storageserv/storage/db/sharding.go index bfc3eedf..b24723bb 100644 --- a/cmd/storageserv/storage/db/sharding.go +++ b/cmd/storageserv/storage/db/sharding.go @@ -23,10 +23,10 @@ import ( "io" "time" - "juno/third_party/forked/tecbot/gorocksdb" + "github.com/paypal/junodb/third_party/forked/tecbot/gorocksdb" - "juno/cmd/storageserv/redist" - "juno/pkg/shard" + "github.com/paypal/junodb/cmd/storageserv/redist" + "github.com/paypal/junodb/pkg/shard" ) type IDBSharding interface { diff --git a/cmd/storageserv/storage/db/shardingByInstance.go b/cmd/storageserv/storage/db/shardingByInstance.go index fcd95a99..0a7dfbe4 100644 --- a/cmd/storageserv/storage/db/shardingByInstance.go +++ b/cmd/storageserv/storage/db/shardingByInstance.go @@ -25,13 +25,13 @@ import ( "sync" "time" - "juno/third_party/forked/golang/glog" - "juno/third_party/forked/tecbot/gorocksdb" + "github.com/paypal/junodb/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/tecbot/gorocksdb" - "juno/cmd/storageserv/redist" - "juno/pkg/shard" - redistst "juno/pkg/stats/redist" - "juno/pkg/util" + "github.com/paypal/junodb/cmd/storageserv/redist" + "github.com/paypal/junodb/pkg/shard" + redistst "github.com/paypal/junodb/pkg/stats/redist" + "github.com/paypal/junodb/pkg/util" ) type ShardingByInstance struct { diff --git a/cmd/storageserv/storage/db/shardingByPrefix.go b/cmd/storageserv/storage/db/shardingByPrefix.go index fefd006d..e32988dc 100644 --- a/cmd/storageserv/storage/db/shardingByPrefix.go +++ b/cmd/storageserv/storage/db/shardingByPrefix.go @@ -28,13 +28,13 @@ import ( "sync/atomic" "time" - "juno/third_party/forked/golang/glog" - "juno/third_party/forked/tecbot/gorocksdb" + "github.com/paypal/junodb/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/tecbot/gorocksdb" - "juno/cmd/storageserv/redist" - "juno/pkg/shard" - redistst "juno/pkg/stats/redist" - "juno/pkg/util" + "github.com/paypal/junodb/cmd/storageserv/redist" + "github.com/paypal/junodb/pkg/shard" + redistst "github.com/paypal/junodb/pkg/stats/redist" + "github.com/paypal/junodb/pkg/util" ) type ShardFilter struct { diff --git a/cmd/storageserv/storage/delete_test.go b/cmd/storageserv/storage/delete_test.go index 791add9c..969cb74c 100644 --- a/cmd/storageserv/storage/delete_test.go +++ b/cmd/storageserv/storage/delete_test.go @@ -24,8 +24,8 @@ import ( "testing" "time" - "juno/pkg/proto" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/util" ) var ( diff --git a/cmd/storageserv/storage/get_test.go b/cmd/storageserv/storage/get_test.go index 1143f49d..150bb479 100644 --- a/cmd/storageserv/storage/get_test.go +++ b/cmd/storageserv/storage/get_test.go @@ -25,8 +25,8 @@ package storage import ( "testing" - "juno/pkg/proto" - "juno/test/testutil" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/test/testutil" ) var ( diff --git a/cmd/storageserv/storage/lock.go b/cmd/storageserv/storage/lock.go index 8b781cf8..19c14ccd 100644 --- a/cmd/storageserv/storage/lock.go +++ b/cmd/storageserv/storage/lock.go @@ -22,12 +22,12 @@ package storage import ( "sync" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/storageserv/storage/db" - "juno/pkg/logging" - "juno/pkg/proto" - "juno/pkg/shard" + "github.com/paypal/junodb/cmd/storageserv/storage/db" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/shard" ) var ( diff --git a/cmd/storageserv/storage/proc.go b/cmd/storageserv/storage/proc.go index e9cbe750..c744c5c8 100644 --- a/cmd/storageserv/storage/proc.go +++ b/cmd/storageserv/storage/proc.go @@ -26,20 +26,20 @@ import ( "runtime" "time" - "juno/third_party/forked/golang/glog" - - "juno/cmd/storageserv/config" - ssstats "juno/cmd/storageserv/stats" - "juno/cmd/storageserv/storage/db" - "juno/pkg/debug" - "juno/pkg/io" - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/logging/otel" - "juno/pkg/proto" - "juno/pkg/shard" - "juno/pkg/stats" - "juno/pkg/util" + "github.com/paypal/junodb/third_party/forked/golang/glog" + + "github.com/paypal/junodb/cmd/storageserv/config" + ssstats "github.com/paypal/junodb/cmd/storageserv/stats" + "github.com/paypal/junodb/cmd/storageserv/storage/db" + "github.com/paypal/junodb/pkg/debug" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/logging/otel" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/shard" + "github.com/paypal/junodb/pkg/stats" + "github.com/paypal/junodb/pkg/util" ) const ( diff --git a/cmd/storageserv/storage/set_test.go b/cmd/storageserv/storage/set_test.go index 4cba2f4b..89b5b24e 100644 --- a/cmd/storageserv/storage/set_test.go +++ b/cmd/storageserv/storage/set_test.go @@ -23,7 +23,7 @@ import ( "testing" "time" - "juno/pkg/proto" + "github.com/paypal/junodb/pkg/proto" ) var ( diff --git a/cmd/storageserv/storage/setup_test.go b/cmd/storageserv/storage/setup_test.go index ad72be99..1eebff06 100644 --- a/cmd/storageserv/storage/setup_test.go +++ b/cmd/storageserv/storage/setup_test.go @@ -24,11 +24,11 @@ import ( "os" "testing" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/storageserv/config" - "juno/cmd/storageserv/storage/db" - "juno/pkg/shard" + "github.com/paypal/junodb/cmd/storageserv/config" + "github.com/paypal/junodb/cmd/storageserv/storage/db" + "github.com/paypal/junodb/pkg/shard" ) func testSetup() { diff --git a/cmd/storageserv/storage/storage.go b/cmd/storageserv/storage/storage.go index 62d576c7..f2010843 100644 --- a/cmd/storageserv/storage/storage.go +++ b/cmd/storageserv/storage/storage.go @@ -27,21 +27,21 @@ import ( "sync" "time" - "juno/third_party/forked/golang/glog" - - "juno/cmd/dbscanserv/patch" - "juno/cmd/storageserv/config" - "juno/cmd/storageserv/redist" - "juno/cmd/storageserv/storage/db" - "juno/cmd/storageserv/watcher" - "juno/pkg/cluster" - "juno/pkg/debug" - "juno/pkg/etcd" - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/proto" - "juno/pkg/shard" - "juno/pkg/util" + "github.com/paypal/junodb/third_party/forked/golang/glog" + + "github.com/paypal/junodb/cmd/dbscanserv/patch" + "github.com/paypal/junodb/cmd/storageserv/config" + "github.com/paypal/junodb/cmd/storageserv/redist" + "github.com/paypal/junodb/cmd/storageserv/storage/db" + "github.com/paypal/junodb/cmd/storageserv/watcher" + "github.com/paypal/junodb/pkg/cluster" + "github.com/paypal/junodb/pkg/debug" + "github.com/paypal/junodb/pkg/etcd" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/shard" + "github.com/paypal/junodb/pkg/util" ) var ( @@ -1125,7 +1125,7 @@ func TruncateExpired() { } // TODO: revisit... -//Used to detect replication conflict. Not for conditional update +// Used to detect replication conflict. Not for conditional update func isConflict(request *proto.OperationalMessage, rec *db.Record) (conflict bool) { lmt := request.GetLastModificationTime() if lmt != 0 { diff --git a/cmd/storageserv/storage/storage_test.go b/cmd/storageserv/storage/storage_test.go index 3a30b8e9..e3b89ac2 100644 --- a/cmd/storageserv/storage/storage_test.go +++ b/cmd/storageserv/storage/storage_test.go @@ -27,12 +27,12 @@ import ( "testing" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/storageserv/storage/db" - "juno/pkg/io" - "juno/pkg/proto" - "juno/pkg/shard" + "github.com/paypal/junodb/cmd/storageserv/storage/db" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/shard" ) const ( diff --git a/cmd/storageserv/storage/update_test.go b/cmd/storageserv/storage/update_test.go index 7ec45b3a..25703ef0 100644 --- a/cmd/storageserv/storage/update_test.go +++ b/cmd/storageserv/storage/update_test.go @@ -23,8 +23,8 @@ import ( "testing" "time" - "juno/pkg/proto" - // "juno/test/testutil" + "github.com/paypal/junodb/pkg/proto" + // "github.com/paypal/junodb/test/testutil" ) var ( diff --git a/cmd/storageserv/watcher/watcher.go b/cmd/storageserv/watcher/watcher.go index b4a12206..f7ac87ef 100644 --- a/cmd/storageserv/watcher/watcher.go +++ b/cmd/storageserv/watcher/watcher.go @@ -27,13 +27,13 @@ import ( "strconv" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" clientv3 "go.etcd.io/etcd/client/v3" - "juno/pkg/cluster" - "juno/pkg/etcd" - "juno/pkg/shard" + "github.com/paypal/junodb/pkg/cluster" + "github.com/paypal/junodb/pkg/etcd" + "github.com/paypal/junodb/pkg/shard" ) // watch for the following etcd changes diff --git a/cmd/tools/cmd/cfg/cfggen.go b/cmd/tools/cmd/cfg/cfggen.go index 856865cf..9b12e917 100644 --- a/cmd/tools/cmd/cfg/cfggen.go +++ b/cmd/tools/cmd/cfg/cfggen.go @@ -26,9 +26,9 @@ import ( "github.com/BurntSushi/toml" - "juno/cmd/proxy/config" - sscfg "juno/cmd/storageserv/config" - "juno/pkg/cmd" + "github.com/paypal/junodb/cmd/proxy/config" + sscfg "github.com/paypal/junodb/cmd/storageserv/config" + "github.com/paypal/junodb/pkg/cmd" ) type cfgTypeT int diff --git a/cmd/tools/cmd/cfg/conf.go b/cmd/tools/cmd/cfg/conf.go index add9a23c..3d17fb07 100644 --- a/cmd/tools/cmd/cfg/conf.go +++ b/cmd/tools/cmd/cfg/conf.go @@ -25,8 +25,8 @@ import ( "os" "strings" - "juno/pkg/cfg" - "juno/pkg/cmd" + "github.com/paypal/junodb/pkg/cfg" + "github.com/paypal/junodb/pkg/cmd" ) type cmdConfUnify struct { diff --git a/cmd/tools/cmd/cfg/rtcfg.go b/cmd/tools/cmd/cfg/rtcfg.go index 70b30bc3..b1bdb2e0 100644 --- a/cmd/tools/cmd/cfg/rtcfg.go +++ b/cmd/tools/cmd/cfg/rtcfg.go @@ -26,11 +26,11 @@ import ( "os" "time" - "juno/cmd/proxy/config" - "juno/pkg/cfg" - "juno/pkg/client" - "juno/pkg/cmd" - "juno/pkg/etcd" + "github.com/paypal/junodb/cmd/proxy/config" + "github.com/paypal/junodb/pkg/cfg" + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/pkg/cmd" + "github.com/paypal/junodb/pkg/etcd" ) const ( diff --git a/cmd/tools/cmd/cli/cli.go b/cmd/tools/cmd/cli/cli.go index 8e1c5fec..d90f1490 100644 --- a/cmd/tools/cmd/cli/cli.go +++ b/cmd/tools/cmd/cli/cli.go @@ -26,17 +26,17 @@ import ( "os" "time" - "juno/pkg/logging/cal" - "juno/pkg/logging/cal/config" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/logging/cal/config" + "github.com/paypal/junodb/third_party/forked/golang/glog" "github.com/BurntSushi/toml" uuid "github.com/satori/go.uuid" - "juno/pkg/client" - "juno/pkg/cmd" - "juno/pkg/sec" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/pkg/cmd" + "github.com/paypal/junodb/pkg/sec" + "github.com/paypal/junodb/pkg/util" ) const ( diff --git a/cmd/tools/cmd/cli/sscli.go b/cmd/tools/cmd/cli/sscli.go index 05494edf..2d29078e 100644 --- a/cmd/tools/cmd/cli/sscli.go +++ b/cmd/tools/cmd/cli/sscli.go @@ -25,15 +25,15 @@ import ( "os" "time" - // "juno/third_party/forked/golang/glog" + // "github.com/paypal/junodb/third_party/forked/golang/glog" uuid "github.com/satori/go.uuid" - "juno/internal/cli" - "juno/pkg/client" - "juno/pkg/cluster" - "juno/pkg/cmd" - "juno/pkg/proto" - "juno/pkg/util" + "github.com/paypal/junodb/internal/cli" + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/pkg/cluster" + "github.com/paypal/junodb/pkg/cmd" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/util" ) const ( diff --git a/cmd/tools/cmd/insp/inspmsg.go b/cmd/tools/cmd/insp/inspmsg.go index 94f742bc..97118dba 100644 --- a/cmd/tools/cmd/insp/inspmsg.go +++ b/cmd/tools/cmd/insp/inspmsg.go @@ -25,8 +25,8 @@ import ( "fmt" "os" - "juno/pkg/cmd" - "juno/pkg/proto" + "github.com/paypal/junodb/pkg/cmd" + "github.com/paypal/junodb/pkg/proto" ) type cmdInspMsgT struct { diff --git a/cmd/tools/cmd/insp/insprid.go b/cmd/tools/cmd/insp/insprid.go index 95249a55..791744ad 100644 --- a/cmd/tools/cmd/insp/insprid.go +++ b/cmd/tools/cmd/insp/insprid.go @@ -26,10 +26,10 @@ import ( uuid "github.com/satori/go.uuid" - "juno/pkg/cmd" - "juno/pkg/proto" - "juno/pkg/proto/mayfly" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/cmd" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/proto/mayfly" + "github.com/paypal/junodb/pkg/util" ) type ( diff --git a/cmd/tools/cmd/insp/ssgrp.go b/cmd/tools/cmd/insp/ssgrp.go index 20bd047a..2d0bf48f 100644 --- a/cmd/tools/cmd/insp/ssgrp.go +++ b/cmd/tools/cmd/insp/ssgrp.go @@ -23,13 +23,13 @@ import ( "encoding/hex" "fmt" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" "github.com/BurntSushi/toml" - "juno/pkg/cluster" - "juno/pkg/cmd" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/cluster" + "github.com/paypal/junodb/pkg/cmd" + "github.com/paypal/junodb/pkg/util" ) type ( diff --git a/cmd/tools/cmd/stats/proxystats.go b/cmd/tools/cmd/stats/proxystats.go index 4760dc82..92c13bd1 100644 --- a/cmd/tools/cmd/stats/proxystats.go +++ b/cmd/tools/cmd/stats/proxystats.go @@ -23,8 +23,8 @@ import ( "fmt" "os" - "juno/cmd/proxy/stats/shmstats" - "juno/pkg/cmd" + "github.com/paypal/junodb/cmd/proxy/stats/shmstats" + "github.com/paypal/junodb/pkg/cmd" ) var _ cmd.ICommand = (*CmdProxyStats)(nil) diff --git a/cmd/tools/cmd/stats/storagestats.go b/cmd/tools/cmd/stats/storagestats.go index 03ee76c2..5bfa84f3 100644 --- a/cmd/tools/cmd/stats/storagestats.go +++ b/cmd/tools/cmd/stats/storagestats.go @@ -23,8 +23,8 @@ import ( "fmt" "os" - "juno/cmd/storageserv/stats/shmstats" - "juno/pkg/cmd" + "github.com/paypal/junodb/cmd/storageserv/stats/shmstats" + "github.com/paypal/junodb/pkg/cmd" ) var _ cmd.ICommand = (*CmdStorageStats)(nil) diff --git a/cmd/tools/goldendata/client.go b/cmd/tools/goldendata/client.go index b66d2208..c0202423 100644 --- a/cmd/tools/goldendata/client.go +++ b/cmd/tools/goldendata/client.go @@ -25,10 +25,10 @@ import ( "strings" "time" - "juno/pkg/client" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/pkg/util" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) type Duration = util.Duration diff --git a/cmd/tools/goldendata/goldenset.go b/cmd/tools/goldendata/goldenset.go index 22d74747..ef973579 100644 --- a/cmd/tools/goldendata/goldenset.go +++ b/cmd/tools/goldendata/goldenset.go @@ -21,7 +21,8 @@ package gld import ( "fmt" - "juno/pkg/util" + + "github.com/paypal/junodb/pkg/util" ) type KEY []byte diff --git a/cmd/tools/goldendata/redistset.go b/cmd/tools/goldendata/redistset.go index 6f80a52e..b81e79c5 100644 --- a/cmd/tools/goldendata/redistset.go +++ b/cmd/tools/goldendata/redistset.go @@ -21,9 +21,10 @@ package gld import ( "fmt" - "juno/pkg/util" "strconv" "strings" + + "github.com/paypal/junodb/pkg/util" ) type RedistSet struct { diff --git a/cmd/tools/goldentool/goldentool.go b/cmd/tools/goldentool/goldentool.go index ec957af0..b387f66f 100644 --- a/cmd/tools/goldentool/goldentool.go +++ b/cmd/tools/goldentool/goldentool.go @@ -25,8 +25,8 @@ import ( "os" "path/filepath" - "juno/cmd/tools/goldendata" - "juno/third_party/forked/golang/glog" + gld "github.com/paypal/junodb/cmd/tools/goldendata" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) func main() { diff --git a/cmd/tools/junocfg/junocfg.go b/cmd/tools/junocfg/junocfg.go index 2e5c440b..2fba125a 100644 --- a/cmd/tools/junocfg/junocfg.go +++ b/cmd/tools/junocfg/junocfg.go @@ -22,8 +22,8 @@ package main import ( "fmt" - "juno/cmd/tools/cmd/cfg" - "juno/pkg/cmd" + "github.com/paypal/junodb/cmd/tools/cmd/cfg" + "github.com/paypal/junodb/pkg/cmd" ) func main() { diff --git a/cmd/tools/junocli/junocli.go b/cmd/tools/junocli/junocli.go index fa972002..1d39cb50 100644 --- a/cmd/tools/junocli/junocli.go +++ b/cmd/tools/junocli/junocli.go @@ -22,11 +22,11 @@ package main import ( "fmt" - _ "juno/cmd/tools/cmd/cfg" - _ "juno/cmd/tools/cmd/cli" - _ "juno/cmd/tools/cmd/insp" - "juno/pkg/cmd" - "juno/pkg/logging/cal" + _ "github.com/paypal/junodb/cmd/tools/cmd/cfg" + _ "github.com/paypal/junodb/cmd/tools/cmd/cli" + _ "github.com/paypal/junodb/cmd/tools/cmd/insp" + "github.com/paypal/junodb/pkg/cmd" + "github.com/paypal/junodb/pkg/logging/cal" ) func main() { diff --git a/cmd/tools/junostats/junostats.go b/cmd/tools/junostats/junostats.go index 0e19cc66..2b54b756 100644 --- a/cmd/tools/junostats/junostats.go +++ b/cmd/tools/junostats/junostats.go @@ -22,8 +22,8 @@ package main import ( "fmt" - "juno/cmd/tools/cmd/stats" - "juno/pkg/cmd" + "github.com/paypal/junodb/cmd/tools/cmd/stats" + "github.com/paypal/junodb/pkg/cmd" ) func main() { diff --git a/docker/build/build.sh b/docker/build/build.sh index f7043473..4e63cd6d 100755 --- a/docker/build/build.sh +++ b/docker/build/build.sh @@ -25,17 +25,17 @@ export CGO_CFLAGS="-I/usr/local/include" export CGO_LDFLAGS="-L/usr/local/lib -lrocksdb -lstdc++ -lm -lrt -lpthread -ldl" juno_executables="\ - juno/cmd/proxy \ - juno/cmd/storageserv \ - juno/cmd/clustermgr/clusterctl \ - juno/cmd/dbscanserv \ - juno/cmd/dbscanserv/junoctl \ - juno/cmd/tools/junostats \ - juno/cmd/tools/junocfg \ - juno/cmd/tools/junocli \ - juno/test/drv/junoload \ - juno/test/drv/bulkload \ - juno/cmd/storageserv/storage/db/dbcopy \ + github.com/paypal/junodb/cmd/proxy \ + github.com/paypal/junodb/cmd/storageserv \ + github.com/paypal/junodb/cmd/clustermgr/clusterctl \ + github.com/paypal/junodb/cmd/dbscanserv \ + github.com/paypal/junodb/cmd/dbscanserv/junoctl \ + github.com/paypal/junodb/cmd/tools/junostats \ + github.com/paypal/junodb/cmd/tools/junocfg \ + github.com/paypal/junodb/cmd/tools/junocli \ + github.com/paypal/junodb/test/drv/junoload \ + github.com/paypal/junodb/test/drv/bulkload \ + github.com/paypal/junodb/cmd/storageserv/storage/db/dbcopy \ " export PATH=/usr/local/go/bin:$PATH diff --git a/go.mod b/go.mod index 464802f0..0c138506 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module juno +module github.com/paypal/junodb go 1.18 diff --git a/internal/cli/ctx.go b/internal/cli/ctx.go index 022dbfd5..56965d87 100644 --- a/internal/cli/ctx.go +++ b/internal/cli/ctx.go @@ -20,9 +20,9 @@ package cli import ( - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/proto" + "github.com/paypal/junodb/pkg/proto" ) //GetResponse() != nil and GetError() != nil are mutually exclusive diff --git a/internal/cli/proc.go b/internal/cli/proc.go index 5a4719ce..d67c13b9 100644 --- a/internal/cli/proc.go +++ b/internal/cli/proc.go @@ -26,11 +26,11 @@ import ( "syscall" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - junoio "juno/pkg/io" - "juno/pkg/proto" - "juno/pkg/util" + junoio "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/util" ) type ( diff --git a/internal/cli/processor.go b/internal/cli/processor.go index be505974..cb7ee3ad 100644 --- a/internal/cli/processor.go +++ b/internal/cli/processor.go @@ -25,12 +25,12 @@ import ( "sync" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/io" - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/proto" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/proto" ) type IOError struct { diff --git a/internal/cli/recinfo.go b/internal/cli/recinfo.go index 6e3a752e..728bfb42 100644 --- a/internal/cli/recinfo.go +++ b/internal/cli/recinfo.go @@ -22,7 +22,7 @@ package cli import ( "fmt" "io" - "juno/pkg/proto" + "github.com/paypal/junodb/pkg/proto" ) type RecordInfo struct { diff --git a/internal/cli/tracker.go b/internal/cli/tracker.go index 54a30021..28af2b13 100644 --- a/internal/cli/tracker.go +++ b/internal/cli/tracker.go @@ -23,9 +23,9 @@ import ( "fmt" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/util" ) type PendingRequest struct { diff --git a/pkg/cfg/cfg.go b/pkg/cfg/cfg.go index fb2eb5f1..fdaeca59 100644 --- a/pkg/cfg/cfg.go +++ b/pkg/cfg/cfg.go @@ -29,7 +29,7 @@ import ( "github.com/BurntSushi/toml" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) type ( diff --git a/pkg/client/clientimpl.go b/pkg/client/clientimpl.go index 0648fd65..7ab57804 100644 --- a/pkg/client/clientimpl.go +++ b/pkg/client/clientimpl.go @@ -17,20 +17,22 @@ // limitations under the License. // +// Package client provides interfaces and implementations for communicating with a Juno server. package client import ( "fmt" "runtime" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/internal/cli" - "juno/pkg/io" - "juno/pkg/logging" - "juno/pkg/proto" + "github.com/paypal/junodb/internal/cli" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/proto" ) +// clientImplT is the default implementation of the IClient interface. type clientImplT struct { config Config appName string @@ -38,6 +40,7 @@ type clientImplT struct { processor *cli.Processor } +// newProcessorWithConfig initializes a new Processor with the given configuration. func newProcessorWithConfig(conf *Config) *cli.Processor { if conf == nil { return nil @@ -51,6 +54,7 @@ func newProcessorWithConfig(conf *Config) *cli.Processor { return c } +// New initializes a new IClient with the given configuration. Returns an error if configuration validation fails. func New(conf Config) (IClient, error) { if err := conf.validate(); err != nil { return nil, err @@ -68,6 +72,7 @@ func New(conf Config) (IClient, error) { return client, nil } +// NewClient initializes a new IClient with the provided server address, namespace and app name. func NewClient(server string, ns string, app string) (IClient, error) { c := &clientImplT{ config: Config{ @@ -99,6 +104,8 @@ func NewClient(server string, ns string, app string) (IClient, error) { } ///TODO to revisit + +// Close closes the client and cleans up resources. func (c *clientImplT) Close() { if c.processor != nil { c.processor.Close() @@ -106,6 +113,7 @@ func (c *clientImplT) Close() { } } +// getOptions collects all provided options into an optionData object. func (c *clientImplT) getOptions(opts ...IOption) *optionData { data := &optionData{} for _, op := range opts { @@ -114,12 +122,14 @@ func (c *clientImplT) getOptions(opts ...IOption) *optionData { return data } +// newContext creates a new context from the provided operational message. func newContext(resp *proto.OperationalMessage) IContext { recInfo := &cli.RecordInfo{} recInfo.SetFromOpMsg(resp) return recInfo } +// Create sends a Create operation request to the server. func (c *clientImplT) Create(key []byte, value []byte, opts ...IOption) (context IContext, err error) { glog.Verbosef("Create ") var resp *proto.OperationalMessage @@ -138,6 +148,7 @@ func (c *clientImplT) Create(key []byte, value []byte, opts ...IOption) (context return } +// Get sends a Get operation request to the server. func (c *clientImplT) Get(key []byte, opts ...IOption) (value []byte, context IContext, err error) { var resp *proto.OperationalMessage options := newOptionData(opts...) @@ -161,6 +172,7 @@ func (c *clientImplT) Get(key []byte, opts ...IOption) (value []byte, context IC return } +// Update sends an Update operation request to the server. func (c *clientImplT) Update(key []byte, value []byte, opts ...IOption) (context IContext, err error) { var resp *proto.OperationalMessage options := newOptionData(opts...) @@ -183,6 +195,7 @@ func (c *clientImplT) Update(key []byte, value []byte, opts ...IOption) (context return } +// Set sends a Set operation request to the server. func (c *clientImplT) Set(key []byte, value []byte, opts ...IOption) (context IContext, err error) { var resp *proto.OperationalMessage options := newOptionData(opts...) @@ -200,6 +213,7 @@ func (c *clientImplT) Set(key []byte, value []byte, opts ...IOption) (context IC return } +// Destroy sends a Destroy operation request to the server. func (c *clientImplT) Destroy(key []byte, opts ...IOption) (err error) { var resp *proto.OperationalMessage options := newOptionData(opts...) @@ -215,6 +229,7 @@ func (c *clientImplT) Destroy(key []byte, opts ...IOption) (err error) { return } +// UDFGet sends a UDFGet operation request to the server. func (c *clientImplT) UDFGet(key []byte, fname []byte, params []byte, opts ...IOption) (value []byte, context IContext, err error) { var resp *proto.OperationalMessage options := newOptionData(opts...) @@ -239,6 +254,7 @@ func (c *clientImplT) UDFGet(key []byte, fname []byte, params []byte, opts ...IO return } +// UDFSet sends a UDFSet operation request to the server. func (c *clientImplT) UDFSet(key []byte, fname []byte, params []byte, opts ...IOption) (context IContext, err error) { var resp *proto.OperationalMessage options := newOptionData(opts...) @@ -258,10 +274,13 @@ func (c *clientImplT) UDFSet(key []byte, fname []byte, params []byte, opts ...IO } ///TODO temporary + +// Batch sends a batch of operation requests to the server. func (c *clientImplT) Batch(requests []*proto.OperationalMessage) (responses []*proto.OperationalMessage, err error) { return c.processor.ProcessBatchRequests(requests) } +// NewRequest creates a new OperationalMessage with the provided parameters. func (c *clientImplT) NewRequest(op proto.OpCode, key []byte, value []byte, ttl uint32) (request *proto.OperationalMessage) { ///TODO: validate op request = &proto.OperationalMessage{} @@ -272,6 +291,7 @@ func (c *clientImplT) NewRequest(op proto.OpCode, key []byte, value []byte, ttl return } +// NewUDFRequest creates a new UDF OperationalMessage with the provided parameters. func (c *clientImplT) NewUDFRequest(op proto.OpCode, key []byte, fname []byte, params []byte, ttl uint32) (request *proto.OperationalMessage) { ///TODO: validate op request = &proto.OperationalMessage{} @@ -284,6 +304,7 @@ func (c *clientImplT) NewUDFRequest(op proto.OpCode, key []byte, fname []byte, p return } +// checkResponse validates the response from the server against the original request. func checkResponse(request *proto.OperationalMessage, response *proto.OperationalMessage, recInfo *cli.RecordInfo) (err error) { opCode := request.GetOpCode() if opCode != response.GetOpCode() { diff --git a/pkg/client/config.go b/pkg/client/config.go index 22a4d90e..860cf076 100644 --- a/pkg/client/config.go +++ b/pkg/client/config.go @@ -1,47 +1,49 @@ +// Copyright 2023 PayPal Inc. // -// Copyright 2023 PayPal Inc. -// -// Licensed to the Apache Software Foundation (ASF) under one or more -// contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. -// The ASF licenses this file to You under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with -// the License. You may obtain a copy of the License at +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// Package client handles the configuration for a Juno client. package client import ( "fmt" "time" - "juno/pkg/io" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/util" ) +// Duration is a type alias for util.Duration. type Duration = util.Duration +// Config holds the configuration values for the Juno client. type Config struct { - Server io.ServiceEndpoint - Appname string - Namespace string - RetryCount int - DefaultTimeToLive int - ConnectTimeout Duration - ReadTimeout Duration - WriteTimeout Duration - RequestTimeout Duration - ConnRecycleTimeout Duration + Server io.ServiceEndpoint // Server defines the ServiceEndpoint of the Juno server. + Appname string // Appname is the name of the application. + Namespace string // Namespace is the namespace of the application. + RetryCount int // RetryCount is the maximum number of retries. + DefaultTimeToLive int // DefaultTimeToLive is the default TTL (time to live) for requests. + ConnectTimeout Duration // ConnectTimeout is the timeout for establishing connections. + ReadTimeout Duration // ReadTimeout is the timeout for read operations. + WriteTimeout Duration // WriteTimeout is the timeout for write operations. + RequestTimeout Duration // RequestTimeout is the timeout for each request. + ConnRecycleTimeout Duration // ConnRecycleTimeout is the timeout for connection recycling. } +// defaultConfig defines the default configuration values. var defaultConfig = Config{ RetryCount: 1, DefaultTimeToLive: 1800, @@ -52,10 +54,12 @@ var defaultConfig = Config{ ConnRecycleTimeout: Duration{9 * time.Second}, } +// SetDefaultTimeToLive sets the default time to live (TTL) for the configuration. func SetDefaultTimeToLive(ttl int) { defaultConfig.DefaultTimeToLive = ttl } +// SetDefaultTimeout sets the default timeout durations for the configuration. func SetDefaultTimeout(connect, read, write, request, connRecycle time.Duration) { defaultConfig.ConnectTimeout.Duration = connect defaultConfig.ReadTimeout.Duration = read @@ -64,10 +68,14 @@ func SetDefaultTimeout(connect, read, write, request, connRecycle time.Duration) defaultConfig.ConnRecycleTimeout.Duration = connRecycle } +// SetDefault updates the current Config to match the default Config. func (c *Config) SetDefault() { *c = defaultConfig } +// validate checks if the required fields of the Config are correctly populated. +// It validates the Server field and checks if Appname and Namespace are specified. +// It returns an error if any of the above conditions are not met. func (c *Config) validate() error { if err := c.Server.Validate(); err != nil { return err @@ -78,6 +86,6 @@ func (c *Config) validate() error { if len(c.Namespace) == 0 { return fmt.Errorf("Config.Namespace not specified.") } - /// TODO to validate others + // TODO to validate others return nil } diff --git a/pkg/client/error.go b/pkg/client/error.go index 18c7332b..5dd6991f 100644 --- a/pkg/client/error.go +++ b/pkg/client/error.go @@ -17,61 +17,66 @@ // limitations under the License. // +// client is a package that handles various error situations in the Juno application. package client import ( - "juno/internal/cli" - "juno/pkg/proto" + "github.com/paypal/junodb/internal/cli" + "github.com/paypal/junodb/pkg/proto" ) +// Error variables for different scenarios in the application. var ( - ErrNoKey error - ErrUniqueKeyViolation error - ErrBadParam error - ErrConditionViolation error + ErrNoKey error // Error when no key is found. + ErrUniqueKeyViolation error // Error when there is a violation of a unique key. + ErrBadParam error // Error when a bad parameter is provided. + ErrConditionViolation error // Error when a condition violation occurs. - ErrBadMsg error - ErrNoStorage error - ErrRecordLocked error - ErrTTLExtendFailure error - ErrBusy error + ErrBadMsg error // Error when a bad message is encountered. + ErrNoStorage error // Error when no storage is available. + ErrRecordLocked error // Error when a record is locked. + ErrTTLExtendFailure error // Error when TTL extension fails. + ErrBusy error // Error when the server is busy. - ErrWriteFailure error - ErrInternal error - ErrOpNotSupported error + ErrWriteFailure error // Error when a write operation fails. + ErrInternal error // Error when an internal problem occurs. + ErrOpNotSupported error // Error when the operation is not supported. ) +// errorMapping is a map between different operation status and their corresponding errors. var errorMapping map[proto.OpStatus]error +// init function initializes the error variables and the errorMapping map. func init() { - ErrNoKey = &cli.Error{"no key"} - ErrUniqueKeyViolation = &cli.Error{"unique key violation"} - ErrBadParam = &cli.Error{"bad parameter"} - ErrConditionViolation = &cli.Error{"condition violation"} //version too old - ErrTTLExtendFailure = &cli.Error{"fail to extend TTL"} + ErrNoKey = &cli.Error{"no key"} // Error when the key does not exist. + ErrUniqueKeyViolation = &cli.Error{"unique key violation"} // Error when unique key constraint is violated. + ErrBadParam = &cli.Error{"bad parameter"} // Error when a bad parameter is passed. + ErrConditionViolation = &cli.Error{"condition violation"} // Error when there is a condition violation. + ErrTTLExtendFailure = &cli.Error{"fail to extend TTL"} // Error when TTL extension fails. - ErrBadMsg = &cli.RetryableError{"bad message"} - ErrNoStorage = &cli.RetryableError{"no storage"} - ErrRecordLocked = &cli.RetryableError{"record locked"} - ErrBusy = &cli.RetryableError{"server busy"} + ErrBadMsg = &cli.RetryableError{"bad message"} // Error when an inappropriate message is received. + ErrNoStorage = &cli.RetryableError{"no storage"} // Error when there is no storage available. + ErrRecordLocked = &cli.RetryableError{"record locked"} // Error when a record is locked. + ErrBusy = &cli.RetryableError{"server busy"} // Error when the server is busy. - ErrWriteFailure = &cli.Error{"write failure"} - ErrInternal = &cli.Error{"internal error"} - ErrOpNotSupported = &cli.Error{"Op not supported"} + ErrWriteFailure = &cli.Error{"write failure"} // Error when a write operation fails. + ErrInternal = &cli.Error{"internal error"} // Error when an internal error occurs. + ErrOpNotSupported = &cli.Error{"Op not supported"} // Error when the operation is not supported. + // Mapping between the operation status and the corresponding errors. errorMapping = map[proto.OpStatus]error{ - proto.OpStatusNoError: nil, - proto.OpStatusInconsistent: nil, - proto.OpStatusBadMsg: ErrBadMsg, - proto.OpStatusNoKey: ErrNoKey, - proto.OpStatusDupKey: ErrUniqueKeyViolation, - proto.OpStatusNoStorageServer: ErrNoStorage, - proto.OpStatusBadParam: ErrBadParam, - proto.OpStatusRecordLocked: ErrRecordLocked, - proto.OpStatusVersionConflict: ErrConditionViolation, - proto.OpStatusSSReadTTLExtendErr: ErrTTLExtendFailure, - proto.OpStatusCommitFailure: ErrWriteFailure, - proto.OpStatusBusy: ErrBusy, - proto.OpStatusNotSupported: ErrOpNotSupported, + proto.OpStatusNoError: nil, // Status when there is no error. + proto.OpStatusInconsistent: nil, // Status when there is an inconsistency. + proto.OpStatusBadMsg: ErrBadMsg, // Status when a bad message is received. + proto.OpStatusNoKey: ErrNoKey, // Status when the key is not present. + proto.OpStatusDupKey: ErrUniqueKeyViolation, // Status when unique key constraint is violated. + proto.OpStatusNoStorageServer: ErrNoStorage, // Status when there is no storage server available. + proto.OpStatusBadParam: ErrBadParam, // Status when a bad parameter is passed. + proto.OpStatusRecordLocked: ErrRecordLocked, // Status when a record is locked. + proto.OpStatusVersionConflict: ErrConditionViolation, // Status when there is a version conflict. + proto.OpStatusSSReadTTLExtendErr: ErrTTLExtendFailure, // Status when TTL extension fails. + proto.OpStatusCommitFailure: ErrWriteFailure, // Status when a commit operation fails. + proto.OpStatusBusy: ErrBusy, // Status when the server is busy. + proto.OpStatusNotSupported: ErrOpNotSupported, // Status when the operation is not supported. } } diff --git a/pkg/client/example_test.go b/pkg/client/example_test.go index ebb7a991..2e1a8985 100644 --- a/pkg/client/example_test.go +++ b/pkg/client/example_test.go @@ -22,7 +22,7 @@ package client_test import ( "fmt" - "juno/pkg/client" + "github.com/paypal/junodb/pkg/client" ) func Example_config() { diff --git a/pkg/client/option.go b/pkg/client/option.go index 849400b2..2e77f42c 100644 --- a/pkg/client/option.go +++ b/pkg/client/option.go @@ -17,16 +17,19 @@ // limitations under the License. // +// Package client provides functionalities for client configurations. package client import () +// optionData struct contains client options. type optionData struct { - ttl uint32 - context IContext - correlationId string + ttl uint32 // Time to live value. + context IContext // Client context. + correlationId string // Correlation ID for tracking. } +// IOption type represents a function that applies options on optionData. //type IOption interface { // Apply(data *optionData) error //} @@ -46,34 +49,41 @@ type optionData struct { type IOption func(data interface{}) +// WithTTL function returns an IOption that sets a TTL value. func WithTTL(ttl uint32) IOption { return func(i interface{}) { + // Check if the passed interface can be casted to *optionData if data, ok := i.(*optionData); ok { - data.ttl = ttl + data.ttl = ttl // Set the TTL value. } } } +// WithCond function returns an IOption that sets a context. func WithCond(context IContext) IOption { return func(i interface{}) { + // Check if the passed interface can be casted to *optionData if data, ok := i.(*optionData); ok { - data.context = context + data.context = context // Set the context. } } } +// WithCorrelationId function returns an IOption that sets a correlationId. func WithCorrelationId(id string) IOption { return func(i interface{}) { + // Check if the passed interface can be casted to *optionData if data, ok := i.(*optionData); ok { - data.correlationId = id + data.correlationId = id // Set the correlation ID. } } } +// newOptionData function applies the options passed in and returns an initialized optionData. func newOptionData(opts ...IOption) *optionData { - data := &optionData{} + data := &optionData{} // Initialize a new optionData. for _, op := range opts { - op(data) + op(data) // Apply each option on the optionData. } - return data + return data // Return the initialized optionData. } diff --git a/pkg/cluster/cluster.go b/pkg/cluster/cluster.go index 3b0827d7..57087fbe 100644 --- a/pkg/cluster/cluster.go +++ b/pkg/cluster/cluster.go @@ -32,7 +32,7 @@ import ( "syscall" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" "github.com/BurntSushi/toml" ) diff --git a/pkg/cluster/clusterstats.go b/pkg/cluster/clusterstats.go index e7982d57..058c4209 100644 --- a/pkg/cluster/clusterstats.go +++ b/pkg/cluster/clusterstats.go @@ -24,10 +24,10 @@ import ( "strings" "sync" "time" + "github.com/paypal/junodb/pkg/util" + "github.com/paypal/junodb/third_party/forked/golang/glog" + "github.com/paypal/junodb/pkg/logging/otel" - "juno/pkg/logging/otel" - "juno/pkg/util" - "juno/third_party/forked/golang/glog" ) type ProcStat struct { diff --git a/pkg/cluster/lock_linux.go b/pkg/cluster/lock_linux.go index e9188f3d..2c541515 100644 --- a/pkg/cluster/lock_linux.go +++ b/pkg/cluster/lock_linux.go @@ -20,8 +20,9 @@ package cluster import ( - "juno/third_party/forked/golang/glog" "syscall" + + "github.com/paypal/junodb/third_party/forked/golang/glog" ) func lockFile(fd int, mode int) bool { diff --git a/pkg/cluster/node.go b/pkg/cluster/node.go index 5451ce86..d9ed0c6c 100644 --- a/pkg/cluster/node.go +++ b/pkg/cluster/node.go @@ -26,7 +26,7 @@ import ( "strconv" "strings" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) // Node class represent a logic node diff --git a/pkg/cluster/shardmgr.go b/pkg/cluster/shardmgr.go index e243f3eb..78fa381b 100644 --- a/pkg/cluster/shardmgr.go +++ b/pkg/cluster/shardmgr.go @@ -28,14 +28,14 @@ import ( "sync/atomic" "time" - "juno/third_party/forked/golang/glog" - - "juno/pkg/io" - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/logging/otel" - "juno/pkg/shard" - "juno/pkg/util" + "github.com/paypal/junodb/third_party/forked/golang/glog" + + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/logging/otel" + "github.com/paypal/junodb/pkg/shard" + "github.com/paypal/junodb/pkg/util" ) var ( @@ -338,8 +338,8 @@ func (p *ShardManager) GetSSProcessor(zoneId int, nodeId int) *OutboundSSProcess return p.processors[zoneId][nodeId] } -//used by request processor -//the caller's responsibility to make sure +// used by request processor +// the caller's responsibility to make sure // cap(procs) >= numZones and cap(pos) >= numZones func (p *ShardManager) GetSSProcessors(key []byte, confNumWrites int, procs []*OutboundSSProcessor, pos []int) (shardId shard.ID, numProcs int) { diff --git a/pkg/cluster/util.go b/pkg/cluster/util.go index 50f3220d..50c9f0cb 100644 --- a/pkg/cluster/util.go +++ b/pkg/cluster/util.go @@ -22,7 +22,7 @@ package cluster import ( "fmt" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) func DisplayZones(zones []*Zone, header string) { diff --git a/pkg/cluster/zone.go b/pkg/cluster/zone.go index 0de13647..7fa97aca 100644 --- a/pkg/cluster/zone.go +++ b/pkg/cluster/zone.go @@ -23,7 +23,7 @@ import ( "fmt" "sort" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) // Node class represent a logic node diff --git a/pkg/cmd/cmd.go b/pkg/cmd/cmd.go index 2859cb76..aa405968 100644 --- a/pkg/cmd/cmd.go +++ b/pkg/cmd/cmd.go @@ -30,9 +30,9 @@ import ( "strings" "text/tabwriter" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/version" + "github.com/paypal/junodb/pkg/version" ) var ( diff --git a/pkg/etcd/config.go b/pkg/etcd/config.go index a89f4c62..0aea1c02 100644 --- a/pkg/etcd/config.go +++ b/pkg/etcd/config.go @@ -24,7 +24,7 @@ import ( clientv3 "go.etcd.io/etcd/client/v3" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/util" ) var ( diff --git a/pkg/etcd/etcd.go b/pkg/etcd/etcd.go index 8fdd8d19..65e0d1d6 100644 --- a/pkg/etcd/etcd.go +++ b/pkg/etcd/etcd.go @@ -21,8 +21,9 @@ package etcd import ( "errors" - "juno/third_party/forked/golang/glog" "sync" + + "github.com/paypal/junodb/third_party/forked/golang/glog" ) var ( diff --git a/pkg/etcd/etcdclient.go b/pkg/etcd/etcdclient.go index 770c7de2..26c873b4 100644 --- a/pkg/etcd/etcdclient.go +++ b/pkg/etcd/etcdclient.go @@ -32,7 +32,7 @@ import ( clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/client/v3/namespace" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) var ( diff --git a/pkg/etcd/etcdreader.go b/pkg/etcd/etcdreader.go index 00cead95..93bb0db9 100644 --- a/pkg/etcd/etcdreader.go +++ b/pkg/etcd/etcdreader.go @@ -28,11 +28,11 @@ import ( "strings" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/cluster" - "juno/pkg/shard" - "juno/pkg/stats/redist" + "github.com/paypal/junodb/pkg/cluster" + "github.com/paypal/junodb/pkg/shard" + "github.com/paypal/junodb/pkg/stats/redist" ) // Implements cluster.IReader diff --git a/pkg/etcd/etcdwriter.go b/pkg/etcd/etcdwriter.go index 5bf10b10..d9a963c2 100644 --- a/pkg/etcd/etcdwriter.go +++ b/pkg/etcd/etcdwriter.go @@ -25,9 +25,9 @@ import ( "strconv" "strings" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/cluster" + "github.com/paypal/junodb/pkg/cluster" ) type IKVWriter interface { diff --git a/pkg/initmgr/init.go b/pkg/initmgr/init.go index 01092d9b..1818b276 100644 --- a/pkg/initmgr/init.go +++ b/pkg/initmgr/init.go @@ -32,8 +32,8 @@ import ( "syscall" "time" - "juno/pkg/logging" - "juno/pkg/logging/cal" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" ) var ( diff --git a/pkg/io/conn.go b/pkg/io/conn.go index 68b5763d..e5f98eb3 100644 --- a/pkg/io/conn.go +++ b/pkg/io/conn.go @@ -24,12 +24,12 @@ import ( "net" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/logging/otel" - "juno/pkg/sec" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/logging/otel" + "github.com/paypal/junodb/pkg/sec" ) type Conn interface { diff --git a/pkg/io/connmgr.go b/pkg/io/connmgr.go index f44f1c6a..c2250841 100644 --- a/pkg/io/connmgr.go +++ b/pkg/io/connmgr.go @@ -23,7 +23,7 @@ import ( "sync" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) type InboundConnManager struct { diff --git a/pkg/io/inboundconnector.go b/pkg/io/inboundconnector.go index 219f4582..bc477cd0 100644 --- a/pkg/io/inboundconnector.go +++ b/pkg/io/inboundconnector.go @@ -29,14 +29,13 @@ import ( "sync/atomic" "time" - "juno/third_party/forked/golang/glog" - - "juno/pkg/debug" - "juno/pkg/io/ioutil" - "juno/pkg/logging/cal" - "juno/pkg/logging/otel" - "juno/pkg/proto" - "juno/pkg/util" + "github.com/paypal/junodb/third_party/forked/golang/glog" + "github.com/paypal/junodb/pkg/debug" + "github.com/paypal/junodb/pkg/io/ioutil" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/util" + "github.com/paypal/junodb/pkg/logging/otel" ) type Connector struct { diff --git a/pkg/io/ioconfig.go b/pkg/io/ioconfig.go index 107b8253..6aae8148 100644 --- a/pkg/io/ioconfig.go +++ b/pkg/io/ioconfig.go @@ -22,7 +22,7 @@ package io import ( "time" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/util" ) var ( diff --git a/pkg/io/ioutil/logerr.go b/pkg/io/ioutil/logerr.go index 5af8f8f5..63568e48 100644 --- a/pkg/io/ioutil/logerr.go +++ b/pkg/io/ioutil/logerr.go @@ -25,7 +25,7 @@ import ( "os" "syscall" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) func LogError(err error) { diff --git a/pkg/io/listener.go b/pkg/io/listener.go index 2224fdf8..ae43d305 100644 --- a/pkg/io/listener.go +++ b/pkg/io/listener.go @@ -25,10 +25,10 @@ import ( "os" "time" - "juno/pkg/logging/cal" - "juno/pkg/logging/otel" - "juno/pkg/util" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/logging/otel" + "github.com/paypal/junodb/pkg/util" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) const ( diff --git a/pkg/io/mayflyreqctx.go b/pkg/io/mayflyreqctx.go index 8cf0a1f7..386896f9 100644 --- a/pkg/io/mayflyreqctx.go +++ b/pkg/io/mayflyreqctx.go @@ -26,13 +26,13 @@ import ( "io" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/proto" - "juno/pkg/proto/mayfly" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/proto/mayfly" + "github.com/paypal/junodb/pkg/util" ) type ( diff --git a/pkg/io/outboundconnector.go b/pkg/io/outboundconnector.go index db737560..5449405d 100644 --- a/pkg/io/outboundconnector.go +++ b/pkg/io/outboundconnector.go @@ -31,13 +31,13 @@ import ( "sync/atomic" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/io/ioutil" - "juno/pkg/logging/cal" - "juno/pkg/proto" - "juno/pkg/proto/mayfly" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/io/ioutil" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/proto/mayfly" + "github.com/paypal/junodb/pkg/util" ) const ( diff --git a/pkg/io/outboundprocessor.go b/pkg/io/outboundprocessor.go index 601ac86e..102299a1 100644 --- a/pkg/io/outboundprocessor.go +++ b/pkg/io/outboundprocessor.go @@ -28,14 +28,14 @@ import ( "sync/atomic" "time" - "juno/third_party/forked/golang/glog" - - "juno/pkg/errors" - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/logging/otel" - "juno/pkg/proto" - "juno/pkg/util" + "github.com/paypal/junodb/third_party/forked/golang/glog" + + "github.com/paypal/junodb/pkg/errors" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/logging/otel" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/util" ) type ( @@ -114,9 +114,7 @@ func (p *OutboundProcessor) GetRequestCh() chan IRequestContext { return p.reqCh } -// // Non-blocking send -// func (p *OutboundProcessor) sendRequest(req IRequestContext) (err *errors.Error) { // send request select { diff --git a/pkg/io/requestcontext.go b/pkg/io/requestcontext.go index 25c06f24..96cf9cd5 100644 --- a/pkg/io/requestcontext.go +++ b/pkg/io/requestcontext.go @@ -26,11 +26,11 @@ import ( "io" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/proto" - "juno/pkg/proto/mayfly" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/proto/mayfly" + "github.com/paypal/junodb/pkg/util" ) var oResponsePool = util.NewChanPool(10000, func() interface{} { diff --git a/pkg/io/ssllistener.go b/pkg/io/ssllistener.go index 1cf669ad..157411fc 100644 --- a/pkg/io/ssllistener.go +++ b/pkg/io/ssllistener.go @@ -26,12 +26,11 @@ import ( "syscall" "time" - "juno/third_party/forked/golang/glog" - - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/logging/otel" - "juno/pkg/sec" + "github.com/paypal/junodb/third_party/forked/golang/glog" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/sec" + "github.com/paypal/junodb/pkg/logging/otel" ) type SslListener struct { diff --git a/pkg/logging/cal/config/calconfig.go b/pkg/logging/cal/config/calconfig.go index 993c8471..12cf3dc0 100644 --- a/pkg/logging/cal/config/calconfig.go +++ b/pkg/logging/cal/config/calconfig.go @@ -20,7 +20,7 @@ package config import ( - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) var CalConfig *Config diff --git a/pkg/logging/cal/logger.go b/pkg/logging/cal/logger.go index d0a8b4a6..dcd6cb49 100644 --- a/pkg/logging/cal/logger.go +++ b/pkg/logging/cal/logger.go @@ -27,11 +27,11 @@ import ( "strings" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/logging/cal/config" - "juno/pkg/logging/cal/net/io" - "juno/pkg/logging/cal/net/protocol" + "github.com/paypal/junodb/pkg/logging/cal/config" + "github.com/paypal/junodb/pkg/logging/cal/net/io" + "github.com/paypal/junodb/pkg/logging/cal/net/protocol" ) // CAL message Status field values @@ -126,7 +126,7 @@ func LogAtomicTransaction(txnType, eventName, status string, duration time.Durat client.Send(msg) } -//SendEvent logs an event of eventType with a sub-classification of +// SendEvent logs an event of eventType with a sub-classification of // eventName. The event may optionally contain extra eventData. func LogEvent(eventType, eventName, status string, eventData map[string]interface{}) { // TODO guard against bad eventType/eventName (perhaps in NewMsg()) diff --git a/pkg/logging/cal/net/io/client.go b/pkg/logging/cal/net/io/client.go index a735200e..38137347 100644 --- a/pkg/logging/cal/net/io/client.go +++ b/pkg/logging/cal/net/io/client.go @@ -32,11 +32,11 @@ import ( "sync/atomic" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/logging/cal/config" - "juno/pkg/logging/cal/net/protocol" - "juno/pkg/logging/cal/util" + "github.com/paypal/junodb/pkg/logging/cal/config" + "github.com/paypal/junodb/pkg/logging/cal/net/protocol" + "github.com/paypal/junodb/pkg/logging/cal/util" ) var logFile *os.File @@ -259,9 +259,7 @@ func (c *client) sendFileLoop() { } } -// // Sender need to make should not send message after Shutdown() -// func (c *client) Send(m *protocol.CalMessage) { if m == nil { glog.V(2).Info("Cal: Message can not be nil.") @@ -282,7 +280,7 @@ func (c *client) Send(m *protocol.CalMessage) { } } -//If you close client connection you wouldnt be able to log anything using logger. +// If you close client connection you wouldnt be able to log anything using logger. // This should be called when parent process Shutdown. func (c *client) Shutdown() { c.closeOnce.Do(func() { @@ -307,7 +305,7 @@ func (c *client) Shutdown() { }) } -//Flush blocks till the messages are processed by the channel +// Flush blocks till the messages are processed by the channel func (c *client) Flush() { c.wg.Wait() if logFile != nil { diff --git a/pkg/logging/cal/net/io/clientapi.go b/pkg/logging/cal/net/io/clientapi.go index fd0155ef..c9105393 100644 --- a/pkg/logging/cal/net/io/clientapi.go +++ b/pkg/logging/cal/net/io/clientapi.go @@ -21,10 +21,11 @@ package io import ( "bufio" - "juno/pkg/logging/cal/net/protocol" "net" "sync" "sync/atomic" + + "github.com/paypal/junodb/pkg/logging/cal/net/protocol" ) // Client is a CAL client. It is used to configure and organize diff --git a/pkg/logging/cal/net/protocol/message.go b/pkg/logging/cal/net/protocol/message.go index f096318c..1ebb2896 100644 --- a/pkg/logging/cal/net/protocol/message.go +++ b/pkg/logging/cal/net/protocol/message.go @@ -22,11 +22,12 @@ package protocol import ( "bytes" "fmt" - "juno/third_party/forked/golang/glog" "strconv" "strings" "time" "unicode" + + "github.com/paypal/junodb/third_party/forked/golang/glog" ) // Msg is a single log message. diff --git a/pkg/logging/cal/test/main.go b/pkg/logging/cal/test/main.go index 9d107065..75b2e0fb 100644 --- a/pkg/logging/cal/test/main.go +++ b/pkg/logging/cal/test/main.go @@ -20,21 +20,21 @@ package main import ( - "juno/pkg/logging/cal" - logger "juno/pkg/logging/cal" - "juno/pkg/logging/cal/config" + "github.com/paypal/junodb/pkg/logging/cal" + logger "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/logging/cal/config" "github.com/BurntSushi/toml" - //"juno/pkg/logging/cal/config" + //"github.com/paypal/junodb/pkg/logging/cal/config" "flag" "fmt" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" //"io" // "log" - //"juno/pkg/logging/cal/net/protocol" + //"github.com/paypal/junodb/pkg/logging/cal/net/protocol" //"os" // "runtime" // "net/http" diff --git a/pkg/logging/cal/util/util.go b/pkg/logging/cal/util/util.go index c5760ea0..c2919beb 100644 --- a/pkg/logging/cal/util/util.go +++ b/pkg/logging/cal/util/util.go @@ -22,13 +22,14 @@ package util import ( "fmt" "hash/fnv" - "juno/pkg/logging/cal/net/protocol" "net" "os" "path" "runtime" "strconv" "time" + + "github.com/paypal/junodb/pkg/logging/cal/net/protocol" ) const ( diff --git a/pkg/logging/calstatus.go b/pkg/logging/calstatus.go index 8ff37d8a..4e89d1f7 100644 --- a/pkg/logging/calstatus.go +++ b/pkg/logging/calstatus.go @@ -20,8 +20,8 @@ package logging import ( - "juno/pkg/logging/cal" - "juno/pkg/proto" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/proto" ) type Status int diff --git a/pkg/logging/logging.go b/pkg/logging/logging.go index 061cc7bd..b219aeec 100644 --- a/pkg/logging/logging.go +++ b/pkg/logging/logging.go @@ -26,11 +26,11 @@ import ( "strconv" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/logging/cal" - "juno/pkg/proto" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/util" ) type KeyValueBuffer struct { @@ -360,7 +360,7 @@ func (b *KeyValueBuffer) AddOpRequestInfo(request *proto.OperationalMessage) *Ke return b } -//difference from AddOpRequestInfo(): namespace and key not logged +// difference from AddOpRequestInfo(): namespace and key not logged func (b *KeyValueBuffer) AddOpRequest(request *proto.OperationalMessage) *KeyValueBuffer { b.Add(logDataKeyRid, request.GetRequestIDString()) reqParam := &KeyValueBuffer{delimiter: ':', pairDelimiter: '|'} diff --git a/pkg/logging/otel/config/otelconfig.go b/pkg/logging/otel/config/otelconfig.go index 438cec7d..6f305c11 100644 --- a/pkg/logging/otel/config/otelconfig.go +++ b/pkg/logging/otel/config/otelconfig.go @@ -1,25 +1,23 @@ +// Copyright 2023 PayPal Inc. // -// Copyright 2023 PayPal Inc. +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at // -// Licensed to the Apache Software Foundation (ASF) under one or more -// contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. -// The ASF licenses this file to You under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with -// the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// http://www.apache.org/licenses/LICENSE-2.0 // +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package config import ( - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) var OtelConfig *Config diff --git a/pkg/logging/otel/logger.go b/pkg/logging/otel/logger.go index e9bbb278..e226be8b 100644 --- a/pkg/logging/otel/logger.go +++ b/pkg/logging/otel/logger.go @@ -1,21 +1,19 @@ +// Copyright 2023 PayPal Inc. // -// Copyright 2023 PayPal Inc. +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at // -// Licensed to the Apache Software Foundation (ASF) under one or more -// contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. -// The ASF licenses this file to You under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with -// the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// http://www.apache.org/licenses/LICENSE-2.0 // +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package otel import ( @@ -27,10 +25,10 @@ import ( "time" - "juno/pkg/logging" - otelCfg "juno/pkg/logging/otel/config" - "juno/pkg/proto" - "juno/third_party/forked/golang/glog" + otelCfg "github.com/paypal/junodb/pkg/logging/otel/config" + "github.com/paypal/junodb/third_party/forked/golang/glog" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/proto" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp" diff --git a/pkg/logging/otel/statsLogger.go b/pkg/logging/otel/statsLogger.go index 8996e68f..a0c9e7e4 100644 --- a/pkg/logging/otel/statsLogger.go +++ b/pkg/logging/otel/statsLogger.go @@ -1,32 +1,32 @@ +// Copyright 2023 PayPal Inc. // -// Copyright 2023 PayPal Inc. +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at // -// Licensed to the Apache Software Foundation (ASF) under one or more -// contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. -// The ASF licenses this file to You under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with -// the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// http://www.apache.org/licenses/LICENSE-2.0 // +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package otel import ( "context" "errors" "fmt" - "juno/pkg/stats" - "juno/third_party/forked/golang/glog" + + "github.com/paypal/junodb/third_party/forked/golang/glog" "runtime" "strconv" + "github.com/paypal/junodb/pkg/stats" + "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/metric" ) diff --git a/pkg/logging/otel/test/logger_test.go b/pkg/logging/otel/test/logger_test.go index 7fad9ded..555ec431 100644 --- a/pkg/logging/otel/test/logger_test.go +++ b/pkg/logging/otel/test/logger_test.go @@ -23,12 +23,12 @@ package otel import ( "fmt" - "juno/pkg/logging/otel" - config "juno/pkg/logging/otel/config" - "juno/pkg/proto" - "juno/pkg/stats" "testing" "time" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/logging/otel" + config "github.com/paypal/junodb/pkg/logging/otel/config" + "github.com/paypal/junodb/pkg/stats" ) var exportinterval int = 10 diff --git a/pkg/net/netutil/netutil.go b/pkg/net/netutil/netutil.go index 03665f71..90c46f8c 100644 --- a/pkg/net/netutil/netutil.go +++ b/pkg/net/netutil/netutil.go @@ -22,7 +22,7 @@ package netutil import ( "net" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) var ( diff --git a/pkg/proto/cryptoks.go b/pkg/proto/cryptoks.go index 71f04d14..8cf9a153 100644 --- a/pkg/proto/cryptoks.go +++ b/pkg/proto/cryptoks.go @@ -24,7 +24,7 @@ import ( "errors" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) type ( diff --git a/pkg/proto/decode.go b/pkg/proto/decode.go index 2273be5d..43baccbe 100644 --- a/pkg/proto/decode.go +++ b/pkg/proto/decode.go @@ -22,9 +22,9 @@ package proto import ( "io" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/util" ) const ( @@ -69,7 +69,7 @@ func (dec *Decoder) Decode(op *OperationalMessage) error { return op.decode(raw, &header, true) } -//Caller's responsibility to have op zeroed +// Caller's responsibility to have op zeroed func (op *OperationalMessage) decode(raw []byte, msgHeader *messageHeaderT, copyData bool) error { offset := 0 szBuf := len(raw) diff --git a/pkg/proto/mayfly/mapping.go b/pkg/proto/mayfly/mapping.go index b9d292c8..f4d8ab99 100644 --- a/pkg/proto/mayfly/mapping.go +++ b/pkg/proto/mayfly/mapping.go @@ -23,9 +23,9 @@ import ( "encoding/binary" "net" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/proto" + "github.com/paypal/junodb/pkg/proto" ) func opCodeToJuno(mfop OpCode) (opcode proto.OpCode, err error) { @@ -69,7 +69,7 @@ func toMayflyOpCode(jop proto.OpCode) (opcode OpCode, err error) { return } -///TODO to be reviewed +// /TODO to be reviewed var opStatusJunoToMayflyMapping []OpStatus = []OpStatus{ OpStatusdNoError, //Ok, 0 OpStatusBadMsg, //BadMsg, 1 diff --git a/pkg/proto/mayfly/msg.go b/pkg/proto/mayfly/msg.go index 97b52762..643af4d7 100644 --- a/pkg/proto/mayfly/msg.go +++ b/pkg/proto/mayfly/msg.go @@ -25,7 +25,7 @@ import ( "fmt" "io" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/util" ) type Msg struct { diff --git a/pkg/proto/mayfly/msg_test.go b/pkg/proto/mayfly/msg_test.go index 46dbca45..1988eff9 100644 --- a/pkg/proto/mayfly/msg_test.go +++ b/pkg/proto/mayfly/msg_test.go @@ -23,7 +23,7 @@ import ( "bytes" "testing" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/util" ) func testRequestResponse(t *testing.T, rawRequest []byte, rawResponse []byte) { diff --git a/pkg/proto/mayfly/opmsg.go b/pkg/proto/mayfly/opmsg.go index a1eddce7..8a3c4b7c 100644 --- a/pkg/proto/mayfly/opmsg.go +++ b/pkg/proto/mayfly/opmsg.go @@ -30,8 +30,8 @@ import ( "sync/atomic" "time" - "juno/pkg/net/netutil" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/net/netutil" + "github.com/paypal/junodb/pkg/util" ) type ( diff --git a/pkg/proto/metaField.go b/pkg/proto/metaField.go index aace1d4c..c5f45776 100644 --- a/pkg/proto/metaField.go +++ b/pkg/proto/metaField.go @@ -18,53 +18,53 @@ // /* - ============================== - *** Predefined Field Types *** - ============================== - - Tag/ID | Field | SizeType - -------+--------------------------------------+------ - 0x01 | TimeToLive | 0x01 - 0x02 | Version | 0x01 - 0x03 | Creation Time | 0x01 - 0x04 | Expiration Time | 0x01 - 0x05 | RequestID/UUID | 0x03 - 0x06 | Source Info | 0 - 0x07 | Last Modification time (nano second) | 0x02 - 0x08 | Originator RequestID/UUID | 0x03 - 0x09 | Correlation ID | 0 - 0x0a | RequestHandlingTime | 0x01 - 0x0b | UDF Name | 0 - -------+--------------------------------------+------ - - - Tag/ID: 0x06 - +-----------------------------------------------------------------------------------------------+ - | 0| 1| 2| 3| 4| 5| 6| 7| 0| 1| 2| 3| 4| 5| 6| 7| 0| 1| 2| 3| 4| 5| 6| 7| 0| 1| 2| 3| 4| 5| 6| 7| - | 0| 1| 2| 3| - +-----------+-----------+--------------------+--+-----------------------+-----------------------+ - | size (include padding)| app name length | T| Port | - +-----------------------+--------------------+--+-----------------------------------------------+ - | IPv4 address if T is 0 or IPv6 address if T is 1 | - +-----------------------------------------------------------------------------------------------+ - | application name, padding to 4-byte aligned | - +-----------------------------------------------------------------------------------------------+ - - Tag/ID: 0x09; 0x0b - +----+------------------------------------------- - | 0 | field size (including padding) - +----+------------------------------------------- - | 1 | octet sequence length - +----+------------------------------------------- - | | octet sequence, padding to 4-byte aligned - +----+------------------------------------------- + ============================== + *** Predefined Field Types *** + ============================== + + Tag/ID | Field | SizeType + -------+--------------------------------------+------ + 0x01 | TimeToLive | 0x01 + 0x02 | Version | 0x01 + 0x03 | Creation Time | 0x01 + 0x04 | Expiration Time | 0x01 + 0x05 | RequestID/UUID | 0x03 + 0x06 | Source Info | 0 + 0x07 | Last Modification time (nano second) | 0x02 + 0x08 | Originator RequestID/UUID | 0x03 + 0x09 | Correlation ID | 0 + 0x0a | RequestHandlingTime | 0x01 + 0x0b | UDF Name | 0 + -------+--------------------------------------+------ + + + Tag/ID: 0x06 + +-----------------------------------------------------------------------------------------------+ + | 0| 1| 2| 3| 4| 5| 6| 7| 0| 1| 2| 3| 4| 5| 6| 7| 0| 1| 2| 3| 4| 5| 6| 7| 0| 1| 2| 3| 4| 5| 6| 7| + | 0| 1| 2| 3| + +-----------+-----------+--------------------+--+-----------------------+-----------------------+ + | size (include padding)| app name length | T| Port | + +-----------------------+--------------------+--+-----------------------------------------------+ + | IPv4 address if T is 0 or IPv6 address if T is 1 | + +-----------------------------------------------------------------------------------------------+ + | application name, padding to 4-byte aligned | + +-----------------------------------------------------------------------------------------------+ + + Tag/ID: 0x09; 0x0b + +----+------------------------------------------- + | 0 | field size (including padding) + +----+------------------------------------------- + | 1 | octet sequence length + +----+------------------------------------------- + | | octet sequence, padding to 4-byte aligned + +----+------------------------------------------- */ package proto import ( "net" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) // Meta Component Field Tag @@ -173,7 +173,7 @@ func (t requestHandlingTimeT) tagAndSizeTypeByte() uint8 { return kFieldTagRequestHandlingTime | kMetaField_4Bytes } -//uint64 meta field +// uint64 meta field func (t uint64T) isSet() bool { return t != 0 } @@ -212,7 +212,7 @@ func (t lastModificationTimeT) tagAndSizeTypeByte() uint8 { return kFieldTagLastModificationTime | kMetaField_8Bytes } -//16-byte meta field +// 16-byte meta field func (t *requestIdBaseT) value() []byte { return t.Bytes() } @@ -270,7 +270,7 @@ func (t *originatorT) tagAndSizeTypeByte() uint8 { return kFieldTagOriginatorRequestID | kMetaField_16Bytes } -//sourceinfo +// sourceinfo func (t *sourceInfoT) isSet() bool { if (len(t.ip) != 0) || (t.port != 0) || (len(t.appName) != 0) { return true @@ -379,7 +379,7 @@ func (t sourceInfoT) tagAndSizeTypeByte() uint8 { return kFieldTagSourceInfo | kMetaFieldVariableSize } -//byte sequence +// byte sequence func (t byteSequenceT) isSet() bool { return len(t) != 0 } diff --git a/pkg/proto/opMsg.go b/pkg/proto/opMsg.go index 74ddd893..f2616587 100644 --- a/pkg/proto/opMsg.go +++ b/pkg/proto/opMsg.go @@ -27,7 +27,7 @@ import ( uuid "github.com/satori/go.uuid" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/util" ) type OperationalMessage struct { diff --git a/pkg/proto/opMsg_test.go b/pkg/proto/opMsg_test.go index 555a03b4..fd4946a4 100644 --- a/pkg/proto/opMsg_test.go +++ b/pkg/proto/opMsg_test.go @@ -23,8 +23,9 @@ import ( "bytes" "encoding/binary" "fmt" - "juno/pkg/util" "testing" + + "github.com/paypal/junodb/pkg/util" ) func testRequestResponse(t *testing.T, rawRequest []byte, rawResponse []byte) { diff --git a/pkg/proto/payload.go b/pkg/proto/payload.go index e1bf4bdf..ae61c152 100644 --- a/pkg/proto/payload.go +++ b/pkg/proto/payload.go @@ -28,9 +28,9 @@ import ( "fmt" "io" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/util" "github.com/golang/snappy" ) @@ -106,7 +106,7 @@ func (p *Payload) SetWithClearValue(value []byte) { p.data = value } -///TODO +// /TODO func (p *Payload) GetClearValue() (value []byte, err error) { if p.GetLength() == 0 { return diff --git a/pkg/proto/rawmessage.go b/pkg/proto/rawmessage.go index 5fb11782..ea2e7e6e 100644 --- a/pkg/proto/rawmessage.go +++ b/pkg/proto/rawmessage.go @@ -23,10 +23,10 @@ import ( "bytes" "io" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/debug" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/debug" + "github.com/paypal/junodb/pkg/util" ) type RawMessage struct { @@ -95,9 +95,7 @@ func (m *RawMessage) allocateBuffer(size int) { m.body = m.buf.Bytes() } -// // Note: read timeout is set at conn level -// func (msg *RawMessage) Read(r io.Reader) (n int, err error) { var hBuffer [kMessageHeaderSize]byte @@ -152,9 +150,7 @@ func (msg *RawMessage) ReadWithHeader(header []byte, r io.Reader) (n int, err er return } -// // Note: this api is not thread safe -// func (m *RawMessage) Write(w io.Writer) (n int, err error) { var mheader [kMessageHeaderSize]byte raw := mheader[:] diff --git a/pkg/sec/certs.go b/pkg/sec/certs.go index cacc680e..fa0b4666 100644 --- a/pkg/sec/certs.go +++ b/pkg/sec/certs.go @@ -20,8 +20,9 @@ package sec import ( - "juno/third_party/forked/golang/glog" "os" + + "github.com/paypal/junodb/third_party/forked/golang/glog" ) type localFileProtectedT struct { diff --git a/pkg/sec/certs_test.go b/pkg/sec/certs_test.go index a1a39e0b..d598b285 100644 --- a/pkg/sec/certs_test.go +++ b/pkg/sec/certs_test.go @@ -20,10 +20,11 @@ package sec import ( - "juno/third_party/forked/golang/glog" "os" "reflect" "testing" + + "github.com/paypal/junodb/third_party/forked/golang/glog" ) // Sample secrets crt, not a real crt diff --git a/pkg/sec/gotlsimpl.go b/pkg/sec/gotlsimpl.go index 67e0d443..07d7a4fa 100644 --- a/pkg/sec/gotlsimpl.go +++ b/pkg/sec/gotlsimpl.go @@ -27,9 +27,10 @@ import ( "time" "crypto/tls" - "juno/third_party/forked/golang/glog" - "juno/pkg/proto" + "github.com/paypal/junodb/third_party/forked/golang/glog" + + "github.com/paypal/junodb/pkg/proto" ) type ( diff --git a/pkg/sec/keystore.go b/pkg/sec/keystore.go index ba29de85..d7728d7e 100644 --- a/pkg/sec/keystore.go +++ b/pkg/sec/keystore.go @@ -23,10 +23,11 @@ import ( "encoding/hex" "errors" "fmt" - "juno/pkg/proto" - "juno/third_party/forked/golang/glog" "time" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/third_party/forked/golang/glog" + "github.com/BurntSushi/toml" ) diff --git a/pkg/sec/keystore_test.go b/pkg/sec/keystore_test.go index 3a8c0389..3e7eb737 100644 --- a/pkg/sec/keystore_test.go +++ b/pkg/sec/keystore_test.go @@ -20,10 +20,11 @@ package sec import ( - "juno/pkg/proto" "os" "reflect" "testing" + + "github.com/paypal/junodb/pkg/proto" ) var tomlData = []byte(`# Sample Keystore diff --git a/pkg/sec/seccfg.go b/pkg/sec/seccfg.go index b57344a2..883d147a 100644 --- a/pkg/sec/seccfg.go +++ b/pkg/sec/seccfg.go @@ -23,7 +23,7 @@ import ( "fmt" "sync/atomic" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) var ( diff --git a/pkg/sec/secinit.go b/pkg/sec/secinit.go index 1817dcc6..4733936c 100644 --- a/pkg/sec/secinit.go +++ b/pkg/sec/secinit.go @@ -23,12 +23,12 @@ import ( "fmt" "sync" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/initmgr" - "juno/pkg/logging" - "juno/pkg/logging/cal" - "juno/pkg/proto" + "github.com/paypal/junodb/pkg/initmgr" + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/proto" ) const ( @@ -60,10 +60,10 @@ var ( type Flag uint8 /* - Two arguments required - arg 0: *Config - arg 1: uint8 bitmask flag - arg 2: isServerManager (optional) +Two arguments required +arg 0: *Config +arg 1: uint8 bitmask flag +arg 2: isServerManager (optional) */ func Initialize(args ...interface{}) (err error) { var cfg *Config diff --git a/pkg/service/servermgr.go b/pkg/service/servermgr.go index 53f0bad6..d6182581 100644 --- a/pkg/service/servermgr.go +++ b/pkg/service/servermgr.go @@ -28,7 +28,7 @@ import ( "strings" "syscall" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) type ( diff --git a/pkg/service/service.go b/pkg/service/service.go index 96629915..2dff0053 100644 --- a/pkg/service/service.go +++ b/pkg/service/service.go @@ -27,10 +27,10 @@ import ( "sync/atomic" "syscall" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/io" - "juno/pkg/logging/cal" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/logging/cal" ) type Service struct { diff --git a/pkg/service/svccfg.go b/pkg/service/svccfg.go index fc808cf5..b1971d01 100644 --- a/pkg/service/svccfg.go +++ b/pkg/service/svccfg.go @@ -24,8 +24,8 @@ import ( "strings" "time" - "juno/pkg/io" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/util" ) const ( diff --git a/pkg/stats/appnsstats.go b/pkg/stats/appnsstats.go index 44230817..9a2ffbe9 100644 --- a/pkg/stats/appnsstats.go +++ b/pkg/stats/appnsstats.go @@ -23,7 +23,7 @@ import ( "sync" "sync/atomic" - "juno/pkg/proto" + "github.com/paypal/junodb/pkg/proto" ) const ( diff --git a/pkg/stats/redist/stats.go b/pkg/stats/redist/stats.go index 8674f88c..02a10b64 100644 --- a/pkg/stats/redist/stats.go +++ b/pkg/stats/redist/stats.go @@ -21,12 +21,13 @@ package redist import ( "fmt" - "juno/pkg/logging" - "juno/pkg/util" "strconv" "strings" "sync/atomic" "time" + + "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/util" ) var ( diff --git a/pkg/stats/sharedstats.go b/pkg/stats/sharedstats.go index 9d9d7e35..2563ec89 100644 --- a/pkg/stats/sharedstats.go +++ b/pkg/stats/sharedstats.go @@ -23,9 +23,9 @@ import ( "fmt" "os" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/shm" + "github.com/paypal/junodb/pkg/shm" ) type ( diff --git a/pkg/stats/statelog.go b/pkg/stats/statelog.go index 214cacd0..0a368273 100644 --- a/pkg/stats/statelog.go +++ b/pkg/stats/statelog.go @@ -28,9 +28,9 @@ import ( "time" "unsafe" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/proto" + "github.com/paypal/junodb/pkg/proto" ) const ( diff --git a/pkg/udf/udfmgr_test.go b/pkg/udf/udfmgr_test.go index d1aca400..ed35ea09 100644 --- a/pkg/udf/udfmgr_test.go +++ b/pkg/udf/udfmgr_test.go @@ -21,7 +21,8 @@ package udf import ( "encoding/binary" - "juno/third_party/forked/golang/glog" + + "github.com/paypal/junodb/third_party/forked/golang/glog" "fmt" "testing" diff --git a/pkg/udf/udfplugin.go b/pkg/udf/udfplugin.go index 80a8e5a1..fcd3dc6e 100644 --- a/pkg/udf/udfplugin.go +++ b/pkg/udf/udfplugin.go @@ -26,7 +26,7 @@ import ( "plugin" "strings" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) func loadOneUDFbyName(dir string, name string) (iudf IUDF, err error) { diff --git a/pkg/util/cmap.go b/pkg/util/cmap.go index 7d32db7e..762d5778 100644 --- a/pkg/util/cmap.go +++ b/pkg/util/cmap.go @@ -20,9 +20,10 @@ package util import ( - "github.com/spaolacci/murmur3" - "juno/third_party/forked/golang/glog" "sync" + + "github.com/paypal/junodb/third_party/forked/golang/glog" + "github.com/spaolacci/murmur3" ) type MapPartition struct { diff --git a/pkg/version/version.go b/pkg/version/version.go index 36f49f8c..028fb4fe 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -27,7 +27,7 @@ import ( "path/filepath" "runtime" - "juno/pkg/debug" + "github.com/paypal/junodb/pkg/debug" ) var ( diff --git a/test/drv/bulkload/bulkload.go b/test/drv/bulkload/bulkload.go index 066d6c28..f7460e3f 100644 --- a/test/drv/bulkload/bulkload.go +++ b/test/drv/bulkload/bulkload.go @@ -21,7 +21,7 @@ // // Tool to create a set of random keys, which can be accessed by // [-get|-update|-set|-delete] in a subsequent command. -//================================================================= +// ================================================================= package main import ( @@ -35,10 +35,10 @@ import ( "strings" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/client" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/pkg/util" ) type CmdLine struct { diff --git a/test/drv/junoload/dbstats.go b/test/drv/junoload/dbstats.go index ed8b5f24..8cf414b8 100644 --- a/test/drv/junoload/dbstats.go +++ b/test/drv/junoload/dbstats.go @@ -22,10 +22,10 @@ package main import ( "fmt" - "juno/third_party/forked/golang/glog" - "juno/third_party/forked/tecbot/gorocksdb" + "github.com/paypal/junodb/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/tecbot/gorocksdb" - stor "juno/cmd/storageserv/storage/db" + stor "github.com/paypal/junodb/cmd/storageserv/storage/db" ) func PrintDbStats(name string) { diff --git a/test/drv/junoload/junoload.go b/test/drv/junoload/junoload.go index c4e7aaff..ea3f2aa9 100644 --- a/test/drv/junoload/junoload.go +++ b/test/drv/junoload/junoload.go @@ -31,16 +31,16 @@ import ( "sync" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" "github.com/BurntSushi/toml" - "juno/pkg/client" - "juno/pkg/cmd" - "juno/pkg/logging/cal" - "juno/pkg/sec" - "juno/pkg/util" - "juno/pkg/version" + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/pkg/cmd" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/sec" + "github.com/paypal/junodb/pkg/util" + "github.com/paypal/junodb/pkg/version" ) type ( diff --git a/test/drv/junoload/tdscfg.go b/test/drv/junoload/tdscfg.go index 8e577852..2880f270 100644 --- a/test/drv/junoload/tdscfg.go +++ b/test/drv/junoload/tdscfg.go @@ -20,9 +20,9 @@ package main import ( - "juno/pkg/client" - "juno/pkg/logging/cal/config" - "juno/pkg/sec" + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/pkg/logging/cal/config" + "github.com/paypal/junodb/pkg/sec" ) type ( diff --git a/test/drv/junoload/tsteng.go b/test/drv/junoload/tsteng.go index 196dcafd..8cdd77f8 100644 --- a/test/drv/junoload/tsteng.go +++ b/test/drv/junoload/tsteng.go @@ -27,9 +27,9 @@ import ( "sync" "time" - "juno/pkg/client" + "github.com/paypal/junodb/pkg/client" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" "juno/pkg/util" diff --git a/test/fakess/config.go b/test/fakess/config.go index f6169bca..39521e64 100644 --- a/test/fakess/config.go +++ b/test/fakess/config.go @@ -1,23 +1,24 @@ -// +// // Copyright 2023 PayPal Inc. -// +// // Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to You under the Apache License, Version 2.0 // (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - -// +build +// + +//go:build ignore +// +build ignore package main @@ -25,13 +26,13 @@ import ( "math" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" "github.com/BurntSushi/toml" - "juno/pkg/io" - cal "juno/pkg/logging/cal/config" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/io" + cal "github.com/paypal/junodb/pkg/logging/cal/config" + "github.com/paypal/junodb/pkg/util" ) var Conf = Config{ diff --git a/test/fakess/main.go b/test/fakess/main.go index cf0c2eba..fd5ef392 100644 --- a/test/fakess/main.go +++ b/test/fakess/main.go @@ -1,34 +1,36 @@ -// +// // Copyright 2023 PayPal Inc. -// +// // Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to You under the Apache License, Version 2.0 // (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - -// +build +// + +//go:build ignore +// +build ignore package main import ( "flag" - "juno/pkg/logging/cal" - "juno/pkg/service" "net" "strconv" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/service" + + "github.com/paypal/junodb/third_party/forked/golang/glog" ) var ( diff --git a/test/fakess/requesthandler.go b/test/fakess/requesthandler.go index ebc03ab3..837949b5 100644 --- a/test/fakess/requesthandler.go +++ b/test/fakess/requesthandler.go @@ -1,34 +1,36 @@ -// +// // Copyright 2023 PayPal Inc. -// +// // Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to You under the Apache License, Version 2.0 // (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - -// +build +// + +//go:build ignore +// +build ignore package main import ( - "juno/pkg/io" - _ "juno/pkg/logging" - "juno/pkg/proto" "math/rand" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/pkg/io" + _ "github.com/paypal/junodb/pkg/logging" + "github.com/paypal/junodb/pkg/proto" + + "github.com/paypal/junodb/third_party/forked/golang/glog" ) //type IRequestHandler interface { diff --git a/test/functest/create_test.go b/test/functest/create_test.go index 1e4e261a..206539e0 100644 --- a/test/functest/create_test.go +++ b/test/functest/create_test.go @@ -24,11 +24,11 @@ import ( "testing" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/client" - "juno/pkg/util" - "juno/test/testutil" + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/pkg/util" + "github.com/paypal/junodb/test/testutil" ) /*************************************************** diff --git a/test/functest/delete_test.go b/test/functest/delete_test.go index 0b0dfb6b..6ebb9603 100644 --- a/test/functest/delete_test.go +++ b/test/functest/delete_test.go @@ -21,10 +21,11 @@ package functest import ( // "encoding/hex" - "juno/pkg/client" - "juno/test/testutil" "testing" "time" + + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/test/testutil" ) /************************************************************************ diff --git a/test/functest/get_test.go b/test/functest/get_test.go index 1a8640fa..2013fd13 100644 --- a/test/functest/get_test.go +++ b/test/functest/get_test.go @@ -20,13 +20,14 @@ package functest import ( - "juno/pkg/client" - "juno/pkg/util" - "juno/test/testutil" "testing" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/pkg/util" + "github.com/paypal/junodb/test/testutil" + + "github.com/paypal/junodb/third_party/forked/golang/glog" ) /*********************************************************************** diff --git a/test/functest/set_test.go b/test/functest/set_test.go index fc333ef9..b7133914 100644 --- a/test/functest/set_test.go +++ b/test/functest/set_test.go @@ -20,13 +20,14 @@ package functest import ( - "juno/pkg/client" - "juno/test/testutil" "strconv" "testing" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/test/testutil" + + "github.com/paypal/junodb/third_party/forked/golang/glog" ) /************************************************* diff --git a/test/functest/setup_test.go b/test/functest/setup_test.go index e5244527..27dd384e 100644 --- a/test/functest/setup_test.go +++ b/test/functest/setup_test.go @@ -30,19 +30,19 @@ import ( "testing" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" "github.com/BurntSushi/toml" - "juno/cmd/proxy/config" - "juno/pkg/client" - "juno/pkg/cluster" - "juno/pkg/etcd" - "juno/pkg/io" - "juno/pkg/logging/cal" - "juno/pkg/sec" - "juno/pkg/util" - "juno/test/testutil/server" + "github.com/paypal/junodb/cmd/proxy/config" + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/pkg/cluster" + "github.com/paypal/junodb/pkg/etcd" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/logging/cal" + "github.com/paypal/junodb/pkg/sec" + "github.com/paypal/junodb/pkg/util" + "github.com/paypal/junodb/test/testutil/server" ) var testConfig = server.ClusterConfig{ diff --git a/test/functest/update_test.go b/test/functest/update_test.go index 28697e15..bbc4eed4 100644 --- a/test/functest/update_test.go +++ b/test/functest/update_test.go @@ -24,10 +24,10 @@ import ( "testing" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/client" - "juno/test/testutil" + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/test/testutil" ) /**************************************************** diff --git a/test/mockss/mockss.go b/test/mockss/mockss.go index e1d87588..bc22f2fb 100644 --- a/test/mockss/mockss.go +++ b/test/mockss/mockss.go @@ -22,8 +22,9 @@ package main import ( "flag" "fmt" - "juno/test/testutil/mock" - "juno/third_party/forked/golang/glog" + + "github.com/paypal/junodb/test/testutil/mock" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) func main() { diff --git a/test/testutil/log/frwk/frwk.go b/test/testutil/log/frwk/frwk.go index 63b55fae..55570efa 100644 --- a/test/testutil/log/frwk/frwk.go +++ b/test/testutil/log/frwk/frwk.go @@ -20,7 +20,7 @@ package frwk import ( - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) var ( diff --git a/test/testutil/mock/client.go b/test/testutil/mock/client.go index 9cedae1e..189ab15c 100644 --- a/test/testutil/mock/client.go +++ b/test/testutil/mock/client.go @@ -26,11 +26,11 @@ import ( "net" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/client" - "juno/pkg/cluster" - "juno/pkg/proto" + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/pkg/cluster" + "github.com/paypal/junodb/pkg/proto" ) type MockClient struct { diff --git a/test/testutil/mock/common.go b/test/testutil/mock/common.go index 1d6184ed..9d203733 100644 --- a/test/testutil/mock/common.go +++ b/test/testutil/mock/common.go @@ -26,7 +26,7 @@ import ( "testing" "time" - . "juno/pkg/proto" + . "github.com/paypal/junodb/pkg/proto" ) const ( diff --git a/test/testutil/mock/config.go b/test/testutil/mock/config.go index 93a98c75..dcd03d5c 100644 --- a/test/testutil/mock/config.go +++ b/test/testutil/mock/config.go @@ -23,9 +23,9 @@ import ( "math" "time" - "juno/pkg/io" - "juno/pkg/service" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/service" + "github.com/paypal/junodb/pkg/util" ) type SSConfig struct { diff --git a/test/testutil/mock/ssreqhandler.go b/test/testutil/mock/ssreqhandler.go index c5942b06..40d4d86a 100644 --- a/test/testutil/mock/ssreqhandler.go +++ b/test/testutil/mock/ssreqhandler.go @@ -25,13 +25,13 @@ import ( "sync" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - // "juno/cmd/proxy/handler" - "juno/pkg/io" - "juno/pkg/proto" - "juno/pkg/service" - "juno/pkg/util" + // "github.com/paypal/junodb/cmd/proxy/handler" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/service" + "github.com/paypal/junodb/pkg/util" ) var _ io.IRequestHandler = (*RequestHandler)(nil) diff --git a/test/testutil/server/cluster.go b/test/testutil/server/cluster.go index 4467ef7e..1d9d287b 100644 --- a/test/testutil/server/cluster.go +++ b/test/testutil/server/cluster.go @@ -31,16 +31,16 @@ import ( "syscall" "time" - "juno/third_party/forked/golang/glog" - - "juno/cmd/proxy/handler" - "juno/cmd/proxy/stats" - "juno/pkg/cluster" - "juno/pkg/etcd" - "juno/pkg/net/netutil" - "juno/pkg/util" - "juno/test/testutil/log/frwk" - "juno/test/testutil/mock" + "github.com/paypal/junodb/third_party/forked/golang/glog" + + "github.com/paypal/junodb/cmd/proxy/handler" + "github.com/paypal/junodb/cmd/proxy/stats" + "github.com/paypal/junodb/pkg/cluster" + "github.com/paypal/junodb/pkg/etcd" + "github.com/paypal/junodb/pkg/net/netutil" + "github.com/paypal/junodb/pkg/util" + "github.com/paypal/junodb/test/testutil/log/frwk" + "github.com/paypal/junodb/test/testutil/mock" ) type ICluster interface { diff --git a/test/testutil/server/config.go b/test/testutil/server/config.go index dde5a67f..9899ac15 100644 --- a/test/testutil/server/config.go +++ b/test/testutil/server/config.go @@ -20,11 +20,11 @@ package server import ( - "juno/cmd/proxy/config" - "juno/pkg/io" - cal "juno/pkg/logging/cal/config" - "juno/pkg/sec" - "juno/pkg/util" + "github.com/paypal/junodb/cmd/proxy/config" + "github.com/paypal/junodb/pkg/io" + cal "github.com/paypal/junodb/pkg/logging/cal/config" + "github.com/paypal/junodb/pkg/sec" + "github.com/paypal/junodb/pkg/util" ) type ServerDef struct { diff --git a/test/testutil/server/inprocsrv.go b/test/testutil/server/inprocsrv.go index 69ef735b..217c14d7 100644 --- a/test/testutil/server/inprocsrv.go +++ b/test/testutil/server/inprocsrv.go @@ -23,10 +23,10 @@ import ( "fmt" "sync" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/service" - "juno/test/testutil/log/frwk" + "github.com/paypal/junodb/pkg/service" + "github.com/paypal/junodb/test/testutil/log/frwk" ) var _ IServer = (*InProcessServer)(nil) diff --git a/test/testutil/server/server.go b/test/testutil/server/server.go index 88871815..9f1c0c10 100644 --- a/test/testutil/server/server.go +++ b/test/testutil/server/server.go @@ -22,7 +22,6 @@ package server import ( "fmt" pkgio "io" - "juno/third_party/forked/golang/glog" "net" "net/http" "os" @@ -31,11 +30,13 @@ import ( "strings" "time" - "juno/internal/cli" - "juno/pkg/io" - "juno/pkg/net/netutil" - "juno/pkg/proto" - "juno/test/testutil/log/frwk" + "github.com/paypal/junodb/third_party/forked/golang/glog" + + "github.com/paypal/junodb/internal/cli" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/net/netutil" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/test/testutil/log/frwk" ) const ( diff --git a/test/testutil/server/ssnode.go b/test/testutil/server/ssnode.go index dcd2994a..105d0469 100644 --- a/test/testutil/server/ssnode.go +++ b/test/testutil/server/ssnode.go @@ -23,10 +23,10 @@ import ( "fmt" "net" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/client" - "juno/test/testutil/ssclient" + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/test/testutil/ssclient" ) type SSNode struct { diff --git a/test/testutil/ssclient/advssclient.go b/test/testutil/ssclient/advssclient.go index 876e69e7..ffe0abfe 100644 --- a/test/testutil/ssclient/advssclient.go +++ b/test/testutil/ssclient/advssclient.go @@ -24,11 +24,11 @@ import ( "net" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/pkg/etcd" - "juno/pkg/proto" - "juno/pkg/util" + "github.com/paypal/junodb/pkg/etcd" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/util" ) type Config struct { diff --git a/test/testutil/ssclient/ssclient.go b/test/testutil/ssclient/ssclient.go index 273704e0..a5a4b82a 100644 --- a/test/testutil/ssclient/ssclient.go +++ b/test/testutil/ssclient/ssclient.go @@ -24,12 +24,12 @@ import ( "io" "net" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/internal/cli" - "juno/pkg/client" - "juno/pkg/proto" - "juno/pkg/util" + "github.com/paypal/junodb/internal/cli" + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/pkg/util" ) type Record struct { diff --git a/test/testutil/testhelper.go b/test/testutil/testhelper.go index 537e36ee..7ac9b6cc 100644 --- a/test/testutil/testhelper.go +++ b/test/testutil/testhelper.go @@ -34,17 +34,17 @@ import ( "testing" "time" - "juno/third_party/forked/golang/glog" - - "juno/cmd/proxy/config" - "juno/internal/cli" - "juno/pkg/client" - "juno/pkg/cluster" - "juno/pkg/etcd" - "juno/pkg/io" - "juno/pkg/util" - "juno/test/testutil/mock" - "juno/test/testutil/server" + "github.com/paypal/junodb/third_party/forked/golang/glog" + + "github.com/paypal/junodb/cmd/proxy/config" + "github.com/paypal/junodb/internal/cli" + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/pkg/cluster" + "github.com/paypal/junodb/pkg/etcd" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/util" + "github.com/paypal/junodb/test/testutil/mock" + "github.com/paypal/junodb/test/testutil/server" ) type KVMap map[string]string @@ -227,7 +227,7 @@ func ApproxEqual(v1 uint32, v2 uint32, epsilon uint32) bool { return (v2 - v1) <= epsilon } -//This function has to be called right after getting RecordInfo +// This function has to be called right after getting RecordInfo func VerifyRecordInfo(recInfo client.IContext, ver uint32, ttl uint32, creationTime uint32) error { if recInfo == nil { return fmt.Errorf("nil recInfo") @@ -958,7 +958,7 @@ func LoadInitConfig(hostip string) { time.Sleep(3 * time.Second) } -//temporally create redist info +// temporally create redist info func UpdateRedistConfig(t *testing.T, hostip string, connNo string, configFile string) { var cmd string var cmd1 string @@ -989,7 +989,7 @@ func UpdateRedistConfig(t *testing.T, hostip string, connNo string, configFile s time.Sleep(3 * time.Second) } -//start redist +// start redist func StartRedistConfig(t *testing.T, hostip string, markdown string) { var localIp bool = false var cmd string @@ -1009,7 +1009,7 @@ func StartRedistConfig(t *testing.T, hostip string, markdown string) { } } -//start auto redistribution +// start auto redistribution func StartAutoRedistConfig(t *testing.T, hostip string, markdown string) { var localIp bool = false var cmd string @@ -1027,7 +1027,7 @@ func StartAutoRedistConfig(t *testing.T, hostip string, markdown string) { exec.Command("bash", "-c", cmd).Output() } -//temporally check forward finish, all zones are snapshot_finish +// temporally check forward finish, all zones are snapshot_finish func FinishForwardCheck(t *testing.T, hostip string) { var cmd string if ResolveHostIp() != hostip { @@ -1044,7 +1044,7 @@ func FinishForwardCheck(t *testing.T, hostip string) { } } -//resume the aborted redistribution +// resume the aborted redistribution func ResumeAbortedReq(t *testing.T, hostip string) { var cmd string if ResolveHostIp() != hostip { @@ -1058,7 +1058,7 @@ func ResumeAbortedReq(t *testing.T, hostip string) { exec.Command("bash", "-c", cmd).Output() } -//commit the new change +// commit the new change func FinalizeConfig(t *testing.T, hostip string) { var cmd string if ResolveHostIp() != hostip { @@ -1164,7 +1164,7 @@ func ReInitializeCluster(config server.ClusterConfig) (c *server.Cluster) { return server.NewClusterWithConfig(&config) } -//This definitely will be deleted as it's a temporally workaround for shutdown issue +// This definitely will be deleted as it's a temporally workaround for shutdown issue func SSShutdown(hostip string, secondhost bool) { var cmd string if ResolveHostIp() != hostip { diff --git a/test/testutil/tmkeeper.go b/test/testutil/tmkeeper.go index ee269605..622a0171 100644 --- a/test/testutil/tmkeeper.go +++ b/test/testutil/tmkeeper.go @@ -22,7 +22,7 @@ package testutil import ( "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" ) type timeKeeper struct { diff --git a/test/unittest/create_test.go b/test/unittest/create_test.go index 7a78105f..d49974f4 100644 --- a/test/unittest/create_test.go +++ b/test/unittest/create_test.go @@ -21,14 +21,15 @@ package unittest import ( "fmt" - "juno/pkg/client" - "juno/pkg/proto" - "juno/test/testutil" - "juno/test/testutil/mock" "strconv" "testing" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/test/testutil" + "github.com/paypal/junodb/test/testutil/mock" + + "github.com/paypal/junodb/third_party/forked/golang/glog" ) var createStatusArray [7]uint8 diff --git a/test/unittest/destroy_test.go b/test/unittest/destroy_test.go index baf68e68..f43b7854 100644 --- a/test/unittest/destroy_test.go +++ b/test/unittest/destroy_test.go @@ -1,29 +1,28 @@ +// Copyright 2023 PayPal Inc. // -// Copyright 2023 PayPal Inc. +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at // -// Licensed to the Apache Software Foundation (ASF) under one or more -// contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. -// The ASF licenses this file to You under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with -// the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// http://www.apache.org/licenses/LICENSE-2.0 // +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. package unittest import ( - "juno/pkg/client" - "juno/pkg/proto" - "juno/test/testutil" - "juno/test/testutil/mock" "testing" + + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/test/testutil" + "github.com/paypal/junodb/test/testutil/mock" ) var prepareDeleteArr [4]uint8 diff --git a/test/unittest/get_test.go b/test/unittest/get_test.go index de355260..3235a8b9 100644 --- a/test/unittest/get_test.go +++ b/test/unittest/get_test.go @@ -20,11 +20,12 @@ package unittest import ( - "juno/pkg/client" - "juno/pkg/proto" - "juno/test/testutil" - "juno/test/testutil/mock" "testing" + + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/test/testutil" + "github.com/paypal/junodb/test/testutil/mock" ) var getStatusArray [5]uint8 diff --git a/test/unittest/set_test.go b/test/unittest/set_test.go index 2981117b..b961176e 100644 --- a/test/unittest/set_test.go +++ b/test/unittest/set_test.go @@ -20,11 +20,12 @@ package unittest import ( - "juno/pkg/client" - "juno/pkg/proto" - "juno/test/testutil" - "juno/test/testutil/mock" "testing" + + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/test/testutil" + "github.com/paypal/junodb/test/testutil/mock" ) var setPrepareArray [7]uint8 diff --git a/test/unittest/setup_test.go b/test/unittest/setup_test.go index f7541e9a..a7881275 100644 --- a/test/unittest/setup_test.go +++ b/test/unittest/setup_test.go @@ -28,17 +28,17 @@ import ( "testing" "time" - "juno/third_party/forked/golang/glog" + "github.com/paypal/junodb/third_party/forked/golang/glog" - "juno/cmd/proxy/config" - "juno/pkg/client" - "juno/pkg/cluster" - "juno/pkg/etcd" - "juno/pkg/io" - "juno/pkg/util" + "github.com/paypal/junodb/cmd/proxy/config" + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/pkg/cluster" + "github.com/paypal/junodb/pkg/etcd" + "github.com/paypal/junodb/pkg/io" + "github.com/paypal/junodb/pkg/util" - "juno/test/testutil/mock" - "juno/test/testutil/server" + "github.com/paypal/junodb/test/testutil/mock" + "github.com/paypal/junodb/test/testutil/server" ) var testConfig = server.ClusterConfig{ diff --git a/test/unittest/update_test.go b/test/unittest/update_test.go index 4f74b5e6..d8b0ef4f 100644 --- a/test/unittest/update_test.go +++ b/test/unittest/update_test.go @@ -20,12 +20,13 @@ package unittest import ( - //"juno/third_party/forked/golang/glog" - "juno/pkg/client" - "juno/pkg/proto" - "juno/test/testutil" - "juno/test/testutil/mock" + //"github.com/paypal/junodb/third_party/forked/golang/glog" "testing" + + "github.com/paypal/junodb/pkg/client" + "github.com/paypal/junodb/pkg/proto" + "github.com/paypal/junodb/test/testutil" + "github.com/paypal/junodb/test/testutil/mock" ) var updatePrepareArray [6]uint8