|
|
@ -107,12 +107,12 @@ func doFilerBackup(grpcDialOption grpc.DialOption, backupOption *FilerBackupOpti |
|
|
|
|
|
|
|
processEventFn := genProcessFunction(sourcePath, targetPath, dataSink, debug) |
|
|
|
|
|
|
|
processEventFnWithOffset := pb.AddOffsetFunc(processEventFn, 3 * time.Second, func(counter int64, lastTsNs int64) error { |
|
|
|
processEventFnWithOffset := pb.AddOffsetFunc(processEventFn, 3*time.Second, func(counter int64, lastTsNs int64) error { |
|
|
|
glog.V(0).Infof("backup %s progressed to %v %0.2f/sec", sourceFiler, time.Unix(0, lastTsNs), float64(counter)/float64(3)) |
|
|
|
return setOffset(grpcDialOption, sourceFiler, BackupKeyPrefix, int32(sinkId), lastTsNs) |
|
|
|
}) |
|
|
|
|
|
|
|
return pb.FollowMetadata(sourceFiler, grpcDialOption, "backup_" + dataSink.GetName(), |
|
|
|
return pb.FollowMetadata(sourceFiler, grpcDialOption, "backup_"+dataSink.GetName(), |
|
|
|
sourcePath, startFrom.UnixNano(), 0, processEventFnWithOffset, false) |
|
|
|
|
|
|
|
} |