SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
use released version of azblob
Chris Lub86189991956
diff --git a/weed/replication/sink/azuresink/azure_sink.go b/weed/replication/sink/azuresink/azure_sink.goindex 0639ef4ba7..c3652810d3 100644--- a/weed/replication/sink/azuresink/azure_sink.go+++ b/weed/replication/sink/azuresink/azure_sink.go@@ -6,12 +6,13 @@ import ("fmt""net/url"- "github.com/Azure/azure-storage-blob-go/2016-05-31/azblob"+ "github.com/Azure/azure-storage-blob-go/azblob""github.com/chrislusf/seaweedfs/weed/filer2""github.com/chrislusf/seaweedfs/weed/pb/filer_pb""github.com/chrislusf/seaweedfs/weed/replication/sink""github.com/chrislusf/seaweedfs/weed/replication/source""github.com/chrislusf/seaweedfs/weed/util"+ "github.com/chrislusf/seaweedfs/weed/glog")type AzureSink struct {@@ -51,7 +52,10 @@ func (g *AzureSink) initialize(accountName, accountKey, container, dir string) eg.dir = dir// Use your Storage account's name and key to create a credential object.- credential := azblob.NewSharedKeyCredential(accountName, accountKey)+ credential, err := azblob.NewSharedKeyCredential(accountName, accountKey)+ if err != nil {+ glog.Fatalf("failed to create Azure credential with account name:%s key:%s", accountName, accountKey)+ }// Create a request pipeline that is used to process HTTP(S) requests and responses.p := azblob.NewPipeline(credential, azblob.PipelineOptions{})@@ -111,7 +115,7 @@ func (g *AzureSink) CreateEntry(key string, entry *filer_pb.Entry) error {var writeErr error_, readErr := util.ReadUrlAsStream(fileUrl, chunk.Offset, int(chunk.Size), func(data []byte) {- _, writeErr = appendBlobURL.AppendBlock(ctx, bytes.NewReader(data), azblob.BlobAccessConditions{})+ _, writeErr = appendBlobURL.AppendBlock(ctx, bytes.NewReader(data), azblob.AppendBlobAccessConditions{}, nil)})if readErr != nil {