@@ -38,6 +38,9 @@ var startRepair = &cobra.Command{
38
38
}
39
39
localRootPath := cmd .Flag ("rootpath" ).Value .String ()
40
40
repairPath := cmd .Flag ("repairpath" ).Value .String ()
41
+ repairBatchSize , _ := cmd .Flags ().GetInt ("repairbatchsize" )
42
+ sdk .RepairBatchSize = repairBatchSize
43
+ sdk .SetMultiOpBatchSize (repairBatchSize )
41
44
42
45
wg := & sync.WaitGroup {}
43
46
statusBar := & StatusBar {wg : wg }
@@ -63,10 +66,10 @@ var repairSize = &cobra.Command{
63
66
Long : `gets only size to repair file to blobbers` ,
64
67
Args : cobra .MinimumNArgs (0 ),
65
68
Run : func (cmd * cobra.Command , args []string ) {
66
- fflags := cmd .Flags ()
67
- if ! fflags .Changed ("allocation" ) {
69
+ fflags := cmd .Flags ()
70
+ if ! fflags .Changed ("allocation" ) {
68
71
PrintError ("Error: allocation flag is missing" )
69
- os .Exit (1 )
72
+ os .Exit (1 )
70
73
}
71
74
72
75
repairPath := "/"
@@ -106,6 +109,7 @@ func init() {
106
109
startRepair .PersistentFlags ().String ("allocation" , "" , "Allocation ID" )
107
110
startRepair .PersistentFlags ().String ("rootpath" , "" , "File path for local files " )
108
111
startRepair .PersistentFlags ().String ("repairpath" , "" , "Path to repair" )
112
+ startRepair .PersistentFlags ().IntP ("repairbatchsize" , "rbs" , 50 , "Repair batch size" )
109
113
startRepair .MarkFlagRequired ("allocation" )
110
114
startRepair .MarkFlagRequired ("rootpath" )
111
115
startRepair .MarkFlagRequired ("repairpath" )
0 commit comments