aboutsummaryrefslogtreecommitdiff
path: root/unmaintained
diff options
context:
space:
mode:
Diffstat (limited to 'unmaintained')
-rw-r--r--unmaintained/change_superblock/change_superblock.go20
-rw-r--r--unmaintained/diff_volume_servers/diff_volume_servers.go16
-rw-r--r--unmaintained/fix_dat/fix_dat.go10
-rw-r--r--unmaintained/s3/presigned_put/presigned_put.go11
-rw-r--r--unmaintained/stream_read_volume/stream_read_volume.go2
-rw-r--r--unmaintained/stress_filer_upload/bench_filer_upload/bench_filer_upload.go2
-rw-r--r--unmaintained/stress_filer_upload/stress_filer_upload_actual/stress_filer_upload.go2
-rw-r--r--unmaintained/volume_tailer/volume_tailer.go4
8 files changed, 35 insertions, 32 deletions
diff --git a/unmaintained/change_superblock/change_superblock.go b/unmaintained/change_superblock/change_superblock.go
index 52368f8cd..a9bb1fe16 100644
--- a/unmaintained/change_superblock/change_superblock.go
+++ b/unmaintained/change_superblock/change_superblock.go
@@ -26,15 +26,15 @@ var (
This is to change replication factor in .dat file header. Need to shut down the volume servers
that has those volumes.
-1. fix the .dat file in place
- // just see the replication setting
- go run change_replication.go -volumeId=9 -dir=/Users/chrislu/Downloads
- Current Volume Replication: 000
- // fix the replication setting
- go run change_replication.go -volumeId=9 -dir=/Users/chrislu/Downloads -replication 001
- Current Volume Replication: 000
- Changing to: 001
- Done.
+ 1. fix the .dat file in place
+ // just see the replication setting
+ go run change_replication.go -volumeId=9 -dir=/Users/chrislu/Downloads
+ Current Volume Replication: 000
+ // fix the replication setting
+ go run change_replication.go -volumeId=9 -dir=/Users/chrislu/Downloads -replication 001
+ Current Volume Replication: 000
+ Changing to: 001
+ Done.
2. copy the fixed .dat and related .idx files to some remote server
3. restart volume servers or start new volume servers.
@@ -42,7 +42,7 @@ that has those volumes.
func main() {
flag.Parse()
util_http.NewGlobalHttpClient()
-
+
fileName := strconv.Itoa(*fixVolumeId)
if *fixVolumeCollection != "" {
fileName = *fixVolumeCollection + "_" + fileName
diff --git a/unmaintained/diff_volume_servers/diff_volume_servers.go b/unmaintained/diff_volume_servers/diff_volume_servers.go
index e289fefe8..b4ceeb58c 100644
--- a/unmaintained/diff_volume_servers/diff_volume_servers.go
+++ b/unmaintained/diff_volume_servers/diff_volume_servers.go
@@ -19,8 +19,8 @@ import (
"github.com/seaweedfs/seaweedfs/weed/storage/needle"
"github.com/seaweedfs/seaweedfs/weed/storage/types"
"github.com/seaweedfs/seaweedfs/weed/util"
- "google.golang.org/grpc"
util_http "github.com/seaweedfs/seaweedfs/weed/util/http"
+ "google.golang.org/grpc"
)
var (
@@ -31,18 +31,18 @@ var (
)
/*
- Diff the volume's files across multiple volume servers.
- diff_volume_servers -volumeServers 127.0.0.1:8080,127.0.0.1:8081 -volumeId 5
+Diff the volume's files across multiple volume servers.
+diff_volume_servers -volumeServers 127.0.0.1:8080,127.0.0.1:8081 -volumeId 5
- Example Output:
- reference 127.0.0.1:8081
- fileId volumeServer message
- 5,01617c3f61 127.0.0.1:8080 wrongSize
+Example Output:
+reference 127.0.0.1:8081
+fileId volumeServer message
+5,01617c3f61 127.0.0.1:8080 wrongSize
*/
func main() {
flag.Parse()
util_http.InitGlobalHttpClient()
-
+
util.LoadSecurityConfiguration()
grpcDialOption = security.LoadClientTLS(util.GetViper(), "grpc.client")
diff --git a/unmaintained/fix_dat/fix_dat.go b/unmaintained/fix_dat/fix_dat.go
index 164b5b238..5f1ea1375 100644
--- a/unmaintained/fix_dat/fix_dat.go
+++ b/unmaintained/fix_dat/fix_dat.go
@@ -28,12 +28,12 @@ This is to resolve an one-time issue that caused inconsistency with .dat and .id
In this case, the .dat file contains all data, but some deletion caused incorrect offset.
The .idx has all correct offsets.
-1. fix the .dat file, a new .dat_fixed file will be generated.
- go run fix_dat.go -volumeId=9 -dir=/Users/chrislu/Downloads
-2. move the original .dat and .idx files to some backup folder, and rename .dat_fixed to .dat file
+ 1. fix the .dat file, a new .dat_fixed file will be generated.
+ go run fix_dat.go -volumeId=9 -dir=/Users/chrislu/Downloads
+ 2. move the original .dat and .idx files to some backup folder, and rename .dat_fixed to .dat file
mv 9.dat_fixed 9.dat
-3. fix the .idx file with the "weed fix"
- weed fix -volumeId=9 -dir=/Users/chrislu/Downloads
+ 3. fix the .idx file with the "weed fix"
+ weed fix -volumeId=9 -dir=/Users/chrislu/Downloads
*/
func main() {
flag.Parse()
diff --git a/unmaintained/s3/presigned_put/presigned_put.go b/unmaintained/s3/presigned_put/presigned_put.go
index 1e591dff2..46e4cbf06 100644
--- a/unmaintained/s3/presigned_put/presigned_put.go
+++ b/unmaintained/s3/presigned_put/presigned_put.go
@@ -7,22 +7,25 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
+ util_http "github.com/seaweedfs/seaweedfs/weed/util/http"
"net/http"
"strings"
"time"
- util_http "github.com/seaweedfs/seaweedfs/weed/util/http"
)
// Downloads an item from an S3 Bucket in the region configured in the shared config
// or AWS_REGION environment variable.
//
// Usage:
-// go run presigned_put.go
+//
+// go run presigned_put.go
+//
// For this exampl to work, the domainName is needd
-// weed s3 -domainName=localhost
+//
+// weed s3 -domainName=localhost
func main() {
util_http.InitGlobalHttpClient()
-
+
h := md5.New()
content := strings.NewReader(stringContent)
content.WriteTo(h)
diff --git a/unmaintained/stream_read_volume/stream_read_volume.go b/unmaintained/stream_read_volume/stream_read_volume.go
index cfdb36815..b148e4a4a 100644
--- a/unmaintained/stream_read_volume/stream_read_volume.go
+++ b/unmaintained/stream_read_volume/stream_read_volume.go
@@ -12,8 +12,8 @@ import (
"github.com/seaweedfs/seaweedfs/weed/pb/volume_server_pb"
"github.com/seaweedfs/seaweedfs/weed/security"
"github.com/seaweedfs/seaweedfs/weed/util"
- "google.golang.org/grpc"
util_http "github.com/seaweedfs/seaweedfs/weed/util/http"
+ "google.golang.org/grpc"
)
var (
diff --git a/unmaintained/stress_filer_upload/bench_filer_upload/bench_filer_upload.go b/unmaintained/stress_filer_upload/bench_filer_upload/bench_filer_upload.go
index 6dc703dbc..a98da1d01 100644
--- a/unmaintained/stress_filer_upload/bench_filer_upload/bench_filer_upload.go
+++ b/unmaintained/stress_filer_upload/bench_filer_upload/bench_filer_upload.go
@@ -4,6 +4,7 @@ import (
"bytes"
"flag"
"fmt"
+ util_http "github.com/seaweedfs/seaweedfs/weed/util/http"
"io"
"log"
"math/rand"
@@ -13,7 +14,6 @@ import (
"strings"
"sync"
"time"
- util_http "github.com/seaweedfs/seaweedfs/weed/util/http"
)
var (
diff --git a/unmaintained/stress_filer_upload/stress_filer_upload_actual/stress_filer_upload.go b/unmaintained/stress_filer_upload/stress_filer_upload_actual/stress_filer_upload.go
index 1cdcad0b3..1c3befe3d 100644
--- a/unmaintained/stress_filer_upload/stress_filer_upload_actual/stress_filer_upload.go
+++ b/unmaintained/stress_filer_upload/stress_filer_upload_actual/stress_filer_upload.go
@@ -4,6 +4,7 @@ import (
"bytes"
"flag"
"fmt"
+ util_http "github.com/seaweedfs/seaweedfs/weed/util/http"
"io"
"log"
"math/rand"
@@ -14,7 +15,6 @@ import (
"strings"
"sync"
"time"
- util_http "github.com/seaweedfs/seaweedfs/weed/util/http"
)
var (
diff --git a/unmaintained/volume_tailer/volume_tailer.go b/unmaintained/volume_tailer/volume_tailer.go
index a75a095d4..03f728ad0 100644
--- a/unmaintained/volume_tailer/volume_tailer.go
+++ b/unmaintained/volume_tailer/volume_tailer.go
@@ -1,18 +1,18 @@
package main
import (
+ "context"
"flag"
"github.com/seaweedfs/seaweedfs/weed/pb"
"log"
"time"
- "context"
"github.com/seaweedfs/seaweedfs/weed/operation"
"github.com/seaweedfs/seaweedfs/weed/security"
"github.com/seaweedfs/seaweedfs/weed/storage/needle"
util2 "github.com/seaweedfs/seaweedfs/weed/util"
- "golang.org/x/tools/godoc/util"
util_http "github.com/seaweedfs/seaweedfs/weed/util/http"
+ "golang.org/x/tools/godoc/util"
)
var (