mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
fix deleting bucket
This commit is contained in:
parent
70008b093e
commit
2697d6a4fb
|
@ -79,6 +79,13 @@ public class PutObject {
|
||||||
// test deletes
|
// test deletes
|
||||||
s3Client.deleteObject(bucketName, stringObjKeyName);
|
s3Client.deleteObject(bucketName, stringObjKeyName);
|
||||||
|
|
||||||
|
|
||||||
|
// delete bucket
|
||||||
|
String tmpBucket = "tmpbucket";
|
||||||
|
s3Client.createBucket(tmpBucket);
|
||||||
|
s3Client.putObject(tmpBucket, stringObjKeyName, stringContent);
|
||||||
|
s3Client.deleteBucket(tmpBucket);
|
||||||
|
|
||||||
} catch (AmazonServiceException e) {
|
} catch (AmazonServiceException e) {
|
||||||
// The call was transmitted successfully, but Amazon S3 couldn't process
|
// The call was transmitted successfully, but Amazon S3 couldn't process
|
||||||
// it, so it returned an error response.
|
// it, so it returned an error response.
|
||||||
|
|
|
@ -42,7 +42,9 @@ func (v *Volume) Destroy() (err error) {
|
||||||
}
|
}
|
||||||
v.Close()
|
v.Close()
|
||||||
os.Remove(v.FileName() + ".dat")
|
os.Remove(v.FileName() + ".dat")
|
||||||
err = v.nm.Destroy()
|
if v.nm!=nil{
|
||||||
|
err = v.nm.Destroy()
|
||||||
|
}
|
||||||
os.Remove(v.FileName() + ".cpd")
|
os.Remove(v.FileName() + ".cpd")
|
||||||
os.Remove(v.FileName() + ".cpx")
|
os.Remove(v.FileName() + ".cpx")
|
||||||
os.Remove(v.FileName() + ".ldb")
|
os.Remove(v.FileName() + ".ldb")
|
||||||
|
|
Loading…
Reference in a new issue