Commit Graph

17 Commits

Author SHA1 Message Date
Brad Fitzpatrick 26a7db6c80 Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2014-04-11 15:51:05 -07:00
Brad Fitzpatrick bf83a52bef blob: add ParseKnown
Change-Id: I96e031951d1f490a700faabf5aeb864f8c0b9bc3
2014-04-11 15:50:31 -07:00
Brad Fitzpatrick bfc201f7a6 Add blobserver.RefTypes and blob.TypeAlphabet
To be implemented later, but adding now so googledrive's blob storage implementation
can depend on them.

Change-Id: Ief374e8592bd696c79aa2b80ded11e301063750b
2014-04-06 23:07:55 -07:00
Brad Fitzpatrick bfcd26a2ff blob: move Blob type to its own file, add FromFetcher, FromReader
Prep for killing SeekFetcher.

Change-Id: Iade678ccf74d5ebc9613dbb9dbf44b9ed9ff4dea
2014-03-14 11:47:37 -07:00
Tamás Gulácsi 97520583b8 Use 'uint32' instead of 'int64' for blob sizes everywhere.
Not just in blob.SizedRef, but in blobserver.Fetch and
blobserver.FetchStreaming, too.
Blobs have a max size of 10-32 MB anyway, and the index.Corpus is now using
uint32 to save memory.

Change-Id: I1172445c2f9463fdaee55bfe0f1218d44be4aa53
2014-02-08 17:58:12 +01:00
Bill Thiede 9aeb0aa2c7 pkg/client: Search fix zero-value Describe queries.
Adds support for zero value blob.Ref {Unm,M}arshalJSON.

Fix for:
https://camlistore.org/issue/308

Change-Id: I910fc4f05015b0c3ddc57eba9d1d8fe1bfe992bf
2014-01-04 08:11:23 -08:00
Brian Gitonga Marete 97c52b7233 pkg/blob: Introuduce a type that wraps a blob ref with the blob data.
This new type (blob.Blob) will be used to implement a blob streaming
interface for the storage engines.

Change-Id: I05f3a68022368cf9c7b4a98cced3098ba3965799
2013-12-23 21:50:50 +03:00
Brad Fitzpatrick cde3176c0d blob: speed up parsing slightly.
BenchmarkParseBlob  2000000   727 ns/op   64 B/op   2 allocs/op
BenchmarkParseBlob  5000000   531 ns/op   64 B/op   2 allocs/op

Kinda pointless and mostly the result of a failed refactor anyway,
but checking it in.

Change-Id: I7cdd0a8c5d03d7e223626ef6ddb77d8d10dd06a7
2013-12-06 11:15:51 +04:00
Brad Fitzpatrick f1a13214af blob: implement the parser's buffer pool TODO
Change-Id: I24366c5f42fd18103df68676047c7e4cdf6b7af6
2013-12-06 10:19:20 +04:00
Brad Fitzpatrick 6c1df9d633 blob: add ParseBytes
Will be used by index->corpus slurping of blob meta rows on
start-up, to reduce garbage.

Change-Id: Ied6605bd44ae38537d3661579c7a8b6dea2b2d9e
2013-12-04 14:38:13 +01:00
Brad Fitzpatrick d324eecaba blob: add slice sorter types for []blob.Ref and []blob.SizedRef
Change-Id: I23224a9408a9d6fd2bbd7dd0fa94dba64f4586c1
2013-12-02 11:55:39 -08:00
Brad Fitzpatrick 0dfaad41a7 blob: add RefFromString
Change-Id: I1e98874fd43c1570c2e79907dbdbc7e44ca64bf7
2013-10-25 00:22:10 -07:00
Brad Fitzpatrick 9bfb89967c pkg/blob: optimize MarshalJSON.
No real reason. Just finishing a TODO.

Change-Id: I9266cee9d3872f9b27baa8287b967e9446e1314d
2013-08-23 13:41:20 -05:00
Brad Fitzpatrick ec4af83d19 pkg/blob: implement Go 1.2's encoding.BinaryMarshaler
Change-Id: Ic9fbbd4cdd99fbf19ed2467f9fc151c688ec048f
2013-08-23 13:30:18 -05:00
Brad Fitzpatrick 0bdf20884b all: delete pkg/blobref; convert all from *blobref.BlobRef to new blob.Ref
Change-Id: Id2dfb7f19452bedf4f3c9310b36227fd8117b225
2013-08-03 19:54:30 -07:00
Brad Fitzpatrick c44d89e22f blob: more porting blobref to new pkg blob
Change-Id: Id7f0dd80dd6ce5fa55a2c04e2e2a882a5ef8add6
2013-08-03 19:08:17 -07:00
Brad Fitzpatrick e56a944843 blob: replacement for *blobref.BlobRef type.
Shorter name (blob.Ref instead of *blobref.BlobRef) and value
semantics instead of pointer.

Also, equality (==) works on it, so it can be used as a map key.

It's also more memory efficient, for the upcoming search server that
needs to store tons (or all) of your blobrefs in memory.

Change-Id: I494a2d72d31865211fa388fedf938ed25f99ca13
2013-08-03 13:48:17 -07:00