fix compilation error, upgrade dependencies via glide

This commit is contained in:
Chris Lu 2018-06-28 23:53:15 -07:00
parent 044de8e6a0
commit 55a685b1c3
8 changed files with 39 additions and 31 deletions

View file

@ -66,7 +66,7 @@ func (c *CassandraStore) Get(fullFileName string) (fid string, err error) {
`select fids FROM seaweed_files WHERE path = ? LIMIT 1`, `select fids FROM seaweed_files WHERE path = ? LIMIT 1`,
fullFileName).Consistency(gocql.One).Scan(&output); err != nil { fullFileName).Consistency(gocql.One).Scan(&output); err != nil {
if err != gocql.ErrNotFound { if err != gocql.ErrNotFound {
glog.V(0).Infof("Failed to find file %s: %v", fullFileName, fid, err) glog.V(0).Infof("Failed to find file %s: %v", fullFileName, err)
return "", filer.ErrNotFound return "", filer.ErrNotFound
} }
} }

View file

@ -119,7 +119,7 @@ func (s *PostgresStore) ListFiles(dirPath string, lastFileName string, limit int
func (s *PostgresStore) DeleteDirectory(dirPath string, recursive bool) (err error) { func (s *PostgresStore) DeleteDirectory(dirPath string, recursive bool) (err error) {
err = s.deleteDirectory(dirPath, recursive) err = s.deleteDirectory(dirPath, recursive)
if err != nil { if err != nil {
glog.V(0).Infof("Error in Postgres DeleteDir '%s' (recursive = '%t'): %s", err) glog.V(0).Infof("Error in Postgres DeleteDir '%s' (recursive = '%t'): %v", dirPath, recursive, err)
} }
return err return err
} }

52
weed/glide.lock generated
View file

@ -1,8 +1,8 @@
hash: bc35cb94b57f621923b87a4e71a0175425d1d2dad00fdd4d5ee35ab80cef1c60 hash: 2e3a065472829938d25e879451b6d1aa43e55270e1166a9c044803ef8a3b9eb1
updated: 2018-04-16T00:58:48.978801-07:00 updated: 2018-06-28T23:52:52.92232-07:00
imports: imports:
- name: bazil.org/fuse - name: bazil.org/fuse
version: 371fbbdaa8987b715bdd21d6adc4c9b20155f748 version: 65cc252bf6691cb3c7014bcb2c8dc29de91e3a7e
subpackages: subpackages:
- fs - fs
- fuseutil - fuseutil
@ -15,9 +15,9 @@ imports:
- name: github.com/dgrijalva/jwt-go - name: github.com/dgrijalva/jwt-go
version: 06ea1031745cb8b3dab3f6a236daf2b0aa468b7e version: 06ea1031745cb8b3dab3f6a236daf2b0aa468b7e
- name: github.com/disintegration/imaging - name: github.com/disintegration/imaging
version: fd34ef7671b12cdf1b024d98c6b327b2770d32c4 version: bbcee2f5c9d5e94ca42c8b50ec847fec64a6c134
- name: github.com/go-redis/redis - name: github.com/go-redis/redis
version: 877867d2845fbaf86798befe410b6ceb6f5c29a3 version: 83fb42932f6145ce52df09860384a4653d2d332a
subpackages: subpackages:
- internal - internal
- internal/consistenthash - internal/consistenthash
@ -27,19 +27,19 @@ imports:
- internal/singleflight - internal/singleflight
- internal/util - internal/util
- name: github.com/go-sql-driver/mysql - name: github.com/go-sql-driver/mysql
version: a0583e0143b1624142adab07e0e97fe106d99561 version: d523deb1b23d913de5bdada721a6071e71283618
- name: github.com/gocql/gocql - name: github.com/gocql/gocql
version: 3540fc649cd7fc57cef5612b7bacac7a4fc443d6 version: e06f8c1bcd787e6bf0608288b314522f08cc7848
subpackages: subpackages:
- internal/lru - internal/lru
- internal/murmur - internal/murmur
- internal/streams - internal/streams
- name: github.com/gogo/protobuf - name: github.com/gogo/protobuf
version: 1ef32a8b9fc3f8ec940126907cedb5998f6318e4 version: 30cf7ac33676b5786e78c746683f0d4cd64fa75b
subpackages: subpackages:
- proto - proto
- name: github.com/golang/protobuf - name: github.com/golang/protobuf
version: 925541529c1fa6821df4e44ce2723319eb2be768 version: b4deda0973fb4c70b50d226b1af49f3da59f5265
subpackages: subpackages:
- proto - proto
- protoc-gen-go/descriptor - protoc-gen-go/descriptor
@ -48,30 +48,32 @@ imports:
- ptypes/duration - ptypes/duration
- ptypes/timestamp - ptypes/timestamp
- name: github.com/golang/snappy - name: github.com/golang/snappy
version: 553a641470496b2327abcac10b36396bd98e45c9 version: 2e65f85255dbc3072edf28d6b5b8efc472979f5a
- name: github.com/google/btree - name: github.com/google/btree
version: e89373fe6b4a7413d7acd6da1725b83ef713e6e4 version: e89373fe6b4a7413d7acd6da1725b83ef713e6e4
- name: github.com/gorilla/context - name: github.com/gorilla/context
version: 08b5f424b9271eedf6f9f0ce86cb9396ed337a42 version: 08b5f424b9271eedf6f9f0ce86cb9396ed337a42
- name: github.com/gorilla/mux - name: github.com/gorilla/mux
version: 53c1911da2b537f792e7cafcb446b05ffe33b996 version: e3702bed27f0d39777b0b37b664b6280e8ef8fbf
- name: github.com/hailocab/go-hostpool - name: github.com/hailocab/go-hostpool
version: e80d13ce29ede4452c43dea11e79b9bc8a15b478 version: e80d13ce29ede4452c43dea11e79b9bc8a15b478
- name: github.com/karlseguin/ccache
version: b425c9ca005a2050ebe723f6a0cddcb907354ab7
- name: github.com/klauspost/crc32 - name: github.com/klauspost/crc32
version: cb6bfca970f6908083f26f39a79009d608efd5cd version: cb6bfca970f6908083f26f39a79009d608efd5cd
- name: github.com/lib/pq - name: github.com/lib/pq
version: d34b9ff171c21ad295489235aec8b6626023cd04 version: 90697d60dd844d5ef6ff15135d0203f65d2f53b8
subpackages: subpackages:
- oid - oid
- name: github.com/rwcarlsen/goexif - name: github.com/rwcarlsen/goexif
version: fb35d3c3290d09f3524b684b5d42d0063c227158 version: 8d986c03457a2057c7b0fb0a48113f7dd48f9619
subpackages: subpackages:
- exif - exif
- tiff - tiff
- name: github.com/soheilhy/cmux - name: github.com/soheilhy/cmux
version: e09e9389d85d8492d313d73d1469c029e710623f version: e09e9389d85d8492d313d73d1469c029e710623f
- name: github.com/syndtr/goleveldb - name: github.com/syndtr/goleveldb
version: 714f901b98fdb3aa954b4193d8cbd64a28d80cad version: 0d5a0ceb10cf9ab89fdd744cc8c50a83134f6697
subpackages: subpackages:
- leveldb - leveldb
- leveldb/cache - leveldb/cache
@ -86,38 +88,42 @@ imports:
- leveldb/table - leveldb/table
- leveldb/util - leveldb/util
- name: golang.org/x/image - name: golang.org/x/image
version: f315e440302883054d0c2bd85486878cb4f8572c version: cc896f830cedae125428bc9fe1b0362aa91b3fb1
subpackages: subpackages:
- bmp - bmp
- tiff - tiff
- tiff/lzw - tiff/lzw
- name: golang.org/x/net - name: golang.org/x/net
version: 500e7a4f953ddaf55d316b4d3adc516aa0379622 version: 4cb1c02c05b0e749b0365f61ae859a8e0cfceed9
subpackages: subpackages:
- context - context
- http/httpguts
- http2 - http2
- http2/hpack - http2/hpack
- idna - idna
- internal/timeseries - internal/timeseries
- lex/httplex
- trace - trace
- name: golang.org/x/sys - name: golang.org/x/sys
version: 2281fa97ef7b0c26324634d5a22f04babdac8713 version: 7138fd3d9dc8335c567ca206f4333fb75eb05d56
subpackages: subpackages:
- unix - unix
- name: golang.org/x/text - name: golang.org/x/text
version: 7922cc490dd5a7dbaa7fd5d6196b49db59ac042f version: 5cec4b58c438bd98288aeb248bab2c1840713d21
subpackages: subpackages:
- secure/bidirule - secure/bidirule
- transform - transform
- unicode/bidi - unicode/bidi
- unicode/norm - unicode/norm
- name: google.golang.org/appengine
version: b1f26356af11148e710935ed1ac8a7f5702c7612
subpackages:
- cloudsql
- name: google.golang.org/genproto - name: google.golang.org/genproto
version: 7fd901a49ba6a7f87732eb344f6e3c5b19d1b200 version: ff3583edef7de132f219f0efc00e097cabcc0ec0
subpackages: subpackages:
- googleapis/rpc/status - googleapis/rpc/status
- name: google.golang.org/grpc - name: google.golang.org/grpc
version: d11072e7ca9811b1100b80ca0269ac831f06d024 version: 168a6198bcb0ef175f7dacec0b8691fc141dc9b8
subpackages: subpackages:
- balancer - balancer
- balancer/base - balancer/base
@ -127,9 +133,11 @@ imports:
- credentials - credentials
- encoding - encoding
- encoding/proto - encoding/proto
- grpclb/grpc_lb_v1/messages
- grpclog - grpclog
- internal - internal
- internal/backoff
- internal/channelz
- internal/grpcrand
- keepalive - keepalive
- metadata - metadata
- naming - naming

View file

@ -74,7 +74,7 @@ func writeJsonError(w http.ResponseWriter, r *http.Request, httpStatus int, err
} }
func debug(params ...interface{}) { func debug(params ...interface{}) {
glog.V(4).Infoln(params) glog.V(4).Infoln(params...)
} }
func submitForClientHandler(w http.ResponseWriter, r *http.Request, masterUrl string) { func submitForClientHandler(w http.ResponseWriter, r *http.Request, masterUrl string) {

View file

@ -101,7 +101,7 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request,
urlLocation, err := operation.LookupFileId(fs.getMasterNode(), fileId) urlLocation, err := operation.LookupFileId(fs.getMasterNode(), fileId)
if err != nil { if err != nil {
glog.V(1).Infoln("operation LookupFileId %s failed, err is %s", fileId, err.Error()) glog.V(1).Infof("operation LookupFileId %s failed, err:%v", fileId, err)
w.WriteHeader(http.StatusNotFound) w.WriteHeader(http.StatusNotFound)
return return
} }

View file

@ -79,7 +79,7 @@ func (fs *FilerServer) queryFileInfoByPath(w http.ResponseWriter, r *http.Reques
} else if fileId != "" && err == nil { } else if fileId != "" && err == nil {
urlLocation, err = operation.LookupFileId(fs.getMasterNode(), fileId) urlLocation, err = operation.LookupFileId(fs.getMasterNode(), fileId)
if err != nil { if err != nil {
glog.V(1).Infoln("operation LookupFileId %s failed, err is %s", fileId, err.Error()) glog.V(1).Infof("operation LookupFileId %s failed, err:%s", fileId, err)
w.WriteHeader(http.StatusNotFound) w.WriteHeader(http.StatusNotFound)
} }
} else if fileId == "" && err == filer.ErrNotFound { } else if fileId == "" && err == filer.ErrNotFound {
@ -193,7 +193,7 @@ func (fs *FilerServer) monolithicUploadAnalyzer(w http.ResponseWriter, r *http.R
*/ */
lastPos := strings.LastIndex(r.URL.Path, "/") lastPos := strings.LastIndex(r.URL.Path, "/")
if lastPos == -1 || lastPos == 0 || lastPos == len(r.URL.Path)-1 { if lastPos == -1 || lastPos == 0 || lastPos == len(r.URL.Path)-1 {
glog.V(0).Infoln("URL Path [%s] is invalid, could not retrieve file name", r.URL.Path) glog.V(0).Infof("URL Path [%s] is invalid, could not retrieve file name", r.URL.Path)
err = fmt.Errorf("URL Path is invalid") err = fmt.Errorf("URL Path is invalid")
writeJsonError(w, r, http.StatusInternalServerError, err) writeJsonError(w, r, http.StatusInternalServerError, err)
return return

View file

@ -25,7 +25,7 @@ func (vs *VolumeServer) assignVolumeHandler(w http.ResponseWriter, r *http.Reque
if r.FormValue("preallocate") != "" { if r.FormValue("preallocate") != "" {
preallocate, err = strconv.ParseInt(r.FormValue("preallocate"), 10, 64) preallocate, err = strconv.ParseInt(r.FormValue("preallocate"), 10, 64)
if err != nil { if err != nil {
glog.V(0).Infoln("ignoring invalid int64 value for preallocate = %v", r.FormValue("preallocate")) glog.V(0).Infof("ignoring invalid int64 value for preallocate = %v", r.FormValue("preallocate"))
} }
} }
err = vs.store.AddVolume( err = vs.store.AddVolume(
@ -41,7 +41,7 @@ func (vs *VolumeServer) assignVolumeHandler(w http.ResponseWriter, r *http.Reque
} else { } else {
writeJsonError(w, r, http.StatusNotAcceptable, err) writeJsonError(w, r, http.StatusNotAcceptable, err)
} }
glog.V(2).Infoln("assign volume = %s, collection = %s , replication = %s, error = %v", glog.V(2).Infof("assign volume = %s, collection = %s , replication = %s, error = %v",
r.FormValue("volume"), r.FormValue("collection"), r.FormValue("replication"), err) r.FormValue("volume"), r.FormValue("collection"), r.FormValue("replication"), err)
} }

View file

@ -22,7 +22,7 @@ func (vs *VolumeServer) vacuumVolumeCompactHandler(w http.ResponseWriter, r *htt
if r.FormValue("preallocate") != "" { if r.FormValue("preallocate") != "" {
preallocate, err = strconv.ParseInt(r.FormValue("preallocate"), 10, 64) preallocate, err = strconv.ParseInt(r.FormValue("preallocate"), 10, 64)
if err != nil { if err != nil {
glog.V(0).Infoln("Failed to parse int64 preallocate = %s: %v", r.FormValue("preallocate"), err) glog.V(0).Infof("Failed to parse int64 preallocate = %s: %v", r.FormValue("preallocate"), err)
} }
} }
err = vs.store.CompactVolume(r.FormValue("volume"), preallocate) err = vs.store.CompactVolume(r.FormValue("volume"), preallocate)