From 1e89e719b31d2a26384131e3931ad0e40e54e92f Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Fri, 23 Aug 2019 16:19:00 +0100 Subject: [PATCH 01/37] Add windows memory map functions to storage package --- weed/storage/memory_map_windows.go | 216 +++++++++++++++++++++++++++++ 1 file changed, 216 insertions(+) create mode 100644 weed/storage/memory_map_windows.go diff --git a/weed/storage/memory_map_windows.go b/weed/storage/memory_map_windows.go new file mode 100644 index 000000000..a6c96caaf --- /dev/null +++ b/weed/storage/memory_map_windows.go @@ -0,0 +1,216 @@ +// +build windows + +package storage + +import ( + "reflect" + "syscall" + "unsafe" + + "golang.org/x/sys/windows" +) + +type DWORD = uint32 +type WORD = uint16 + +type memory_buffer struct { + aligned_length uint64 + length uint64 + aligned_ptr uintptr + ptr uintptr + buffer []byte +} + +type memory_map struct { + file_handle windows.Handle + file_memory_map_handle windows.Handle + write_map_views []memory_buffer + max_length uint64 + // read_map_views []memory_buffer +} + +var ( + procGetSystemInfo = syscall.NewLazyDLL("kernel32.dll").NewProc("GetSystemInfo") +) + +var system_info, err = getSystemInfo() + +var chunk_size = uint64(system_info.dwAllocationGranularity) * 512 + +func CreateMemoryMap(hFile windows.Handle, maxlength uint64) memory_map { + + mem_map := memory_map{} + maxlength_high := uint32(maxlength >> 32) + maxlength_low := uint32(maxlength & 0xFFFFFFFF) + file_memory_map_handle, err := windows.CreateFileMapping(hFile, nil, windows.PAGE_READWRITE, maxlength_high, maxlength_low, nil) + + if err != nil { + mem_map.file_handle = hFile + mem_map.file_memory_map_handle = file_memory_map_handle + mem_map.max_length = maxlength + } + + return mem_map +} + +func DeleteFileAndMemoryMap(mem_map memory_map) { + windows.CloseHandle(mem_map.file_memory_map_handle) + windows.CloseHandle(mem_map.file_handle) + + for _, view := range mem_map.write_map_views { + ReleaseMemory(view) + } + + mem_map.write_map_views = nil + mem_map.max_length = 0 +} + +func min(x, y uint64) uint64 { + if x < y { + return x + } + return y +} + +func WriteMemory(mem_map memory_map, offset uint64, length uint64, data []byte) { + + for { + if ((offset+length)/chunk_size)+1 > uint64(len(mem_map.write_map_views)) { + allocateChunk(mem_map) + } else { + break + } + } + + remaining_length := length + slice_index := offset / chunk_size + slice_offset := offset - (slice_index * chunk_size) + data_offset := uint64(0) + + for { + write_end := min(remaining_length, chunk_size) + copy(mem_map.write_map_views[slice_index].buffer[slice_offset:write_end], data[data_offset:]) + remaining_length -= (write_end - slice_offset) + data_offset += (write_end - slice_offset) + + if remaining_length > 0 { + slice_index += 1 + slice_offset = 0 + } else { + break + } + } +} + +func ReadMemory(mem_map memory_map, offset uint64, length uint64) (memory_buffer, error) { + return allocate(mem_map.file_memory_map_handle, offset, length, false) +} + +func ReleaseMemory(mem_buffer memory_buffer) { + windows.UnmapViewOfFile(mem_buffer.aligned_ptr) + + mem_buffer.ptr = 0 + mem_buffer.aligned_ptr = 0 + mem_buffer.length = 0 + mem_buffer.aligned_length = 0 + mem_buffer.buffer = nil +} + +func allocateChunk(mem_map memory_map) { + + start := uint64(len(mem_map.write_map_views)-1) * chunk_size + mem_buffer, err := allocate(mem_map.file_memory_map_handle, start, chunk_size, true) + + if err == nil { + mem_map.write_map_views = append(mem_map.write_map_views, mem_buffer) + } +} + +func allocate(hMapFile windows.Handle, offset uint64, length uint64, write bool) (memory_buffer, error) { + + mem_buffer := memory_buffer{} + + dwSysGran := system_info.dwAllocationGranularity + + start := (offset / uint64(dwSysGran)) * uint64(dwSysGran) + diff := offset - start + aligned_length := diff + length + + offset_high := uint32(start >> 32) + offset_low := uint32(start & 0xFFFFFFFF) + + access := windows.FILE_MAP_READ + + if write { + access = windows.FILE_MAP_WRITE + } + + addr_ptr, errno := windows.MapViewOfFile(hMapFile, + uint32(access), // read/write permission + offset_high, + offset_low, + uintptr(aligned_length)) + + if addr_ptr == 0 { + return mem_buffer, errno + } + + mem_buffer.aligned_ptr = addr_ptr + mem_buffer.aligned_length = aligned_length + mem_buffer.ptr = addr_ptr + uintptr(diff) + mem_buffer.length = length + + slice_header := (*reflect.SliceHeader)(unsafe.Pointer(&mem_buffer.buffer)) + slice_header.Data = addr_ptr + uintptr(diff) + slice_header.Len = int(length) + slice_header.Cap = int(length) + + return mem_buffer, nil +} + +// typedef struct _SYSTEM_INFO { +// union { +// DWORD dwOemId; +// struct { +// WORD wProcessorArchitecture; +// WORD wReserved; +// }; +// }; +// DWORD dwPageSize; +// LPVOID lpMinimumApplicationAddress; +// LPVOID lpMaximumApplicationAddress; +// DWORD_PTR dwActiveProcessorMask; +// DWORD dwNumberOfProcessors; +// DWORD dwProcessorType; +// DWORD dwAllocationGranularity; +// WORD wProcessorLevel; +// WORD wProcessorRevision; +// } SYSTEM_INFO; +// https://msdn.microsoft.com/en-us/library/ms724958(v=vs.85).aspx +type _SYSTEM_INFO struct { + dwOemId DWORD + dwPageSize DWORD + lpMinimumApplicationAddress uintptr + lpMaximumApplicationAddress uintptr + dwActiveProcessorMask uintptr + dwNumberOfProcessors DWORD + dwProcessorType DWORD + dwAllocationGranularity DWORD + wProcessorLevel WORD + wProcessorRevision WORD +} + +// void WINAPI GetSystemInfo( +// _Out_ LPSYSTEM_INFO lpSystemInfo +// ); +// https://msdn.microsoft.com/en-us/library/ms724381(VS.85).aspx +func getSystemInfo() (_SYSTEM_INFO, error) { + var si _SYSTEM_INFO + _, _, err := procGetSystemInfo.Call( + uintptr(unsafe.Pointer(&si)), + ) + if err != syscall.Errno(0) { + return si, err + } + return si, nil +} From 0e5d3b1a705a902a1876139b585d5b2922a92ce4 Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Wed, 28 Aug 2019 14:48:06 +0100 Subject: [PATCH 02/37] Move memory_map_windows to new folder, intercept most of the read and write calls to volume dat files --- .../{ => memory_map}/memory_map_windows.go | 42 +++-- weed/storage/needle/needle_read_write.go | 165 ++++++++++-------- weed/storage/volume_read_write.go | 6 + weed/storage/volume_super_block.go | 67 ++++--- 4 files changed, 170 insertions(+), 110 deletions(-) rename weed/storage/{ => memory_map}/memory_map_windows.go (83%) diff --git a/weed/storage/memory_map_windows.go b/weed/storage/memory_map/memory_map_windows.go similarity index 83% rename from weed/storage/memory_map_windows.go rename to weed/storage/memory_map/memory_map_windows.go index a6c96caaf..e293be515 100644 --- a/weed/storage/memory_map_windows.go +++ b/weed/storage/memory_map/memory_map_windows.go @@ -1,6 +1,6 @@ // +build windows -package storage +package memory_map import ( "reflect" @@ -13,19 +13,20 @@ import ( type DWORD = uint32 type WORD = uint16 -type memory_buffer struct { +type MemoryBuffer struct { aligned_length uint64 length uint64 aligned_ptr uintptr ptr uintptr - buffer []byte + Buffer []byte } -type memory_map struct { +type MemoryMap struct { file_handle windows.Handle file_memory_map_handle windows.Handle - write_map_views []memory_buffer + write_map_views []MemoryBuffer max_length uint64 + End_Of_File int64 // read_map_views []memory_buffer } @@ -33,13 +34,15 @@ var ( procGetSystemInfo = syscall.NewLazyDLL("kernel32.dll").NewProc("GetSystemInfo") ) +var FileMemoryMap = make(map[string]MemoryMap) + var system_info, err = getSystemInfo() var chunk_size = uint64(system_info.dwAllocationGranularity) * 512 -func CreateMemoryMap(hFile windows.Handle, maxlength uint64) memory_map { +func CreateMemoryMap(hFile windows.Handle, maxlength uint64) MemoryMap { - mem_map := memory_map{} + mem_map := MemoryMap{} maxlength_high := uint32(maxlength >> 32) maxlength_low := uint32(maxlength & 0xFFFFFFFF) file_memory_map_handle, err := windows.CreateFileMapping(hFile, nil, windows.PAGE_READWRITE, maxlength_high, maxlength_low, nil) @@ -48,12 +51,13 @@ func CreateMemoryMap(hFile windows.Handle, maxlength uint64) memory_map { mem_map.file_handle = hFile mem_map.file_memory_map_handle = file_memory_map_handle mem_map.max_length = maxlength + mem_map.End_Of_File = -1 } return mem_map } -func DeleteFileAndMemoryMap(mem_map memory_map) { +func DeleteFileAndMemoryMap(mem_map MemoryMap) { windows.CloseHandle(mem_map.file_memory_map_handle) windows.CloseHandle(mem_map.file_handle) @@ -72,7 +76,7 @@ func min(x, y uint64) uint64 { return y } -func WriteMemory(mem_map memory_map, offset uint64, length uint64, data []byte) { +func WriteMemory(mem_map MemoryMap, offset uint64, length uint64, data []byte) { for { if ((offset+length)/chunk_size)+1 > uint64(len(mem_map.write_map_views)) { @@ -89,7 +93,7 @@ func WriteMemory(mem_map memory_map, offset uint64, length uint64, data []byte) for { write_end := min(remaining_length, chunk_size) - copy(mem_map.write_map_views[slice_index].buffer[slice_offset:write_end], data[data_offset:]) + copy(mem_map.write_map_views[slice_index].Buffer[slice_offset:write_end], data[data_offset:]) remaining_length -= (write_end - slice_offset) data_offset += (write_end - slice_offset) @@ -100,23 +104,27 @@ func WriteMemory(mem_map memory_map, offset uint64, length uint64, data []byte) break } } + + if mem_map.End_Of_File < int64(offset+length) { + mem_map.End_Of_File = int64(offset + length) + } } -func ReadMemory(mem_map memory_map, offset uint64, length uint64) (memory_buffer, error) { +func ReadMemory(mem_map MemoryMap, offset uint64, length uint64) (MemoryBuffer, error) { return allocate(mem_map.file_memory_map_handle, offset, length, false) } -func ReleaseMemory(mem_buffer memory_buffer) { +func ReleaseMemory(mem_buffer MemoryBuffer) { windows.UnmapViewOfFile(mem_buffer.aligned_ptr) mem_buffer.ptr = 0 mem_buffer.aligned_ptr = 0 mem_buffer.length = 0 mem_buffer.aligned_length = 0 - mem_buffer.buffer = nil + mem_buffer.Buffer = nil } -func allocateChunk(mem_map memory_map) { +func allocateChunk(mem_map MemoryMap) { start := uint64(len(mem_map.write_map_views)-1) * chunk_size mem_buffer, err := allocate(mem_map.file_memory_map_handle, start, chunk_size, true) @@ -126,9 +134,9 @@ func allocateChunk(mem_map memory_map) { } } -func allocate(hMapFile windows.Handle, offset uint64, length uint64, write bool) (memory_buffer, error) { +func allocate(hMapFile windows.Handle, offset uint64, length uint64, write bool) (MemoryBuffer, error) { - mem_buffer := memory_buffer{} + mem_buffer := MemoryBuffer{} dwSysGran := system_info.dwAllocationGranularity @@ -160,7 +168,7 @@ func allocate(hMapFile windows.Handle, offset uint64, length uint64, write bool) mem_buffer.ptr = addr_ptr + uintptr(diff) mem_buffer.length = length - slice_header := (*reflect.SliceHeader)(unsafe.Pointer(&mem_buffer.buffer)) + slice_header := (*reflect.SliceHeader)(unsafe.Pointer(&mem_buffer.Buffer)) slice_header.Data = addr_ptr + uintptr(diff) slice_header.Len = int(length) slice_header.Cap = int(length) diff --git a/weed/storage/needle/needle_read_write.go b/weed/storage/needle/needle_read_write.go index 75aefdf16..828447bbe 100644 --- a/weed/storage/needle/needle_read_write.go +++ b/weed/storage/needle/needle_read_write.go @@ -11,6 +11,7 @@ import ( "github.com/chrislusf/seaweedfs/weed/glog" . "github.com/chrislusf/seaweedfs/weed/storage/types" "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/storage/memory_map" ) const ( @@ -29,39 +30,25 @@ func (n *Needle) DiskSize(version Version) int64 { return GetActualSize(n.Size, version) } -func (n *Needle) Append(w *os.File, version Version) (offset uint64, size uint32, actualSize int64, err error) { - if end, e := w.Seek(0, io.SeekEnd); e == nil { - defer func(w *os.File, off int64) { - if err != nil { - if te := w.Truncate(end); te != nil { - glog.V(0).Infof("Failed to truncate %s back to %d with error: %v", w.Name(), end, te) - } - } - }(w, end) - offset = uint64(end) - } else { - err = fmt.Errorf("Cannot Read Current Volume Position: %v", e) - return - } +func (n *Needle) prepareWriteBuffer(version Version) ([]byte, uint32, int64, error) { + + writeBytes := make([]byte, 0) + switch version { case Version1: header := make([]byte, NeedleHeaderSize) CookieToBytes(header[0:CookieSize], n.Cookie) NeedleIdToBytes(header[CookieSize:CookieSize+NeedleIdSize], n.Id) n.Size = uint32(len(n.Data)) - size = n.Size util.Uint32toBytes(header[CookieSize+NeedleIdSize:CookieSize+NeedleIdSize+SizeSize], n.Size) - if _, err = w.Write(header); err != nil { - return - } - if _, err = w.Write(n.Data); err != nil { - return - } - actualSize = NeedleHeaderSize + int64(n.Size) + size := n.Size + actualSize := NeedleHeaderSize + int64(n.Size) + writeBytes = append(writeBytes, header...) + writeBytes = append(writeBytes, n.Data...) padding := PaddingLength(n.Size, version) util.Uint32toBytes(header[0:NeedleChecksumSize], n.Checksum.Value()) - _, err = w.Write(header[0 : NeedleChecksumSize+padding]) - return + writeBytes = append(writeBytes, header[0:NeedleChecksumSize+padding]...) + return writeBytes, size, actualSize, nil case Version2, Version3: header := make([]byte, NeedleHeaderSize+TimestampSize) // adding timestamp to reuse it and avoid extra allocation CookieToBytes(header[0:CookieSize], n.Cookie) @@ -92,82 +79,103 @@ func (n *Needle) Append(w *os.File, version Version) (offset uint64, size uint32 } else { n.Size = 0 } - size = n.DataSize util.Uint32toBytes(header[CookieSize+NeedleIdSize:CookieSize+NeedleIdSize+SizeSize], n.Size) - if _, err = w.Write(header[0:NeedleHeaderSize]); err != nil { - return - } + writeBytes = append(writeBytes, header[0:NeedleHeaderSize]...) if n.DataSize > 0 { util.Uint32toBytes(header[0:4], n.DataSize) - if _, err = w.Write(header[0:4]); err != nil { - return - } - if _, err = w.Write(n.Data); err != nil { - return - } + writeBytes = append(writeBytes, header[0:4]...) + writeBytes = append(writeBytes, n.Data...) util.Uint8toBytes(header[0:1], n.Flags) - if _, err = w.Write(header[0:1]); err != nil { - return - } + writeBytes = append(writeBytes, header[0:1]...) if n.HasName() { util.Uint8toBytes(header[0:1], n.NameSize) - if _, err = w.Write(header[0:1]); err != nil { - return - } - if _, err = w.Write(n.Name[:n.NameSize]); err != nil { - return - } + writeBytes = append(writeBytes, header[0:1]...) + writeBytes = append(writeBytes, n.Name[:n.NameSize]...) } if n.HasMime() { util.Uint8toBytes(header[0:1], n.MimeSize) - if _, err = w.Write(header[0:1]); err != nil { - return - } - if _, err = w.Write(n.Mime); err != nil { - return - } + writeBytes = append(writeBytes, header[0:1]...) + writeBytes = append(writeBytes, n.Mime...) } if n.HasLastModifiedDate() { util.Uint64toBytes(header[0:8], n.LastModified) - if _, err = w.Write(header[8-LastModifiedBytesLength : 8]); err != nil { - return - } + writeBytes = append(writeBytes, header[8-LastModifiedBytesLength:8]...) } if n.HasTtl() && n.Ttl != nil { n.Ttl.ToBytes(header[0:TtlBytesLength]) - if _, err = w.Write(header[0:TtlBytesLength]); err != nil { - return - } + writeBytes = append(writeBytes, header[0:TtlBytesLength]...) } if n.HasPairs() { util.Uint16toBytes(header[0:2], n.PairsSize) - if _, err = w.Write(header[0:2]); err != nil { - return - } - if _, err = w.Write(n.Pairs); err != nil { - return - } + writeBytes = append(writeBytes, header[0:2]...) + writeBytes = append(writeBytes, n.Pairs...) } } padding := PaddingLength(n.Size, version) util.Uint32toBytes(header[0:NeedleChecksumSize], n.Checksum.Value()) if version == Version2 { - _, err = w.Write(header[0 : NeedleChecksumSize+padding]) + writeBytes = append(writeBytes, header[0:NeedleChecksumSize+padding]...) } else { // version3 util.Uint64toBytes(header[NeedleChecksumSize:NeedleChecksumSize+TimestampSize], n.AppendAtNs) - _, err = w.Write(header[0 : NeedleChecksumSize+TimestampSize+padding]) + writeBytes = append(writeBytes, header[0:NeedleChecksumSize+TimestampSize+padding]...) } - return offset, n.DataSize, GetActualSize(n.Size, version), err + return writeBytes, n.DataSize, GetActualSize(n.Size, version), nil } - return 0, 0, 0, fmt.Errorf("Unsupported Version! (%d)", version) + + return writeBytes, 0, 0, fmt.Errorf("Unsupported Version! (%d)", version) +} + +func (n *Needle) Append(w *os.File, version Version) (offset uint64, size uint32, actualSize int64, err error) { + + mem_map, exists := memory_map.FileMemoryMap[w.Name()] + if !exists { + if end, e := w.Seek(0, io.SeekEnd); e == nil { + defer func(w *os.File, off int64) { + if err != nil { + if te := w.Truncate(end); te != nil { + glog.V(0).Infof("Failed to truncate %s back to %d with error: %v", w.Name(), end, te) + } + } + }(w, end) + offset = uint64(end) + } else { + err = fmt.Errorf("Cannot Read Current Volume Position: %v", e) + return + } + } else { + offset = uint64(mem_map.End_Of_File + 1) + } + + bytesToWrite, size, actualSize, err := n.prepareWriteBuffer(version) + + if err == nil { + if exists { + memory_map.WriteMemory(mem_map, offset, uint64(len(bytesToWrite)), bytesToWrite) + } else { + _, err = w.Write(bytesToWrite) + } + } + + return offset, size, actualSize, err } func ReadNeedleBlob(r *os.File, offset int64, size uint32, version Version) (dataSlice []byte, err error) { - dataSlice = make([]byte, int(GetActualSize(size, version))) - _, err = r.ReadAt(dataSlice, offset) - return dataSlice, err + + dataSize := GetActualSize(size, version) + dataSlice = make([]byte, dataSize) + + mem_map, exists := memory_map.FileMemoryMap[r.Name()] + if exists { + mem_buffer, err := memory_map.ReadMemory(mem_map, uint64(offset), uint64(dataSize)) + copy(dataSlice, mem_buffer.Buffer) + memory_map.ReleaseMemory(mem_buffer) + return dataSlice, err + } else { + _, err = r.ReadAt(dataSlice, offset) + return dataSlice, err + } } // ReadBytes hydrates the needle from the bytes buffer, with only n.Id is set. @@ -280,14 +288,27 @@ func ReadNeedleHeader(r *os.File, version Version, offset int64) (n *Needle, byt n = new(Needle) if version == Version1 || version == Version2 || version == Version3 { bytes = make([]byte, NeedleHeaderSize) - var count int - count, err = r.ReadAt(bytes, offset) - if count <= 0 || err != nil { - return nil, bytes, 0, err + + mem_map, exists := memory_map.FileMemoryMap[r.Name()] + if exists { + mem_buffer, err := memory_map.ReadMemory(mem_map, uint64(offset), NeedleHeaderSize) + copy(bytes, mem_buffer.Buffer) + memory_map.ReleaseMemory(mem_buffer) + + if err != nil { + return nil, bytes, 0, err + } + } else { + var count int + count, err = r.ReadAt(bytes, offset) + if count <= 0 || err != nil { + return nil, bytes, 0, err + } } n.ParseNeedleHeader(bytes) bodyLength = NeedleBodyLength(n.Size, version) } + return } diff --git a/weed/storage/volume_read_write.go b/weed/storage/volume_read_write.go index ae05331a4..c7ba28e53 100644 --- a/weed/storage/volume_read_write.go +++ b/weed/storage/volume_read_write.go @@ -11,6 +11,7 @@ import ( "github.com/chrislusf/seaweedfs/weed/glog" "github.com/chrislusf/seaweedfs/weed/storage/needle" . "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/storage/memory_map" ) var ErrorNotFound = errors.New("not found") @@ -48,6 +49,11 @@ func (v *Volume) Destroy() (err error) { err = fmt.Errorf("volume %d is compacting", v.Id) return } + mem_map, exists := memory_map.FileMemoryMap[v.FileName()] + if exists { + memory_map.DeleteFileAndMemoryMap(mem_map) + } + v.Close() os.Remove(v.FileName() + ".dat") os.Remove(v.FileName() + ".idx") diff --git a/weed/storage/volume_super_block.go b/weed/storage/volume_super_block.go index 164c887e1..9ef615cb3 100644 --- a/weed/storage/volume_super_block.go +++ b/weed/storage/volume_super_block.go @@ -4,6 +4,8 @@ import ( "fmt" "os" + "github.com/joeslay/seaweedfs/weed/storage/memory_map" + "github.com/chrislusf/seaweedfs/weed/glog" "github.com/chrislusf/seaweedfs/weed/pb/master_pb" "github.com/chrislusf/seaweedfs/weed/storage/needle" @@ -70,24 +72,34 @@ func (s *SuperBlock) Bytes() []byte { } func (v *Volume) maybeWriteSuperBlock() error { - stat, e := v.dataFile.Stat() - if e != nil { - glog.V(0).Infof("failed to stat datafile %s: %v", v.dataFile.Name(), e) - return e - } - if stat.Size() == 0 { - v.SuperBlock.version = needle.CurrentVersion - _, e = v.dataFile.Write(v.SuperBlock.Bytes()) - if e != nil && os.IsPermission(e) { - //read-only, but zero length - recreate it! - if v.dataFile, e = os.Create(v.dataFile.Name()); e == nil { - if _, e = v.dataFile.Write(v.SuperBlock.Bytes()); e == nil { - v.readOnly = false + + mem_map, exists := memory_map.FileMemoryMap[v.FileName()] + if exists { + if mem_map.End_Of_File == -1 { + v.SuperBlock.version = needle.CurrentVersion + memory_map.WriteMemory(mem_map, 0, uint64(len(v.SuperBlock.Bytes())), v.SuperBlock.Bytes()) + } + return nil + } else { + stat, e := v.dataFile.Stat() + if e != nil { + glog.V(0).Infof("failed to stat datafile %s: %v", v.dataFile.Name(), e) + return e + } + if stat.Size() == 0 { + v.SuperBlock.version = needle.CurrentVersion + _, e = v.dataFile.Write(v.SuperBlock.Bytes()) + if e != nil && os.IsPermission(e) { + //read-only, but zero length - recreate it! + if v.dataFile, e = os.Create(v.dataFile.Name()); e == nil { + if _, e = v.dataFile.Write(v.SuperBlock.Bytes()); e == nil { + v.readOnly = false + } } } } + return e } - return e } func (v *Volume) readSuperBlock() (err error) { @@ -97,15 +109,28 @@ func (v *Volume) readSuperBlock() (err error) { // ReadSuperBlock reads from data file and load it into volume's super block func ReadSuperBlock(dataFile *os.File) (superBlock SuperBlock, err error) { - if _, err = dataFile.Seek(0, 0); err != nil { - err = fmt.Errorf("cannot seek to the beginning of %s: %v", dataFile.Name(), err) - return - } + header := make([]byte, _SuperBlockSize) - if _, e := dataFile.Read(header); e != nil { - err = fmt.Errorf("cannot read volume %s super block: %v", dataFile.Name(), e) - return + mem_map, exists := memory_map.FileMemoryMap[dataFile.Name()] + if exists { + mem_buffer, e := memory_map.ReadMemory(mem_map, 0, _SuperBlockSize) + if err != nil { + err = fmt.Errorf("cannot read volume %s super block: %v", dataFile.Name(), e) + return + } + copy(header, mem_buffer.Buffer) + memory_map.ReleaseMemory(mem_buffer) + } else { + if _, err = dataFile.Seek(0, 0); err != nil { + err = fmt.Errorf("cannot seek to the beginning of %s: %v", dataFile.Name(), err) + return + } + if _, e := dataFile.Read(header); e != nil { + err = fmt.Errorf("cannot read volume %s super block: %v", dataFile.Name(), e) + return + } } + superBlock.version = needle.Version(header[0]) if superBlock.ReplicaPlacement, err = NewReplicaPlacementFromByte(header[1]); err != nil { err = fmt.Errorf("cannot read replica type: %s", err.Error()) From 523f3a12b3c02070f00c3baff3be06175732db3b Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Wed, 28 Aug 2019 15:40:47 +0100 Subject: [PATCH 03/37] use Os.File/uintptr instead of windows.Handle in memory map struct --- weed/storage/memory_map/memory_map_windows.go | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/weed/storage/memory_map/memory_map_windows.go b/weed/storage/memory_map/memory_map_windows.go index e293be515..8ddbaa948 100644 --- a/weed/storage/memory_map/memory_map_windows.go +++ b/weed/storage/memory_map/memory_map_windows.go @@ -3,6 +3,7 @@ package memory_map import ( + "os" "reflect" "syscall" "unsafe" @@ -10,9 +11,6 @@ import ( "golang.org/x/sys/windows" ) -type DWORD = uint32 -type WORD = uint16 - type MemoryBuffer struct { aligned_length uint64 length uint64 @@ -22,34 +20,36 @@ type MemoryBuffer struct { } type MemoryMap struct { - file_handle windows.Handle - file_memory_map_handle windows.Handle + file_handle *os.File + file_memory_map_handle uintptr write_map_views []MemoryBuffer max_length uint64 End_Of_File int64 - // read_map_views []memory_buffer } +var FileMemoryMap = make(map[string]MemoryMap) + +type DWORD = uint32 +type WORD = uint16 + var ( procGetSystemInfo = syscall.NewLazyDLL("kernel32.dll").NewProc("GetSystemInfo") ) -var FileMemoryMap = make(map[string]MemoryMap) - var system_info, err = getSystemInfo() var chunk_size = uint64(system_info.dwAllocationGranularity) * 512 -func CreateMemoryMap(hFile windows.Handle, maxlength uint64) MemoryMap { +func CreateMemoryMap(file *os.File, maxlength uint64) MemoryMap { mem_map := MemoryMap{} maxlength_high := uint32(maxlength >> 32) maxlength_low := uint32(maxlength & 0xFFFFFFFF) - file_memory_map_handle, err := windows.CreateFileMapping(hFile, nil, windows.PAGE_READWRITE, maxlength_high, maxlength_low, nil) + file_memory_map_handle, err := windows.CreateFileMapping(windows.Handle(file.Fd()), nil, windows.PAGE_READWRITE, maxlength_high, maxlength_low, nil) if err != nil { - mem_map.file_handle = hFile - mem_map.file_memory_map_handle = file_memory_map_handle + mem_map.file_handle = file + mem_map.file_memory_map_handle = uintptr(file_memory_map_handle) mem_map.max_length = maxlength mem_map.End_Of_File = -1 } @@ -58,8 +58,8 @@ func CreateMemoryMap(hFile windows.Handle, maxlength uint64) MemoryMap { } func DeleteFileAndMemoryMap(mem_map MemoryMap) { - windows.CloseHandle(mem_map.file_memory_map_handle) - windows.CloseHandle(mem_map.file_handle) + windows.CloseHandle(windows.Handle(mem_map.file_memory_map_handle)) + windows.CloseHandle(windows.Handle(mem_map.file_handle.Fd())) for _, view := range mem_map.write_map_views { ReleaseMemory(view) @@ -111,7 +111,7 @@ func WriteMemory(mem_map MemoryMap, offset uint64, length uint64, data []byte) { } func ReadMemory(mem_map MemoryMap, offset uint64, length uint64) (MemoryBuffer, error) { - return allocate(mem_map.file_memory_map_handle, offset, length, false) + return allocate(windows.Handle(mem_map.file_memory_map_handle), offset, length, false) } func ReleaseMemory(mem_buffer MemoryBuffer) { @@ -127,7 +127,7 @@ func ReleaseMemory(mem_buffer MemoryBuffer) { func allocateChunk(mem_map MemoryMap) { start := uint64(len(mem_map.write_map_views)-1) * chunk_size - mem_buffer, err := allocate(mem_map.file_memory_map_handle, start, chunk_size, true) + mem_buffer, err := allocate(windows.Handle(mem_map.file_memory_map_handle), start, chunk_size, true) if err == nil { mem_map.write_map_views = append(mem_map.write_map_views, mem_buffer) From dc50701e7d69f4349e6a952b622841e6705f3260 Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Wed, 28 Aug 2019 16:59:42 +0100 Subject: [PATCH 04/37] Overload createFile function, expose File in memory_map struct, delete from memory_map map on delete --- weed/os_overloads/file_windows.go | 168 ++++++++++++++++++ weed/os_overloads/syscall_windows.go | 80 +++++++++ weed/os_overloads/types_windows.go | 9 + weed/storage/memory_map/memory_map_windows.go | 6 +- weed/storage/volume_create.go | 2 +- weed/storage/volume_create_windows.go | 30 ++++ weed/storage/volume_read_write.go | 1 + 7 files changed, 292 insertions(+), 4 deletions(-) create mode 100644 weed/os_overloads/file_windows.go create mode 100644 weed/os_overloads/syscall_windows.go create mode 100644 weed/os_overloads/types_windows.go create mode 100644 weed/storage/volume_create_windows.go diff --git a/weed/os_overloads/file_windows.go b/weed/os_overloads/file_windows.go new file mode 100644 index 000000000..05aa384e2 --- /dev/null +++ b/weed/os_overloads/file_windows.go @@ -0,0 +1,168 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package os_overloads + +import ( + "os" + "syscall" + + "golang.org/x/sys/windows" +) + +func isAbs(path string) (b bool) { + v := volumeName(path) + if v == "" { + return false + } + path = path[len(v):] + if path == "" { + return false + } + return os.IsPathSeparator(path[0]) +} + +func volumeName(path string) (v string) { + if len(path) < 2 { + return "" + } + // with drive letter + c := path[0] + if path[1] == ':' && + ('0' <= c && c <= '9' || 'a' <= c && c <= 'z' || + 'A' <= c && c <= 'Z') { + return path[:2] + } + // is it UNC + if l := len(path); l >= 5 && os.IsPathSeparator(path[0]) && os.IsPathSeparator(path[1]) && + !os.IsPathSeparator(path[2]) && path[2] != '.' { + // first, leading `\\` and next shouldn't be `\`. its server name. + for n := 3; n < l-1; n++ { + // second, next '\' shouldn't be repeated. + if os.IsPathSeparator(path[n]) { + n++ + // third, following something characters. its share name. + if !os.IsPathSeparator(path[n]) { + if path[n] == '.' { + break + } + for ; n < l; n++ { + if os.IsPathSeparator(path[n]) { + break + } + } + return path[:n] + } + break + } + } + } + return "" +} + +// fixLongPath returns the extended-length (\\?\-prefixed) form of +// path when needed, in order to avoid the default 260 character file +// path limit imposed by Windows. If path is not easily converted to +// the extended-length form (for example, if path is a relative path +// or contains .. elements), or is short enough, fixLongPath returns +// path unmodified. +// +// See https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath +func fixLongPath(path string) string { + // Do nothing (and don't allocate) if the path is "short". + // Empirically (at least on the Windows Server 2013 builder), + // the kernel is arbitrarily okay with < 248 bytes. That + // matches what the docs above say: + // "When using an API to create a directory, the specified + // path cannot be so long that you cannot append an 8.3 file + // name (that is, the directory name cannot exceed MAX_PATH + // minus 12)." Since MAX_PATH is 260, 260 - 12 = 248. + // + // The MSDN docs appear to say that a normal path that is 248 bytes long + // will work; empirically the path must be less then 248 bytes long. + if len(path) < 248 { + // Don't fix. (This is how Go 1.7 and earlier worked, + // not automatically generating the \\?\ form) + return path + } + + // The extended form begins with \\?\, as in + // \\?\c:\windows\foo.txt or \\?\UNC\server\share\foo.txt. + // The extended form disables evaluation of . and .. path + // elements and disables the interpretation of / as equivalent + // to \. The conversion here rewrites / to \ and elides + // . elements as well as trailing or duplicate separators. For + // simplicity it avoids the conversion entirely for relative + // paths or paths containing .. elements. For now, + // \\server\share paths are not converted to + // \\?\UNC\server\share paths because the rules for doing so + // are less well-specified. + if len(path) >= 2 && path[:2] == `\\` { + // Don't canonicalize UNC paths. + return path + } + if !isAbs(path) { + // Relative path + return path + } + + const prefix = `\\?` + + pathbuf := make([]byte, len(prefix)+len(path)+len(`\`)) + copy(pathbuf, prefix) + n := len(path) + r, w := 0, len(prefix) + for r < n { + switch { + case os.IsPathSeparator(path[r]): + // empty block + r++ + case path[r] == '.' && (r+1 == n || os.IsPathSeparator(path[r+1])): + // /./ + r++ + case r+1 < n && path[r] == '.' && path[r+1] == '.' && (r+2 == n || os.IsPathSeparator(path[r+2])): + // /../ is currently unhandled + return path + default: + pathbuf[w] = '\\' + w++ + for ; r < n && !os.IsPathSeparator(path[r]); r++ { + pathbuf[w] = path[r] + w++ + } + } + } + // A drive's root directory needs a trailing \ + if w == len(`\\?\c:`) { + pathbuf[w] = '\\' + w++ + } + return string(pathbuf[:w]) +} + +// syscallMode returns the syscall-specific mode bits from Go's portable mode bits. +func syscallMode(i os.FileMode) (o uint32) { + o |= uint32(i.Perm()) + if i&os.ModeSetuid != 0 { + o |= syscall.S_ISUID + } + if i&os.ModeSetgid != 0 { + o |= syscall.S_ISGID + } + if i&os.ModeSticky != 0 { + o |= syscall.S_ISVTX + } + // No mapping for Go's ModeTemporary (plan9 only). + return +} + +//If the bool is set to true then the file is opened with the parameters FILE_ATTRIBUTE_TEMPORARY and +// FILE_FLAG_DELETE_ON_CLOSE +func OpenFile(name string, flag int, perm os.FileMode, setToTempAndDelete bool) (file *os.File, err error) { + r, e := Open(fixLongPath(name), flag|windows.O_CLOEXEC, syscallMode(perm), setToTempAndDelete) + if e != nil { + return nil, e + } + return os.NewFile(uintptr(r), name), nil +} diff --git a/weed/os_overloads/syscall_windows.go b/weed/os_overloads/syscall_windows.go new file mode 100644 index 000000000..081cba431 --- /dev/null +++ b/weed/os_overloads/syscall_windows.go @@ -0,0 +1,80 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Windows system calls. + +package os_overloads + +import ( + "syscall" + "unsafe" + + "golang.org/x/sys/windows" +) + +// windows api calls + +//sys CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile int32) (handle Handle, err error) [failretval==InvalidHandle] = CreateFileW + +func makeInheritSa() *syscall.SecurityAttributes { + var sa syscall.SecurityAttributes + sa.Length = uint32(unsafe.Sizeof(sa)) + sa.InheritHandle = 1 + return &sa +} + +// opens the +func Open(path string, mode int, perm uint32, setToTempAndDelete bool) (fd syscall.Handle, err error) { + if len(path) == 0 { + return syscall.InvalidHandle, windows.ERROR_FILE_NOT_FOUND + } + pathp, err := syscall.UTF16PtrFromString(path) + if err != nil { + return syscall.InvalidHandle, err + } + var access uint32 + switch mode & (windows.O_RDONLY | windows.O_WRONLY | windows.O_RDWR) { + case windows.O_RDONLY: + access = windows.GENERIC_READ + case windows.O_WRONLY: + access = windows.GENERIC_WRITE + case windows.O_RDWR: + access = windows.GENERIC_READ | windows.GENERIC_WRITE + } + if mode&windows.O_CREAT != 0 { + access |= windows.GENERIC_WRITE + } + if mode&windows.O_APPEND != 0 { + access &^= windows.GENERIC_WRITE + access |= windows.FILE_APPEND_DATA + } + sharemode := uint32(windows.FILE_SHARE_READ | windows.FILE_SHARE_WRITE) + var sa *syscall.SecurityAttributes + if mode&windows.O_CLOEXEC == 0 { + sa = makeInheritSa() + } + var createmode uint32 + switch { + case mode&(windows.O_CREAT|windows.O_EXCL) == (windows.O_CREAT | windows.O_EXCL): + createmode = windows.CREATE_NEW + case mode&(windows.O_CREAT|windows.O_TRUNC) == (windows.O_CREAT | windows.O_TRUNC): + createmode = windows.CREATE_ALWAYS + case mode&windows.O_CREAT == windows.O_CREAT: + createmode = windows.OPEN_ALWAYS + case mode&windows.O_TRUNC == windows.O_TRUNC: + createmode = windows.TRUNCATE_EXISTING + default: + createmode = windows.OPEN_EXISTING + } + + var h syscall.Handle + var e error + + if setToTempAndDelete { + h, e = syscall.CreateFile(pathp, access, sharemode, sa, createmode, (windows.FILE_ATTRIBUTE_TEMPORARY | FILE_FLAG_DELETE_ON_CLOSE), 0) + } else { + h, e = syscall.CreateFile(pathp, access, sharemode, sa, createmode, windows.FILE_ATTRIBUTE_NORMAL, 0) + } + return h, e +} diff --git a/weed/os_overloads/types_windows.go b/weed/os_overloads/types_windows.go new file mode 100644 index 000000000..254ba3002 --- /dev/null +++ b/weed/os_overloads/types_windows.go @@ -0,0 +1,9 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package os_overloads + +const ( + FILE_FLAG_DELETE_ON_CLOSE = 0x04000000 +) diff --git a/weed/storage/memory_map/memory_map_windows.go b/weed/storage/memory_map/memory_map_windows.go index 8ddbaa948..069587334 100644 --- a/weed/storage/memory_map/memory_map_windows.go +++ b/weed/storage/memory_map/memory_map_windows.go @@ -20,7 +20,7 @@ type MemoryBuffer struct { } type MemoryMap struct { - file_handle *os.File + File *os.File file_memory_map_handle uintptr write_map_views []MemoryBuffer max_length uint64 @@ -48,7 +48,7 @@ func CreateMemoryMap(file *os.File, maxlength uint64) MemoryMap { file_memory_map_handle, err := windows.CreateFileMapping(windows.Handle(file.Fd()), nil, windows.PAGE_READWRITE, maxlength_high, maxlength_low, nil) if err != nil { - mem_map.file_handle = file + mem_map.File = file mem_map.file_memory_map_handle = uintptr(file_memory_map_handle) mem_map.max_length = maxlength mem_map.End_Of_File = -1 @@ -59,7 +59,7 @@ func CreateMemoryMap(file *os.File, maxlength uint64) MemoryMap { func DeleteFileAndMemoryMap(mem_map MemoryMap) { windows.CloseHandle(windows.Handle(mem_map.file_memory_map_handle)) - windows.CloseHandle(windows.Handle(mem_map.file_handle.Fd())) + windows.CloseHandle(windows.Handle(mem_map.File.Fd())) for _, view := range mem_map.write_map_views { ReleaseMemory(view) diff --git a/weed/storage/volume_create.go b/weed/storage/volume_create.go index 6b3a17439..275c69fad 100644 --- a/weed/storage/volume_create.go +++ b/weed/storage/volume_create.go @@ -1,4 +1,4 @@ -// +build !linux +// +build !linux, !windows package storage diff --git a/weed/storage/volume_create_windows.go b/weed/storage/volume_create_windows.go new file mode 100644 index 000000000..62d5a12b9 --- /dev/null +++ b/weed/storage/volume_create_windows.go @@ -0,0 +1,30 @@ +// +build windows + +package storage + +import ( + "os" + + "github.com/joeslay/seaweedfs/weed/storage/memory_map" + "golang.org/x/sys/windows" + + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/os_overloads" +) + +func createVolumeFile(fileName string, preallocate int64) (*os.File, error) { + + mem_map, exists := memory_map.FileMemoryMap[fileName] + if !exists { + file, e := os_overloads.OpenFile(fileName, windows.O_RDWR|windows.O_CREAT, 0644, true) + new_mem_map := memory_map.CreateMemoryMap(file, 2^32) + memory_map.FileMemoryMap[fileName] = new_mem_map + + if preallocate > 0 { + glog.V(0).Infof("Preallocated disk space for %s is not supported", fileName) + } + return file, e + } else { + return mem_map.File, nil + } +} diff --git a/weed/storage/volume_read_write.go b/weed/storage/volume_read_write.go index c7ba28e53..252e337b9 100644 --- a/weed/storage/volume_read_write.go +++ b/weed/storage/volume_read_write.go @@ -52,6 +52,7 @@ func (v *Volume) Destroy() (err error) { mem_map, exists := memory_map.FileMemoryMap[v.FileName()] if exists { memory_map.DeleteFileAndMemoryMap(mem_map) + delete(memory_map.FileMemoryMap, v.FileName()) } v.Close() From 840ccdc35d9870f5d408c1c265b451e3eef5210c Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Fri, 30 Aug 2019 12:15:17 +0100 Subject: [PATCH 05/37] Refactor to pass memory maps by reference instead of value, fix memory maps not being created properly or written to properly --- weed/storage/memory_map/memory_map_windows.go | 30 +++++++++---------- weed/storage/needle/needle_read_write.go | 16 +++++----- weed/storage/volume_create_windows.go | 8 +++-- weed/storage/volume_read_write.go | 8 ++--- weed/storage/volume_super_block.go | 16 +++++----- 5 files changed, 39 insertions(+), 39 deletions(-) diff --git a/weed/storage/memory_map/memory_map_windows.go b/weed/storage/memory_map/memory_map_windows.go index 069587334..ffc3a0854 100644 --- a/weed/storage/memory_map/memory_map_windows.go +++ b/weed/storage/memory_map/memory_map_windows.go @@ -27,7 +27,7 @@ type MemoryMap struct { End_Of_File int64 } -var FileMemoryMap = make(map[string]MemoryMap) +var FileMemoryMap = make(map[string]*MemoryMap) type DWORD = uint32 type WORD = uint16 @@ -40,29 +40,27 @@ var system_info, err = getSystemInfo() var chunk_size = uint64(system_info.dwAllocationGranularity) * 512 -func CreateMemoryMap(file *os.File, maxlength uint64) MemoryMap { +func (mem_map *MemoryMap) CreateMemoryMap(file *os.File, maxlength uint64) { - mem_map := MemoryMap{} maxlength_high := uint32(maxlength >> 32) maxlength_low := uint32(maxlength & 0xFFFFFFFF) file_memory_map_handle, err := windows.CreateFileMapping(windows.Handle(file.Fd()), nil, windows.PAGE_READWRITE, maxlength_high, maxlength_low, nil) - if err != nil { + if err == nil { mem_map.File = file mem_map.file_memory_map_handle = uintptr(file_memory_map_handle) + mem_map.write_map_views = make([]MemoryBuffer, 0, maxlength/chunk_size) mem_map.max_length = maxlength mem_map.End_Of_File = -1 } - - return mem_map } -func DeleteFileAndMemoryMap(mem_map MemoryMap) { +func (mem_map *MemoryMap) DeleteFileAndMemoryMap() { windows.CloseHandle(windows.Handle(mem_map.file_memory_map_handle)) windows.CloseHandle(windows.Handle(mem_map.File.Fd())) for _, view := range mem_map.write_map_views { - ReleaseMemory(view) + view.ReleaseMemory() } mem_map.write_map_views = nil @@ -76,7 +74,7 @@ func min(x, y uint64) uint64 { return y } -func WriteMemory(mem_map MemoryMap, offset uint64, length uint64, data []byte) { +func (mem_map *MemoryMap) WriteMemory(offset uint64, length uint64, data []byte) { for { if ((offset+length)/chunk_size)+1 > uint64(len(mem_map.write_map_views)) { @@ -92,7 +90,7 @@ func WriteMemory(mem_map MemoryMap, offset uint64, length uint64, data []byte) { data_offset := uint64(0) for { - write_end := min(remaining_length, chunk_size) + write_end := min((remaining_length + slice_offset), chunk_size) copy(mem_map.write_map_views[slice_index].Buffer[slice_offset:write_end], data[data_offset:]) remaining_length -= (write_end - slice_offset) data_offset += (write_end - slice_offset) @@ -105,16 +103,16 @@ func WriteMemory(mem_map MemoryMap, offset uint64, length uint64, data []byte) { } } - if mem_map.End_Of_File < int64(offset+length) { - mem_map.End_Of_File = int64(offset + length) + if mem_map.End_Of_File < int64(offset+length-1) { + mem_map.End_Of_File = int64(offset + length - 1) } } -func ReadMemory(mem_map MemoryMap, offset uint64, length uint64) (MemoryBuffer, error) { +func (mem_map *MemoryMap) ReadMemory(offset uint64, length uint64) (MemoryBuffer, error) { return allocate(windows.Handle(mem_map.file_memory_map_handle), offset, length, false) } -func ReleaseMemory(mem_buffer MemoryBuffer) { +func (mem_buffer *MemoryBuffer) ReleaseMemory() { windows.UnmapViewOfFile(mem_buffer.aligned_ptr) mem_buffer.ptr = 0 @@ -124,9 +122,9 @@ func ReleaseMemory(mem_buffer MemoryBuffer) { mem_buffer.Buffer = nil } -func allocateChunk(mem_map MemoryMap) { +func allocateChunk(mem_map *MemoryMap) { - start := uint64(len(mem_map.write_map_views)-1) * chunk_size + start := uint64(len(mem_map.write_map_views)) * chunk_size mem_buffer, err := allocate(windows.Handle(mem_map.file_memory_map_handle), start, chunk_size, true) if err == nil { diff --git a/weed/storage/needle/needle_read_write.go b/weed/storage/needle/needle_read_write.go index 828447bbe..7edc35536 100644 --- a/weed/storage/needle/needle_read_write.go +++ b/weed/storage/needle/needle_read_write.go @@ -8,10 +8,10 @@ import ( "math" - "github.com/chrislusf/seaweedfs/weed/glog" - . "github.com/chrislusf/seaweedfs/weed/storage/types" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" "github.com/joeslay/seaweedfs/weed/storage/memory_map" + . "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/util" ) const ( @@ -152,7 +152,7 @@ func (n *Needle) Append(w *os.File, version Version) (offset uint64, size uint32 if err == nil { if exists { - memory_map.WriteMemory(mem_map, offset, uint64(len(bytesToWrite)), bytesToWrite) + mem_map.WriteMemory(offset, uint64(len(bytesToWrite)), bytesToWrite) } else { _, err = w.Write(bytesToWrite) } @@ -168,9 +168,9 @@ func ReadNeedleBlob(r *os.File, offset int64, size uint32, version Version) (dat mem_map, exists := memory_map.FileMemoryMap[r.Name()] if exists { - mem_buffer, err := memory_map.ReadMemory(mem_map, uint64(offset), uint64(dataSize)) + mem_buffer, err := mem_map.ReadMemory(uint64(offset), uint64(dataSize)) copy(dataSlice, mem_buffer.Buffer) - memory_map.ReleaseMemory(mem_buffer) + mem_buffer.ReleaseMemory() return dataSlice, err } else { _, err = r.ReadAt(dataSlice, offset) @@ -291,9 +291,9 @@ func ReadNeedleHeader(r *os.File, version Version, offset int64) (n *Needle, byt mem_map, exists := memory_map.FileMemoryMap[r.Name()] if exists { - mem_buffer, err := memory_map.ReadMemory(mem_map, uint64(offset), NeedleHeaderSize) + mem_buffer, err := mem_map.ReadMemory(uint64(offset), NeedleHeaderSize) copy(bytes, mem_buffer.Buffer) - memory_map.ReleaseMemory(mem_buffer) + mem_buffer.ReleaseMemory() if err != nil { return nil, bytes, 0, err diff --git a/weed/storage/volume_create_windows.go b/weed/storage/volume_create_windows.go index 62d5a12b9..5b30d3d52 100644 --- a/weed/storage/volume_create_windows.go +++ b/weed/storage/volume_create_windows.go @@ -8,7 +8,7 @@ import ( "github.com/joeslay/seaweedfs/weed/storage/memory_map" "golang.org/x/sys/windows" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/glog" "github.com/joeslay/seaweedfs/weed/os_overloads" ) @@ -17,8 +17,10 @@ func createVolumeFile(fileName string, preallocate int64) (*os.File, error) { mem_map, exists := memory_map.FileMemoryMap[fileName] if !exists { file, e := os_overloads.OpenFile(fileName, windows.O_RDWR|windows.O_CREAT, 0644, true) - new_mem_map := memory_map.CreateMemoryMap(file, 2^32) - memory_map.FileMemoryMap[fileName] = new_mem_map + memory_map.FileMemoryMap[fileName] = new(memory_map.MemoryMap) + + new_mem_map := memory_map.FileMemoryMap[fileName] + new_mem_map.CreateMemoryMap(file, 1024*1024*1024*4) if preallocate > 0 { glog.V(0).Infof("Preallocated disk space for %s is not supported", fileName) diff --git a/weed/storage/volume_read_write.go b/weed/storage/volume_read_write.go index 252e337b9..477bea285 100644 --- a/weed/storage/volume_read_write.go +++ b/weed/storage/volume_read_write.go @@ -8,10 +8,10 @@ import ( "os" "time" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - . "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/glog" "github.com/joeslay/seaweedfs/weed/storage/memory_map" + "github.com/joeslay/seaweedfs/weed/storage/needle" + . "github.com/joeslay/seaweedfs/weed/storage/types" ) var ErrorNotFound = errors.New("not found") @@ -51,7 +51,7 @@ func (v *Volume) Destroy() (err error) { } mem_map, exists := memory_map.FileMemoryMap[v.FileName()] if exists { - memory_map.DeleteFileAndMemoryMap(mem_map) + mem_map.DeleteFileAndMemoryMap() delete(memory_map.FileMemoryMap, v.FileName()) } diff --git a/weed/storage/volume_super_block.go b/weed/storage/volume_super_block.go index 9ef615cb3..8829909c1 100644 --- a/weed/storage/volume_super_block.go +++ b/weed/storage/volume_super_block.go @@ -6,11 +6,11 @@ import ( "github.com/joeslay/seaweedfs/weed/storage/memory_map" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - "github.com/chrislusf/seaweedfs/weed/util" "github.com/golang/protobuf/proto" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/util" ) const ( @@ -73,11 +73,11 @@ func (s *SuperBlock) Bytes() []byte { func (v *Volume) maybeWriteSuperBlock() error { - mem_map, exists := memory_map.FileMemoryMap[v.FileName()] + mem_map, exists := memory_map.FileMemoryMap[v.dataFile.Name()] if exists { if mem_map.End_Of_File == -1 { v.SuperBlock.version = needle.CurrentVersion - memory_map.WriteMemory(mem_map, 0, uint64(len(v.SuperBlock.Bytes())), v.SuperBlock.Bytes()) + mem_map.WriteMemory(0, uint64(len(v.SuperBlock.Bytes())), v.SuperBlock.Bytes()) } return nil } else { @@ -113,13 +113,13 @@ func ReadSuperBlock(dataFile *os.File) (superBlock SuperBlock, err error) { header := make([]byte, _SuperBlockSize) mem_map, exists := memory_map.FileMemoryMap[dataFile.Name()] if exists { - mem_buffer, e := memory_map.ReadMemory(mem_map, 0, _SuperBlockSize) + mem_buffer, e := mem_map.ReadMemory(0, _SuperBlockSize) if err != nil { err = fmt.Errorf("cannot read volume %s super block: %v", dataFile.Name(), e) return } copy(header, mem_buffer.Buffer) - memory_map.ReleaseMemory(mem_buffer) + mem_buffer.ReleaseMemory() } else { if _, err = dataFile.Seek(0, 0); err != nil { err = fmt.Errorf("cannot seek to the beginning of %s: %v", dataFile.Name(), err) From 1e62a2b233458262c875dcf182309cc2425fe5a8 Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Fri, 30 Aug 2019 16:55:33 +0100 Subject: [PATCH 06/37] Fix memory not being unmapped --- weed/storage/volume_read_write.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weed/storage/volume_read_write.go b/weed/storage/volume_read_write.go index 477bea285..2cb437730 100644 --- a/weed/storage/volume_read_write.go +++ b/weed/storage/volume_read_write.go @@ -49,10 +49,10 @@ func (v *Volume) Destroy() (err error) { err = fmt.Errorf("volume %d is compacting", v.Id) return } - mem_map, exists := memory_map.FileMemoryMap[v.FileName()] + mem_map, exists := memory_map.FileMemoryMap[v.dataFile.Name()] if exists { mem_map.DeleteFileAndMemoryMap() - delete(memory_map.FileMemoryMap, v.FileName()) + delete(memory_map.FileMemoryMap, v.dataFile.Name()) } v.Close() From 595a1beff00196c9b207787833578ba1de1847e5 Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Mon, 2 Sep 2019 11:28:40 +0100 Subject: [PATCH 07/37] Swap imports to use joeslay --- .../change_superblock/change_superblock.go | 6 +-- unmaintained/fix_dat/fix_dat.go | 10 ++--- .../repeated_vacuum/repeated_vacuum.go | 6 +-- unmaintained/see_dat/see_dat.go | 6 +-- unmaintained/see_idx/see_idx.go | 6 +-- unmaintained/see_meta/see_meta.go | 6 +-- unmaintained/volume_tailer/volume_tailer.go | 8 ++-- weed/command/backup.go | 10 ++--- weed/command/benchmark.go | 10 ++--- weed/command/compact.go | 6 +-- weed/command/download.go | 4 +- weed/command/export.go | 8 ++-- weed/command/filer.go | 10 ++--- weed/command/filer_copy.go | 10 ++--- weed/command/filer_replication.go | 20 ++++----- weed/command/fix.go | 8 ++-- weed/command/master.go | 10 ++--- weed/command/mount_std.go | 8 ++-- weed/command/s3.go | 8 ++-- weed/command/server.go | 4 +- weed/command/shell.go | 6 +-- weed/command/upload.go | 6 +-- weed/command/version.go | 2 +- weed/command/volume.go | 12 +++--- weed/command/volume_test.go | 2 +- weed/command/webdav.go | 8 ++-- .../filer2/abstract_sql/abstract_sql_store.go | 4 +- weed/filer2/cassandra/cassandra_store.go | 6 +-- weed/filer2/configuration.go | 2 +- weed/filer2/entry.go | 2 +- weed/filer2/entry_codec.go | 2 +- weed/filer2/etcd/etcd_store.go | 6 +-- weed/filer2/filechunks.go | 2 +- weed/filer2/filechunks_test.go | 2 +- weed/filer2/filer.go | 4 +- weed/filer2/filer_client_util.go | 6 +-- weed/filer2/filer_deletion.go | 6 +-- weed/filer2/filer_notify.go | 6 +-- weed/filer2/filer_notify_test.go | 2 +- weed/filer2/filerstore.go | 6 +-- weed/filer2/leveldb/leveldb_store.go | 6 +-- weed/filer2/leveldb/leveldb_store_test.go | 2 +- weed/filer2/leveldb2/leveldb2_store.go | 6 +-- weed/filer2/leveldb2/leveldb2_store_test.go | 2 +- weed/filer2/memdb/memdb_store.go | 4 +- weed/filer2/memdb/memdb_store_test.go | 2 +- weed/filer2/mysql/mysql_store.go | 6 +-- weed/filer2/postgres/postgres_store.go | 6 +-- weed/filer2/redis/redis_cluster_store.go | 4 +- weed/filer2/redis/redis_store.go | 4 +- weed/filer2/redis/universal_redis_store.go | 4 +- weed/filer2/stream.go | 8 ++-- weed/filesys/dir.go | 6 +-- weed/filesys/dir_link.go | 4 +- weed/filesys/dir_rename.go | 2 +- weed/filesys/dirty_page.go | 8 ++-- weed/filesys/file.go | 6 +-- weed/filesys/filehandle.go | 6 +-- weed/filesys/wfs.go | 6 +-- weed/filesys/wfs_deletion.go | 8 ++-- weed/images/resizing.go | 2 +- weed/notification/aws_sqs/aws_sqs_pub.go | 6 +-- weed/notification/configuration.go | 4 +- .../gocdk_pub_sub/gocdk_pub_sub.go | 6 +-- .../google_pub_sub/google_pub_sub.go | 6 +-- weed/notification/kafka/kafka_queue.go | 6 +-- weed/notification/log/log_queue.go | 6 +-- weed/operation/assign_file_id.go | 6 +-- weed/operation/chunked_file.go | 4 +- weed/operation/delete_content.go | 4 +- weed/operation/grpc_client.go | 8 ++-- weed/operation/lookup.go | 4 +- weed/operation/lookup_vid_cache.go | 2 +- weed/operation/stats.go | 2 +- weed/operation/submit.go | 4 +- weed/operation/sync_volume.go | 2 +- weed/operation/tail_volume.go | 4 +- weed/operation/upload_content.go | 6 +-- weed/pb/filer_pb/filer_pb_helper.go | 2 +- weed/replication/replicator.go | 10 ++--- weed/replication/sink/azuresink/azure_sink.go | 12 +++--- weed/replication/sink/b2sink/b2_sink.go | 10 ++--- .../replication/sink/filersink/fetch_write.go | 10 ++--- weed/replication/sink/filersink/filer_sink.go | 14 +++---- weed/replication/sink/gcssink/gcs_sink.go | 12 +++--- weed/replication/sink/replication_sink.go | 6 +-- weed/replication/sink/s3sink/s3_sink.go | 12 +++--- weed/replication/sink/s3sink/s3_write.go | 8 ++-- weed/replication/source/filer_source.go | 8 ++-- weed/replication/sub/notification_aws_sqs.go | 6 +-- .../sub/notification_gocdk_pub_sub.go | 6 +-- .../sub/notification_google_pub_sub.go | 6 +-- weed/replication/sub/notification_kafka.go | 6 +-- weed/replication/sub/notifications.go | 4 +- weed/s3api/filer_multipart.go | 6 +-- weed/s3api/filer_util.go | 4 +- weed/s3api/s3api_bucket_handlers.go | 4 +- weed/s3api/s3api_handlers.go | 6 +-- weed/s3api/s3api_object_handlers.go | 4 +- weed/s3api/s3api_objects_list_handlers.go | 6 +-- weed/s3api/s3api_server.go | 12 +++--- weed/security/guard.go | 2 +- weed/security/jwt.go | 2 +- weed/security/tls.go | 2 +- weed/server/common.go | 12 +++--- weed/server/filer_grpc_server.go | 10 ++--- weed/server/filer_grpc_server_rename.go | 6 +-- weed/server/filer_server.go | 42 +++++++++---------- weed/server/filer_server_handlers.go | 2 +- weed/server/filer_server_handlers_read.go | 8 ++-- weed/server/filer_server_handlers_read_dir.go | 8 ++-- weed/server/filer_server_handlers_write.go | 14 +++---- .../filer_server_handlers_write_autochunk.go | 14 +++---- weed/server/master_grpc_server.go | 8 ++-- weed/server/master_grpc_server_collection.go | 6 +-- weed/server/master_grpc_server_volume.go | 10 ++--- weed/server/master_server.go | 16 +++---- weed/server/master_server_handlers.go | 8 ++-- weed/server/master_server_handlers_admin.go | 14 +++---- weed/server/master_server_handlers_ui.go | 6 +-- weed/server/raft_server.go | 6 +-- weed/server/volume_grpc_admin.go | 6 +-- weed/server/volume_grpc_batch_delete.go | 6 +-- weed/server/volume_grpc_client_to_master.go | 10 ++--- weed/server/volume_grpc_copy.go | 14 +++---- weed/server/volume_grpc_copy_incremental.go | 4 +- weed/server/volume_grpc_erasure_coding.go | 16 +++---- weed/server/volume_grpc_tail.go | 10 ++--- weed/server/volume_grpc_vacuum.go | 6 +-- weed/server/volume_server.go | 8 ++-- weed/server/volume_server_handlers.go | 6 +-- weed/server/volume_server_handlers_admin.go | 6 +-- weed/server/volume_server_handlers_read.go | 12 +++--- weed/server/volume_server_handlers_ui.go | 8 ++-- weed/server/volume_server_handlers_write.go | 10 ++--- weed/server/webdav_server.go | 12 +++--- weed/shell/command_collection_delete.go | 2 +- weed/shell/command_collection_list.go | 2 +- weed/shell/command_ec_balance.go | 4 +- weed/shell/command_ec_common.go | 12 +++--- weed/shell/command_ec_encode.go | 12 +++--- weed/shell/command_ec_rebuild.go | 8 ++-- weed/shell/command_ec_test.go | 4 +- weed/shell/command_fs_cat.go | 4 +- weed/shell/command_fs_du.go | 6 +-- weed/shell/command_fs_ls.go | 4 +- weed/shell/command_fs_meta_load.go | 6 +-- weed/shell/command_fs_meta_notify.go | 8 ++-- weed/shell/command_fs_meta_save.go | 6 +-- weed/shell/command_fs_mv.go | 4 +- weed/shell/command_fs_tree.go | 4 +- weed/shell/command_volume_balance.go | 4 +- weed/shell/command_volume_copy.go | 2 +- weed/shell/command_volume_delete.go | 2 +- weed/shell/command_volume_fix_replication.go | 8 ++-- weed/shell/command_volume_list.go | 4 +- weed/shell/command_volume_mount.go | 6 +-- weed/shell/command_volume_move.go | 6 +-- weed/shell/command_volume_unmount.go | 6 +-- weed/shell/commands.go | 6 +-- weed/stats/disk.go | 2 +- weed/stats/disk_notsupported.go | 2 +- weed/stats/disk_supported.go | 2 +- weed/stats/memory.go | 2 +- weed/stats/memory_notsupported.go | 2 +- weed/stats/memory_supported.go | 2 +- weed/stats/metrics.go | 2 +- weed/storage/disk_location.go | 6 +-- weed/storage/disk_location_ec.go | 4 +- weed/storage/erasure_coding/ec_encoder.go | 10 ++--- weed/storage/erasure_coding/ec_shard.go | 4 +- weed/storage/erasure_coding/ec_test.go | 4 +- weed/storage/erasure_coding/ec_volume.go | 8 ++-- .../erasure_coding/ec_volume_delete.go | 4 +- weed/storage/erasure_coding/ec_volume_info.go | 4 +- weed/storage/idx/walk.go | 6 +-- weed/storage/needle/crc.go | 2 +- weed/storage/needle/file_id.go | 2 +- weed/storage/needle/file_id_test.go | 2 +- weed/storage/needle/needle.go | 4 +- weed/storage/needle/needle_parse_multipart.go | 4 +- weed/storage/needle/needle_read_write_test.go | 2 +- weed/storage/needle/needle_test.go | 2 +- weed/storage/needle_map.go | 4 +- weed/storage/needle_map/btree_map.go | 2 +- weed/storage/needle_map/compact_map.go | 2 +- .../needle_map/compact_map_perf_test.go | 4 +- weed/storage/needle_map/compact_map_test.go | 2 +- weed/storage/needle_map/needle_value.go | 4 +- weed/storage/needle_map/needle_value_map.go | 2 +- weed/storage/needle_map_leveldb.go | 10 ++--- weed/storage/needle_map_memory.go | 8 ++-- weed/storage/needle_map_metric.go | 4 +- weed/storage/needle_map_metric_test.go | 4 +- weed/storage/store.go | 10 ++--- weed/storage/store_ec.go | 16 +++---- weed/storage/store_ec_delete.go | 12 +++--- weed/storage/store_vacuum.go | 4 +- weed/storage/types/needle_id_type.go | 2 +- weed/storage/types/needle_types.go | 2 +- weed/storage/volume.go | 10 ++--- weed/storage/volume_backup.go | 10 ++--- weed/storage/volume_checking.go | 8 ++-- weed/storage/volume_create.go | 2 +- weed/storage/volume_create_linux.go | 2 +- weed/storage/volume_info.go | 4 +- weed/storage/volume_info_test.go | 2 +- weed/storage/volume_loading.go | 6 +-- weed/storage/volume_super_block_test.go | 2 +- weed/storage/volume_vacuum.go | 14 +++---- weed/storage/volume_vacuum_test.go | 4 +- weed/topology/allocate_volume.go | 6 +-- weed/topology/cluster_commands.go | 4 +- weed/topology/collection.go | 6 +-- weed/topology/data_center.go | 2 +- weed/topology/data_node.go | 10 ++--- weed/topology/data_node_ec.go | 4 +- weed/topology/node.go | 6 +-- weed/topology/rack.go | 2 +- weed/topology/store_replicate.go | 12 +++--- weed/topology/topology.go | 12 +++--- weed/topology/topology_ec.go | 8 ++-- weed/topology/topology_event_handling.go | 4 +- weed/topology/topology_map.go | 2 +- weed/topology/topology_test.go | 8 ++-- weed/topology/topology_vacuum.go | 8 ++-- weed/topology/volume_growth.go | 6 +-- weed/topology/volume_growth_test.go | 6 +-- weed/topology/volume_layout.go | 6 +-- weed/topology/volume_location_list.go | 2 +- weed/util/compression.go | 2 +- weed/util/config.go | 2 +- weed/util/file_util.go | 2 +- weed/util/net_timeout.go | 2 +- weed/util/pprof.go | 2 +- weed/wdclient/masterclient.go | 6 +-- weed/wdclient/vid_map.go | 2 +- weed/weed.go | 4 +- 238 files changed, 723 insertions(+), 723 deletions(-) diff --git a/unmaintained/change_superblock/change_superblock.go b/unmaintained/change_superblock/change_superblock.go index 07d9b94e4..9326b32e2 100644 --- a/unmaintained/change_superblock/change_superblock.go +++ b/unmaintained/change_superblock/change_superblock.go @@ -7,9 +7,9 @@ import ( "path" "strconv" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/storage" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) var ( diff --git a/unmaintained/fix_dat/fix_dat.go b/unmaintained/fix_dat/fix_dat.go index a72a78eed..0d49f2fa7 100644 --- a/unmaintained/fix_dat/fix_dat.go +++ b/unmaintained/fix_dat/fix_dat.go @@ -8,11 +8,11 @@ import ( "path" "strconv" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/storage" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - "github.com/chrislusf/seaweedfs/weed/storage/types" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/util" ) var ( diff --git a/unmaintained/repeated_vacuum/repeated_vacuum.go b/unmaintained/repeated_vacuum/repeated_vacuum.go index 28bcabb9b..d613f7516 100644 --- a/unmaintained/repeated_vacuum/repeated_vacuum.go +++ b/unmaintained/repeated_vacuum/repeated_vacuum.go @@ -7,11 +7,11 @@ import ( "log" "math/rand" - "github.com/chrislusf/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/security" "github.com/spf13/viper" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/util" ) var ( diff --git a/unmaintained/see_dat/see_dat.go b/unmaintained/see_dat/see_dat.go index e8e54fd4f..ed6bf930e 100644 --- a/unmaintained/see_dat/see_dat.go +++ b/unmaintained/see_dat/see_dat.go @@ -3,9 +3,9 @@ package main import ( "flag" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/storage" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/storage/needle" "time" ) diff --git a/unmaintained/see_idx/see_idx.go b/unmaintained/see_idx/see_idx.go index 777af1821..7c8c40a8d 100644 --- a/unmaintained/see_idx/see_idx.go +++ b/unmaintained/see_idx/see_idx.go @@ -7,9 +7,9 @@ import ( "path" "strconv" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/storage/idx" - "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/storage/idx" + "github.com/joeslay/seaweedfs/weed/storage/types" ) var ( diff --git a/unmaintained/see_meta/see_meta.go b/unmaintained/see_meta/see_meta.go index 0d2ac8de1..856fa40bf 100644 --- a/unmaintained/see_meta/see_meta.go +++ b/unmaintained/see_meta/see_meta.go @@ -7,9 +7,9 @@ import ( "log" "os" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/util" "github.com/golang/protobuf/proto" ) diff --git a/unmaintained/volume_tailer/volume_tailer.go b/unmaintained/volume_tailer/volume_tailer.go index f0ef51c09..9ae0a6e62 100644 --- a/unmaintained/volume_tailer/volume_tailer.go +++ b/unmaintained/volume_tailer/volume_tailer.go @@ -5,10 +5,10 @@ import ( "log" "time" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/security" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - util2 "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/storage/needle" + util2 "github.com/joeslay/seaweedfs/weed/util" "github.com/spf13/viper" "golang.org/x/tools/godoc/util" ) diff --git a/weed/command/backup.go b/weed/command/backup.go index cd5843dd3..167f07225 100644 --- a/weed/command/backup.go +++ b/weed/command/backup.go @@ -3,13 +3,13 @@ package command import ( "fmt" - "github.com/chrislusf/seaweedfs/weed/security" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/util" "github.com/spf13/viper" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/storage" ) var ( diff --git a/weed/command/benchmark.go b/weed/command/benchmark.go index dd0fdb88e..bf655caa0 100644 --- a/weed/command/benchmark.go +++ b/weed/command/benchmark.go @@ -18,11 +18,11 @@ import ( "github.com/spf13/viper" "google.golang.org/grpc" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/security" - "github.com/chrislusf/seaweedfs/weed/util" - "github.com/chrislusf/seaweedfs/weed/wdclient" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/wdclient" ) type BenchmarkOptions struct { diff --git a/weed/command/compact.go b/weed/command/compact.go index 79d50c095..df4bcdd6e 100644 --- a/weed/command/compact.go +++ b/weed/command/compact.go @@ -1,9 +1,9 @@ package command import ( - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/storage" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) func init() { diff --git a/weed/command/download.go b/weed/command/download.go index b3e33defd..c57517d00 100644 --- a/weed/command/download.go +++ b/weed/command/download.go @@ -8,8 +8,8 @@ import ( "path" "strings" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/util" ) var ( diff --git a/weed/command/export.go b/weed/command/export.go index 7e94ec11c..43aa38872 100644 --- a/weed/command/export.go +++ b/weed/command/export.go @@ -14,10 +14,10 @@ import ( "io" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/storage" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/storage/types" ) const ( diff --git a/weed/command/filer.go b/weed/command/filer.go index b1ceb46f5..ddd60d375 100644 --- a/weed/command/filer.go +++ b/weed/command/filer.go @@ -6,13 +6,13 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/security" "github.com/spf13/viper" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/server" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/server" + "github.com/joeslay/seaweedfs/weed/util" "google.golang.org/grpc/reflection" ) diff --git a/weed/command/filer_copy.go b/weed/command/filer_copy.go index 19aceb211..3aa845eba 100644 --- a/weed/command/filer_copy.go +++ b/weed/command/filer_copy.go @@ -14,11 +14,11 @@ import ( "sync" "time" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/security" - "github.com/chrislusf/seaweedfs/weed/util" - "github.com/chrislusf/seaweedfs/weed/wdclient" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/wdclient" "github.com/spf13/viper" "google.golang.org/grpc" ) diff --git a/weed/command/filer_replication.go b/weed/command/filer_replication.go index c6e7f5dba..1040e2174 100644 --- a/weed/command/filer_replication.go +++ b/weed/command/filer_replication.go @@ -4,16 +4,16 @@ import ( "context" "strings" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/replication" - "github.com/chrislusf/seaweedfs/weed/replication/sink" - _ "github.com/chrislusf/seaweedfs/weed/replication/sink/azuresink" - _ "github.com/chrislusf/seaweedfs/weed/replication/sink/b2sink" - _ "github.com/chrislusf/seaweedfs/weed/replication/sink/filersink" - _ "github.com/chrislusf/seaweedfs/weed/replication/sink/gcssink" - _ "github.com/chrislusf/seaweedfs/weed/replication/sink/s3sink" - "github.com/chrislusf/seaweedfs/weed/replication/sub" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/replication" + "github.com/joeslay/seaweedfs/weed/replication/sink" + _ "github.com/joeslay/seaweedfs/weed/replication/sink/azuresink" + _ "github.com/joeslay/seaweedfs/weed/replication/sink/b2sink" + _ "github.com/joeslay/seaweedfs/weed/replication/sink/filersink" + _ "github.com/joeslay/seaweedfs/weed/replication/sink/gcssink" + _ "github.com/joeslay/seaweedfs/weed/replication/sink/s3sink" + "github.com/joeslay/seaweedfs/weed/replication/sub" + "github.com/joeslay/seaweedfs/weed/util" "github.com/spf13/viper" ) diff --git a/weed/command/fix.go b/weed/command/fix.go index bf33490cc..c6d017d07 100644 --- a/weed/command/fix.go +++ b/weed/command/fix.go @@ -5,10 +5,10 @@ import ( "path" "strconv" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/storage" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/storage/types" ) func init() { diff --git a/weed/command/master.go b/weed/command/master.go index 3d33f4f7a..3e4fc15e8 100644 --- a/weed/command/master.go +++ b/weed/command/master.go @@ -8,11 +8,11 @@ import ( "strings" "github.com/chrislusf/raft/protobuf" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/security" - "github.com/chrislusf/seaweedfs/weed/server" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/server" + "github.com/joeslay/seaweedfs/weed/util" "github.com/gorilla/mux" "github.com/spf13/viper" "google.golang.org/grpc/reflection" diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go index 0519ae7b8..4dc21d334 100644 --- a/weed/command/mount_std.go +++ b/weed/command/mount_std.go @@ -12,13 +12,13 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/security" "github.com/jacobsa/daemonize" "github.com/spf13/viper" - "github.com/chrislusf/seaweedfs/weed/filesys" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/filesys" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/util" "github.com/seaweedfs/fuse" "github.com/seaweedfs/fuse/fs" ) diff --git a/weed/command/s3.go b/weed/command/s3.go index e004bb066..c3f2d61d4 100644 --- a/weed/command/s3.go +++ b/weed/command/s3.go @@ -4,14 +4,14 @@ import ( "net/http" "time" - "github.com/chrislusf/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/security" "github.com/spf13/viper" "fmt" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/s3api" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/s3api" + "github.com/joeslay/seaweedfs/weed/util" "github.com/gorilla/mux" ) diff --git a/weed/command/server.go b/weed/command/server.go index 87f404ed3..dea5c49c4 100644 --- a/weed/command/server.go +++ b/weed/command/server.go @@ -8,8 +8,8 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/util" ) type ServerOptions struct { diff --git a/weed/command/shell.go b/weed/command/shell.go index 79f8b8bf9..2adac4d0e 100644 --- a/weed/command/shell.go +++ b/weed/command/shell.go @@ -1,9 +1,9 @@ package command import ( - "github.com/chrislusf/seaweedfs/weed/security" - "github.com/chrislusf/seaweedfs/weed/shell" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/shell" + "github.com/joeslay/seaweedfs/weed/util" "github.com/spf13/viper" ) diff --git a/weed/command/upload.go b/weed/command/upload.go index 25e938d9b..861f6261d 100644 --- a/weed/command/upload.go +++ b/weed/command/upload.go @@ -6,11 +6,11 @@ import ( "os" "path/filepath" - "github.com/chrislusf/seaweedfs/weed/security" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/util" "github.com/spf13/viper" - "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/operation" ) var ( diff --git a/weed/command/version.go b/weed/command/version.go index 8fdd68ec8..e8b417d1c 100644 --- a/weed/command/version.go +++ b/weed/command/version.go @@ -4,7 +4,7 @@ import ( "fmt" "runtime" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/util" ) var cmdVersion = &Command{ diff --git a/weed/command/volume.go b/weed/command/volume.go index 3c1aa2b50..0a0e16ac4 100644 --- a/weed/command/volume.go +++ b/weed/command/volume.go @@ -9,14 +9,14 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/security" "github.com/spf13/viper" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/server" - "github.com/chrislusf/seaweedfs/weed/storage" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/server" + "github.com/joeslay/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/util" "google.golang.org/grpc/reflection" ) diff --git a/weed/command/volume_test.go b/weed/command/volume_test.go index 7399f1248..65b96a7c2 100644 --- a/weed/command/volume_test.go +++ b/weed/command/volume_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/glog" ) func TestXYZ(t *testing.T) { diff --git a/weed/command/webdav.go b/weed/command/webdav.go index 371c4a9ad..313aa1382 100644 --- a/weed/command/webdav.go +++ b/weed/command/webdav.go @@ -7,10 +7,10 @@ import ( "strconv" "time" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/security" - "github.com/chrislusf/seaweedfs/weed/server" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/server" + "github.com/joeslay/seaweedfs/weed/util" "github.com/spf13/viper" ) diff --git a/weed/filer2/abstract_sql/abstract_sql_store.go b/weed/filer2/abstract_sql/abstract_sql_store.go index 3e8554957..9519d4cd8 100644 --- a/weed/filer2/abstract_sql/abstract_sql_store.go +++ b/weed/filer2/abstract_sql/abstract_sql_store.go @@ -5,8 +5,8 @@ import ( "database/sql" "fmt" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" ) type AbstractSqlStore struct { diff --git a/weed/filer2/cassandra/cassandra_store.go b/weed/filer2/cassandra/cassandra_store.go index 466be5bf3..9a31d8030 100644 --- a/weed/filer2/cassandra/cassandra_store.go +++ b/weed/filer2/cassandra/cassandra_store.go @@ -3,9 +3,9 @@ package cassandra import ( "context" "fmt" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/util" "github.com/gocql/gocql" ) diff --git a/weed/filer2/configuration.go b/weed/filer2/configuration.go index 7b05b53dc..c4712a48a 100644 --- a/weed/filer2/configuration.go +++ b/weed/filer2/configuration.go @@ -3,7 +3,7 @@ package filer2 import ( "os" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/glog" "github.com/spf13/viper" ) diff --git a/weed/filer2/entry.go b/weed/filer2/entry.go index 3f8a19114..480ad631e 100644 --- a/weed/filer2/entry.go +++ b/weed/filer2/entry.go @@ -4,7 +4,7 @@ import ( "os" "time" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" ) type Attr struct { diff --git a/weed/filer2/entry_codec.go b/weed/filer2/entry_codec.go index cf4627b74..1b0f4f64b 100644 --- a/weed/filer2/entry_codec.go +++ b/weed/filer2/entry_codec.go @@ -5,7 +5,7 @@ import ( "time" "fmt" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" "github.com/golang/protobuf/proto" ) diff --git a/weed/filer2/etcd/etcd_store.go b/weed/filer2/etcd/etcd_store.go index 1b0f928d0..42987c130 100644 --- a/weed/filer2/etcd/etcd_store.go +++ b/weed/filer2/etcd/etcd_store.go @@ -6,9 +6,9 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" - weed_util "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" + weed_util "github.com/joeslay/seaweedfs/weed/util" "go.etcd.io/etcd/clientv3" ) diff --git a/weed/filer2/filechunks.go b/weed/filer2/filechunks.go index b5876df82..130d4ead5 100644 --- a/weed/filer2/filechunks.go +++ b/weed/filer2/filechunks.go @@ -6,7 +6,7 @@ import ( "sort" "sync" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" ) func TotalSize(chunks []*filer_pb.FileChunk) (size uint64) { diff --git a/weed/filer2/filechunks_test.go b/weed/filer2/filechunks_test.go index e75e60753..c0c20fbf1 100644 --- a/weed/filer2/filechunks_test.go +++ b/weed/filer2/filechunks_test.go @@ -5,7 +5,7 @@ import ( "testing" "fmt" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" ) func TestCompactFileChunks(t *testing.T) { diff --git a/weed/filer2/filer.go b/weed/filer2/filer.go index cf236b74d..d86090e62 100644 --- a/weed/filer2/filer.go +++ b/weed/filer2/filer.go @@ -10,8 +10,8 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/wdclient" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/wdclient" "github.com/karlseguin/ccache" ) diff --git a/weed/filer2/filer_client_util.go b/weed/filer2/filer_client_util.go index 7e093eea2..49bf39e51 100644 --- a/weed/filer2/filer_client_util.go +++ b/weed/filer2/filer_client_util.go @@ -6,9 +6,9 @@ import ( "strings" "sync" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/util" ) func VolumeId(fileId string) string { diff --git a/weed/filer2/filer_deletion.go b/weed/filer2/filer_deletion.go index 25e27e504..bb1cbcefe 100644 --- a/weed/filer2/filer_deletion.go +++ b/weed/filer2/filer_deletion.go @@ -3,9 +3,9 @@ package filer2 import ( "time" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" ) func (f *Filer) loopProcessingDeletion() { diff --git a/weed/filer2/filer_notify.go b/weed/filer2/filer_notify.go index c37381116..82aae9da3 100644 --- a/weed/filer2/filer_notify.go +++ b/weed/filer2/filer_notify.go @@ -1,9 +1,9 @@ package filer2 import ( - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/notification" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/notification" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" ) func (f *Filer) NotifyUpdateEvent(oldEntry, newEntry *Entry, deleteChunks bool) { diff --git a/weed/filer2/filer_notify_test.go b/weed/filer2/filer_notify_test.go index b74e2ad35..d8319463f 100644 --- a/weed/filer2/filer_notify_test.go +++ b/weed/filer2/filer_notify_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" "github.com/golang/protobuf/proto" ) diff --git a/weed/filer2/filerstore.go b/weed/filer2/filerstore.go index 8caa44ee2..dd61f25bd 100644 --- a/weed/filer2/filerstore.go +++ b/weed/filer2/filerstore.go @@ -5,9 +5,9 @@ import ( "errors" "time" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/stats" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/stats" + "github.com/joeslay/seaweedfs/weed/util" ) type FilerStore interface { diff --git a/weed/filer2/leveldb/leveldb_store.go b/weed/filer2/leveldb/leveldb_store.go index d00eba859..3607f0d06 100644 --- a/weed/filer2/leveldb/leveldb_store.go +++ b/weed/filer2/leveldb/leveldb_store.go @@ -5,9 +5,9 @@ import ( "context" "fmt" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" - weed_util "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" + weed_util "github.com/joeslay/seaweedfs/weed/util" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/opt" leveldb_util "github.com/syndtr/goleveldb/leveldb/util" diff --git a/weed/filer2/leveldb/leveldb_store_test.go b/weed/filer2/leveldb/leveldb_store_test.go index 904de8c97..7ac9c888f 100644 --- a/weed/filer2/leveldb/leveldb_store_test.go +++ b/weed/filer2/leveldb/leveldb_store_test.go @@ -2,7 +2,7 @@ package leveldb import ( "context" - "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/filer2" "io/ioutil" "os" "testing" diff --git a/weed/filer2/leveldb2/leveldb2_store.go b/weed/filer2/leveldb2/leveldb2_store.go index 4b47d2eb3..e70a9e223 100644 --- a/weed/filer2/leveldb2/leveldb2_store.go +++ b/weed/filer2/leveldb2/leveldb2_store.go @@ -8,9 +8,9 @@ import ( "io" "os" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" - weed_util "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" + weed_util "github.com/joeslay/seaweedfs/weed/util" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/opt" leveldb_util "github.com/syndtr/goleveldb/leveldb/util" diff --git a/weed/filer2/leveldb2/leveldb2_store_test.go b/weed/filer2/leveldb2/leveldb2_store_test.go index e28ef7dac..39886c7ce 100644 --- a/weed/filer2/leveldb2/leveldb2_store_test.go +++ b/weed/filer2/leveldb2/leveldb2_store_test.go @@ -2,7 +2,7 @@ package leveldb import ( "context" - "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/filer2" "io/ioutil" "os" "testing" diff --git a/weed/filer2/memdb/memdb_store.go b/weed/filer2/memdb/memdb_store.go index 9c10a5472..673599a6b 100644 --- a/weed/filer2/memdb/memdb_store.go +++ b/weed/filer2/memdb/memdb_store.go @@ -3,8 +3,8 @@ package memdb import ( "context" "fmt" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/util" "github.com/google/btree" "strings" "sync" diff --git a/weed/filer2/memdb/memdb_store_test.go b/weed/filer2/memdb/memdb_store_test.go index d823c5177..e6f507102 100644 --- a/weed/filer2/memdb/memdb_store_test.go +++ b/weed/filer2/memdb/memdb_store_test.go @@ -2,7 +2,7 @@ package memdb import ( "context" - "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/filer2" "testing" ) diff --git a/weed/filer2/mysql/mysql_store.go b/weed/filer2/mysql/mysql_store.go index e18299bd2..985ea64bf 100644 --- a/weed/filer2/mysql/mysql_store.go +++ b/weed/filer2/mysql/mysql_store.go @@ -4,9 +4,9 @@ import ( "database/sql" "fmt" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/filer2/abstract_sql" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/filer2/abstract_sql" + "github.com/joeslay/seaweedfs/weed/util" _ "github.com/go-sql-driver/mysql" ) diff --git a/weed/filer2/postgres/postgres_store.go b/weed/filer2/postgres/postgres_store.go index ffd3d1e01..63d4f0cb2 100644 --- a/weed/filer2/postgres/postgres_store.go +++ b/weed/filer2/postgres/postgres_store.go @@ -4,9 +4,9 @@ import ( "database/sql" "fmt" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/filer2/abstract_sql" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/filer2/abstract_sql" + "github.com/joeslay/seaweedfs/weed/util" _ "github.com/lib/pq" ) diff --git a/weed/filer2/redis/redis_cluster_store.go b/weed/filer2/redis/redis_cluster_store.go index 11c315391..a8bbf3a32 100644 --- a/weed/filer2/redis/redis_cluster_store.go +++ b/weed/filer2/redis/redis_cluster_store.go @@ -1,8 +1,8 @@ package redis import ( - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/util" "github.com/go-redis/redis" ) diff --git a/weed/filer2/redis/redis_store.go b/weed/filer2/redis/redis_store.go index c56fa014c..3614f3226 100644 --- a/weed/filer2/redis/redis_store.go +++ b/weed/filer2/redis/redis_store.go @@ -1,8 +1,8 @@ package redis import ( - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/util" "github.com/go-redis/redis" ) diff --git a/weed/filer2/redis/universal_redis_store.go b/weed/filer2/redis/universal_redis_store.go index ce41d4d70..bd7a42da1 100644 --- a/weed/filer2/redis/universal_redis_store.go +++ b/weed/filer2/redis/universal_redis_store.go @@ -3,8 +3,8 @@ package redis import ( "context" "fmt" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" "github.com/go-redis/redis" "sort" "strings" diff --git a/weed/filer2/stream.go b/weed/filer2/stream.go index 01b87cad1..fc04c9a0e 100644 --- a/weed/filer2/stream.go +++ b/weed/filer2/stream.go @@ -3,10 +3,10 @@ package filer2 import ( "io" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/util" - "github.com/chrislusf/seaweedfs/weed/wdclient" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/wdclient" ) func StreamContent(masterClient *wdclient.MasterClient, w io.Writer, chunks []*filer_pb.FileChunk, offset int64, size int) error { diff --git a/weed/filesys/dir.go b/weed/filesys/dir.go index 79cf45385..48c75d809 100644 --- a/weed/filesys/dir.go +++ b/weed/filesys/dir.go @@ -6,9 +6,9 @@ import ( "path" "time" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" "github.com/seaweedfs/fuse" "github.com/seaweedfs/fuse/fs" ) diff --git a/weed/filesys/dir_link.go b/weed/filesys/dir_link.go index 94e443649..ded6138c4 100644 --- a/weed/filesys/dir_link.go +++ b/weed/filesys/dir_link.go @@ -6,8 +6,8 @@ import ( "syscall" "time" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" "github.com/seaweedfs/fuse" "github.com/seaweedfs/fuse/fs" ) diff --git a/weed/filesys/dir_rename.go b/weed/filesys/dir_rename.go index e72a15758..24bff770b 100644 --- a/weed/filesys/dir_rename.go +++ b/weed/filesys/dir_rename.go @@ -3,7 +3,7 @@ package filesys import ( "context" "fmt" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" "github.com/seaweedfs/fuse" "github.com/seaweedfs/fuse/fs" ) diff --git a/weed/filesys/dirty_page.go b/weed/filesys/dirty_page.go index baee412b2..f9718c93f 100644 --- a/weed/filesys/dirty_page.go +++ b/weed/filesys/dirty_page.go @@ -8,10 +8,10 @@ import ( "sync/atomic" "time" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/security" ) type ContinuousDirtyPages struct { diff --git a/weed/filesys/file.go b/weed/filesys/file.go index 1b359ebbe..a0dac36dd 100644 --- a/weed/filesys/file.go +++ b/weed/filesys/file.go @@ -7,9 +7,9 @@ import ( "sort" "time" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" "github.com/seaweedfs/fuse" "github.com/seaweedfs/fuse/fs" ) diff --git a/weed/filesys/filehandle.go b/weed/filesys/filehandle.go index 1f4754dd1..59e1705ae 100644 --- a/weed/filesys/filehandle.go +++ b/weed/filesys/filehandle.go @@ -7,9 +7,9 @@ import ( "path" "time" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" "github.com/gabriel-vasile/mimetype" "github.com/seaweedfs/fuse" "github.com/seaweedfs/fuse/fs" diff --git a/weed/filesys/wfs.go b/weed/filesys/wfs.go index 1bd9b5cc9..215201040 100644 --- a/weed/filesys/wfs.go +++ b/weed/filesys/wfs.go @@ -8,9 +8,9 @@ import ( "sync" "time" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/util" "github.com/karlseguin/ccache" "github.com/seaweedfs/fuse" "github.com/seaweedfs/fuse/fs" diff --git a/weed/filesys/wfs_deletion.go b/weed/filesys/wfs_deletion.go index 6e586b7df..b1bd53e7b 100644 --- a/weed/filesys/wfs_deletion.go +++ b/weed/filesys/wfs_deletion.go @@ -3,10 +3,10 @@ package filesys import ( "context" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" "google.golang.org/grpc" ) diff --git a/weed/images/resizing.go b/weed/images/resizing.go index ff0eff5e1..81d9e20c8 100644 --- a/weed/images/resizing.go +++ b/weed/images/resizing.go @@ -7,7 +7,7 @@ import ( "image/jpeg" "image/png" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/glog" "github.com/disintegration/imaging" "io" ) diff --git a/weed/notification/aws_sqs/aws_sqs_pub.go b/weed/notification/aws_sqs/aws_sqs_pub.go index c1af7f27a..1ddd51af5 100644 --- a/weed/notification/aws_sqs/aws_sqs_pub.go +++ b/weed/notification/aws_sqs/aws_sqs_pub.go @@ -8,9 +8,9 @@ import ( "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/sqs" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/notification" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/notification" + "github.com/joeslay/seaweedfs/weed/util" "github.com/golang/protobuf/proto" ) diff --git a/weed/notification/configuration.go b/weed/notification/configuration.go index 7f8765cc3..a8f992660 100644 --- a/weed/notification/configuration.go +++ b/weed/notification/configuration.go @@ -1,8 +1,8 @@ package notification import ( - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/util" "github.com/golang/protobuf/proto" "github.com/spf13/viper" ) diff --git a/weed/notification/gocdk_pub_sub/gocdk_pub_sub.go b/weed/notification/gocdk_pub_sub/gocdk_pub_sub.go index ebf44ea6f..5a8fac51f 100644 --- a/weed/notification/gocdk_pub_sub/gocdk_pub_sub.go +++ b/weed/notification/gocdk_pub_sub/gocdk_pub_sub.go @@ -18,9 +18,9 @@ import ( "context" "fmt" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/notification" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/notification" + "github.com/joeslay/seaweedfs/weed/util" "github.com/golang/protobuf/proto" "gocloud.dev/pubsub" _ "gocloud.dev/pubsub/awssnssqs" diff --git a/weed/notification/google_pub_sub/google_pub_sub.go b/weed/notification/google_pub_sub/google_pub_sub.go index 7b26bfe38..fe4399120 100644 --- a/weed/notification/google_pub_sub/google_pub_sub.go +++ b/weed/notification/google_pub_sub/google_pub_sub.go @@ -6,9 +6,9 @@ import ( "os" "cloud.google.com/go/pubsub" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/notification" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/notification" + "github.com/joeslay/seaweedfs/weed/util" "github.com/golang/protobuf/proto" "google.golang.org/api/option" ) diff --git a/weed/notification/kafka/kafka_queue.go b/weed/notification/kafka/kafka_queue.go index 830709a51..eba5260c9 100644 --- a/weed/notification/kafka/kafka_queue.go +++ b/weed/notification/kafka/kafka_queue.go @@ -2,9 +2,9 @@ package kafka import ( "github.com/Shopify/sarama" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/notification" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/notification" + "github.com/joeslay/seaweedfs/weed/util" "github.com/golang/protobuf/proto" ) diff --git a/weed/notification/log/log_queue.go b/weed/notification/log/log_queue.go index dcc038dfc..ca15fa4af 100644 --- a/weed/notification/log/log_queue.go +++ b/weed/notification/log/log_queue.go @@ -1,9 +1,9 @@ package kafka import ( - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/notification" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/notification" + "github.com/joeslay/seaweedfs/weed/util" "github.com/golang/protobuf/proto" ) diff --git a/weed/operation/assign_file_id.go b/weed/operation/assign_file_id.go index 4c50eaa26..dbc2b3986 100644 --- a/weed/operation/assign_file_id.go +++ b/weed/operation/assign_file_id.go @@ -3,9 +3,9 @@ package operation import ( "context" "fmt" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/security" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/util" "google.golang.org/grpc" "strings" ) diff --git a/weed/operation/chunked_file.go b/weed/operation/chunked_file.go index 295204dd8..6c0442693 100644 --- a/weed/operation/chunked_file.go +++ b/weed/operation/chunked_file.go @@ -13,8 +13,8 @@ import ( "sync" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/util" ) var ( diff --git a/weed/operation/delete_content.go b/weed/operation/delete_content.go index 6d84be76f..fbacdac4d 100644 --- a/weed/operation/delete_content.go +++ b/weed/operation/delete_content.go @@ -4,8 +4,8 @@ import ( "context" "errors" "fmt" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" "google.golang.org/grpc" "net/http" "strings" diff --git a/weed/operation/grpc_client.go b/weed/operation/grpc_client.go index f6b2b69e9..1eb493115 100644 --- a/weed/operation/grpc_client.go +++ b/weed/operation/grpc_client.go @@ -3,10 +3,10 @@ package operation import ( "context" "fmt" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/util" "google.golang.org/grpc" "strconv" "strings" diff --git a/weed/operation/lookup.go b/weed/operation/lookup.go index d0773e7fd..7a876d543 100644 --- a/weed/operation/lookup.go +++ b/weed/operation/lookup.go @@ -11,8 +11,8 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/util" ) type Location struct { diff --git a/weed/operation/lookup_vid_cache.go b/weed/operation/lookup_vid_cache.go index ccc1f2beb..181d2d1bf 100644 --- a/weed/operation/lookup_vid_cache.go +++ b/weed/operation/lookup_vid_cache.go @@ -6,7 +6,7 @@ import ( "sync" "time" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/glog" ) var ErrorNotFound = errors.New("not found") diff --git a/weed/operation/stats.go b/weed/operation/stats.go index b69a33750..432c95376 100644 --- a/weed/operation/stats.go +++ b/weed/operation/stats.go @@ -4,7 +4,7 @@ import ( "context" "google.golang.org/grpc" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" ) func Statistics(server string, grpcDialOption grpc.DialOption, req *master_pb.StatisticsRequest) (resp *master_pb.StatisticsResponse, err error) { diff --git a/weed/operation/submit.go b/weed/operation/submit.go index bdf59d966..12be0262d 100644 --- a/weed/operation/submit.go +++ b/weed/operation/submit.go @@ -11,8 +11,8 @@ import ( "strconv" "strings" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/security" ) type FilePart struct { diff --git a/weed/operation/sync_volume.go b/weed/operation/sync_volume.go index 5562f12ab..79436440c 100644 --- a/weed/operation/sync_volume.go +++ b/weed/operation/sync_volume.go @@ -2,7 +2,7 @@ package operation import ( "context" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" "google.golang.org/grpc" ) diff --git a/weed/operation/tail_volume.go b/weed/operation/tail_volume.go index b53f18ce1..5298233bc 100644 --- a/weed/operation/tail_volume.go +++ b/weed/operation/tail_volume.go @@ -5,8 +5,8 @@ import ( "fmt" "io" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/storage/needle" "google.golang.org/grpc" ) diff --git a/weed/operation/upload_content.go b/weed/operation/upload_content.go index c387d0230..68d6d7a75 100644 --- a/weed/operation/upload_content.go +++ b/weed/operation/upload_content.go @@ -16,9 +16,9 @@ import ( "path/filepath" "strings" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/security" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/util" ) type UploadResult struct { diff --git a/weed/pb/filer_pb/filer_pb_helper.go b/weed/pb/filer_pb/filer_pb_helper.go index 5c40332e6..86e9f719e 100644 --- a/weed/pb/filer_pb/filer_pb_helper.go +++ b/weed/pb/filer_pb/filer_pb_helper.go @@ -1,7 +1,7 @@ package filer_pb import ( - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) func toFileIdObject(fileIdStr string) (*FileId, error) { diff --git a/weed/replication/replicator.go b/weed/replication/replicator.go index 7353cdc91..1b868defc 100644 --- a/weed/replication/replicator.go +++ b/weed/replication/replicator.go @@ -6,11 +6,11 @@ import ( "path/filepath" "strings" - "github.com/chrislusf/seaweedfs/weed/glog" - "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/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/replication/sink" + "github.com/joeslay/seaweedfs/weed/replication/source" + "github.com/joeslay/seaweedfs/weed/util" ) type Replicator struct { diff --git a/weed/replication/sink/azuresink/azure_sink.go b/weed/replication/sink/azuresink/azure_sink.go index 6381908a1..c64d3c4f1 100644 --- a/weed/replication/sink/azuresink/azure_sink.go +++ b/weed/replication/sink/azuresink/azure_sink.go @@ -8,12 +8,12 @@ import ( "strings" "github.com/Azure/azure-storage-blob-go/azblob" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" - "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/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/replication/sink" + "github.com/joeslay/seaweedfs/weed/replication/source" + "github.com/joeslay/seaweedfs/weed/util" ) type AzureSink struct { diff --git a/weed/replication/sink/b2sink/b2_sink.go b/weed/replication/sink/b2sink/b2_sink.go index 35c2230fa..14cc0b12f 100644 --- a/weed/replication/sink/b2sink/b2_sink.go +++ b/weed/replication/sink/b2sink/b2_sink.go @@ -4,11 +4,11 @@ import ( "context" "strings" - "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/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/replication/sink" + "github.com/joeslay/seaweedfs/weed/replication/source" + "github.com/joeslay/seaweedfs/weed/util" "github.com/kurin/blazer/b2" ) diff --git a/weed/replication/sink/filersink/fetch_write.go b/weed/replication/sink/filersink/fetch_write.go index 97e9671a3..c167707c0 100644 --- a/weed/replication/sink/filersink/fetch_write.go +++ b/weed/replication/sink/filersink/fetch_write.go @@ -7,11 +7,11 @@ import ( "strings" "sync" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/security" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/util" ) func (fs *FilerSink) replicateChunks(ctx context.Context, sourceChunks []*filer_pb.FileChunk) (replicatedChunks []*filer_pb.FileChunk, err error) { diff --git a/weed/replication/sink/filersink/filer_sink.go b/weed/replication/sink/filersink/filer_sink.go index f99c7fdf6..ce88ba63a 100644 --- a/weed/replication/sink/filersink/filer_sink.go +++ b/weed/replication/sink/filersink/filer_sink.go @@ -3,16 +3,16 @@ package filersink import ( "context" "fmt" - "github.com/chrislusf/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/security" "github.com/spf13/viper" "google.golang.org/grpc" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" - "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/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/replication/sink" + "github.com/joeslay/seaweedfs/weed/replication/source" + "github.com/joeslay/seaweedfs/weed/util" ) type FilerSink struct { diff --git a/weed/replication/sink/gcssink/gcs_sink.go b/weed/replication/sink/gcssink/gcs_sink.go index abd7c49b9..48bdea3a9 100644 --- a/weed/replication/sink/gcssink/gcs_sink.go +++ b/weed/replication/sink/gcssink/gcs_sink.go @@ -6,12 +6,12 @@ import ( "os" "cloud.google.com/go/storage" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" - "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/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/replication/sink" + "github.com/joeslay/seaweedfs/weed/replication/source" + "github.com/joeslay/seaweedfs/weed/util" "google.golang.org/api/option" ) diff --git a/weed/replication/sink/replication_sink.go b/weed/replication/sink/replication_sink.go index dd54f0005..fcf604c79 100644 --- a/weed/replication/sink/replication_sink.go +++ b/weed/replication/sink/replication_sink.go @@ -2,9 +2,9 @@ package sink import ( "context" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/replication/source" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/replication/source" + "github.com/joeslay/seaweedfs/weed/util" ) type ReplicationSink interface { diff --git a/weed/replication/sink/s3sink/s3_sink.go b/weed/replication/sink/s3sink/s3_sink.go index d5cad3541..80a898239 100644 --- a/weed/replication/sink/s3sink/s3_sink.go +++ b/weed/replication/sink/s3sink/s3_sink.go @@ -11,12 +11,12 @@ import ( "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3" "github.com/aws/aws-sdk-go/service/s3/s3iface" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" - "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/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/replication/sink" + "github.com/joeslay/seaweedfs/weed/replication/source" + "github.com/joeslay/seaweedfs/weed/util" ) type S3Sink struct { diff --git a/weed/replication/sink/s3sink/s3_write.go b/weed/replication/sink/s3sink/s3_write.go index 0a190b27d..80a54d1e8 100644 --- a/weed/replication/sink/s3sink/s3_write.go +++ b/weed/replication/sink/s3sink/s3_write.go @@ -9,10 +9,10 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/s3" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/util" ) func (s3sink *S3Sink) deleteObject(key string) error { diff --git a/weed/replication/source/filer_source.go b/weed/replication/source/filer_source.go index d7b5ebc4d..27729acaf 100644 --- a/weed/replication/source/filer_source.go +++ b/weed/replication/source/filer_source.go @@ -3,16 +3,16 @@ package source import ( "context" "fmt" - "github.com/chrislusf/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/security" "github.com/spf13/viper" "google.golang.org/grpc" "io" "net/http" "strings" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/util" ) type ReplicationSource interface { diff --git a/weed/replication/sub/notification_aws_sqs.go b/weed/replication/sub/notification_aws_sqs.go index f0100f4de..5f5d79de9 100644 --- a/weed/replication/sub/notification_aws_sqs.go +++ b/weed/replication/sub/notification_aws_sqs.go @@ -8,9 +8,9 @@ import ( "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/sqs" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/util" "github.com/golang/protobuf/proto" ) diff --git a/weed/replication/sub/notification_gocdk_pub_sub.go b/weed/replication/sub/notification_gocdk_pub_sub.go index eddba9ff8..96516ea71 100644 --- a/weed/replication/sub/notification_gocdk_pub_sub.go +++ b/weed/replication/sub/notification_gocdk_pub_sub.go @@ -3,9 +3,9 @@ package sub import ( "context" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/util" "github.com/golang/protobuf/proto" "gocloud.dev/pubsub" _ "gocloud.dev/pubsub/awssnssqs" diff --git a/weed/replication/sub/notification_google_pub_sub.go b/weed/replication/sub/notification_google_pub_sub.go index ad6b42a2e..a3d9f43f0 100644 --- a/weed/replication/sub/notification_google_pub_sub.go +++ b/weed/replication/sub/notification_google_pub_sub.go @@ -6,9 +6,9 @@ import ( "os" "cloud.google.com/go/pubsub" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/util" "github.com/golang/protobuf/proto" "google.golang.org/api/option" ) diff --git a/weed/replication/sub/notification_kafka.go b/weed/replication/sub/notification_kafka.go index 1a86a8307..dbf1fd130 100644 --- a/weed/replication/sub/notification_kafka.go +++ b/weed/replication/sub/notification_kafka.go @@ -8,9 +8,9 @@ import ( "time" "github.com/Shopify/sarama" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/util" "github.com/golang/protobuf/proto" ) diff --git a/weed/replication/sub/notifications.go b/weed/replication/sub/notifications.go index 66fbef824..106812b37 100644 --- a/weed/replication/sub/notifications.go +++ b/weed/replication/sub/notifications.go @@ -1,8 +1,8 @@ package sub import ( - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/util" ) type NotificationInput interface { diff --git a/weed/s3api/filer_multipart.go b/weed/s3api/filer_multipart.go index c8fe05645..af665e9c5 100644 --- a/weed/s3api/filer_multipart.go +++ b/weed/s3api/filer_multipart.go @@ -11,9 +11,9 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/s3" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" "github.com/satori/go.uuid" ) diff --git a/weed/s3api/filer_util.go b/weed/s3api/filer_util.go index 1c3814fce..3178d37cc 100644 --- a/weed/s3api/filer_util.go +++ b/weed/s3api/filer_util.go @@ -7,8 +7,8 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" ) func (s3a *S3ApiServer) mkdir(ctx context.Context, parentDirectoryPath string, dirName string, fn func(entry *filer_pb.Entry)) error { diff --git a/weed/s3api/s3api_bucket_handlers.go b/weed/s3api/s3api_bucket_handlers.go index 492d94616..6951a41dc 100644 --- a/weed/s3api/s3api_bucket_handlers.go +++ b/weed/s3api/s3api_bucket_handlers.go @@ -11,8 +11,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/s3" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" "github.com/gorilla/mux" ) diff --git a/weed/s3api/s3api_handlers.go b/weed/s3api/s3api_handlers.go index 127be07e3..470022711 100644 --- a/weed/s3api/s3api_handlers.go +++ b/weed/s3api/s3api_handlers.go @@ -6,9 +6,9 @@ import ( "encoding/base64" "encoding/xml" "fmt" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/util" "google.golang.org/grpc" "net/http" "net/url" diff --git a/weed/s3api/s3api_object_handlers.go b/weed/s3api/s3api_object_handlers.go index 44e93d297..bd780da31 100644 --- a/weed/s3api/s3api_object_handlers.go +++ b/weed/s3api/s3api_object_handlers.go @@ -9,8 +9,8 @@ import ( "net/http" "strings" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/server" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/server" "github.com/gorilla/mux" ) diff --git a/weed/s3api/s3api_objects_list_handlers.go b/weed/s3api/s3api_objects_list_handlers.go index 4053913fb..156968194 100644 --- a/weed/s3api/s3api_objects_list_handlers.go +++ b/weed/s3api/s3api_objects_list_handlers.go @@ -10,9 +10,9 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" "github.com/gorilla/mux" ) diff --git a/weed/s3api/s3api_server.go b/weed/s3api/s3api_server.go index 24458592d..69d3ae2c2 100644 --- a/weed/s3api/s3api_server.go +++ b/weed/s3api/s3api_server.go @@ -1,12 +1,12 @@ package s3api import ( - _ "github.com/chrislusf/seaweedfs/weed/filer2/cassandra" - _ "github.com/chrislusf/seaweedfs/weed/filer2/leveldb" - _ "github.com/chrislusf/seaweedfs/weed/filer2/memdb" - _ "github.com/chrislusf/seaweedfs/weed/filer2/mysql" - _ "github.com/chrislusf/seaweedfs/weed/filer2/postgres" - _ "github.com/chrislusf/seaweedfs/weed/filer2/redis" + _ "github.com/joeslay/seaweedfs/weed/filer2/cassandra" + _ "github.com/joeslay/seaweedfs/weed/filer2/leveldb" + _ "github.com/joeslay/seaweedfs/weed/filer2/memdb" + _ "github.com/joeslay/seaweedfs/weed/filer2/mysql" + _ "github.com/joeslay/seaweedfs/weed/filer2/postgres" + _ "github.com/joeslay/seaweedfs/weed/filer2/redis" "github.com/gorilla/mux" "google.golang.org/grpc" "net/http" diff --git a/weed/security/guard.go b/weed/security/guard.go index 17fe2ea9e..c53b5648e 100644 --- a/weed/security/guard.go +++ b/weed/security/guard.go @@ -7,7 +7,7 @@ import ( "net/http" "strings" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/glog" ) var ( diff --git a/weed/security/jwt.go b/weed/security/jwt.go index 0bd7fa974..b8933a08c 100644 --- a/weed/security/jwt.go +++ b/weed/security/jwt.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/glog" jwt "github.com/dgrijalva/jwt-go" ) diff --git a/weed/security/tls.go b/weed/security/tls.go index e81ba4831..4c26d1b85 100644 --- a/weed/security/tls.go +++ b/weed/security/tls.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/viper" "io/ioutil" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/glog" "google.golang.org/grpc" "google.golang.org/grpc/credentials" ) diff --git a/weed/server/common.go b/weed/server/common.go index d50c283f2..d0da54bac 100644 --- a/weed/server/common.go +++ b/weed/server/common.go @@ -11,15 +11,15 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/storage/needle" "google.golang.org/grpc" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/stats" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/stats" + "github.com/joeslay/seaweedfs/weed/util" - _ "github.com/chrislusf/seaweedfs/weed/statik" + _ "github.com/joeslay/seaweedfs/weed/statik" "github.com/gorilla/mux" statik "github.com/rakyll/statik/fs" ) diff --git a/weed/server/filer_grpc_server.go b/weed/server/filer_grpc_server.go index 0b395701d..1da304946 100644 --- a/weed/server/filer_grpc_server.go +++ b/weed/server/filer_grpc_server.go @@ -9,11 +9,11 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" ) func (fs *FilerServer) LookupDirectoryEntry(ctx context.Context, req *filer_pb.LookupDirectoryEntryRequest) (*filer_pb.LookupDirectoryEntryResponse, error) { diff --git a/weed/server/filer_grpc_server_rename.go b/weed/server/filer_grpc_server_rename.go index 7142f7606..b5d2c8163 100644 --- a/weed/server/filer_grpc_server_rename.go +++ b/weed/server/filer_grpc_server_rename.go @@ -3,9 +3,9 @@ package weed_server import ( "context" "fmt" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" "path/filepath" ) diff --git a/weed/server/filer_server.go b/weed/server/filer_server.go index f2dec9346..2cce03cee 100644 --- a/weed/server/filer_server.go +++ b/weed/server/filer_server.go @@ -7,29 +7,29 @@ import ( "os" "time" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/stats" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/stats" + "github.com/joeslay/seaweedfs/weed/util" "google.golang.org/grpc" - "github.com/chrislusf/seaweedfs/weed/filer2" - _ "github.com/chrislusf/seaweedfs/weed/filer2/cassandra" - _ "github.com/chrislusf/seaweedfs/weed/filer2/etcd" - _ "github.com/chrislusf/seaweedfs/weed/filer2/leveldb" - _ "github.com/chrislusf/seaweedfs/weed/filer2/leveldb2" - _ "github.com/chrislusf/seaweedfs/weed/filer2/memdb" - _ "github.com/chrislusf/seaweedfs/weed/filer2/mysql" - _ "github.com/chrislusf/seaweedfs/weed/filer2/postgres" - _ "github.com/chrislusf/seaweedfs/weed/filer2/redis" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/notification" - _ "github.com/chrislusf/seaweedfs/weed/notification/aws_sqs" - _ "github.com/chrislusf/seaweedfs/weed/notification/gocdk_pub_sub" - _ "github.com/chrislusf/seaweedfs/weed/notification/google_pub_sub" - _ "github.com/chrislusf/seaweedfs/weed/notification/kafka" - _ "github.com/chrislusf/seaweedfs/weed/notification/log" - "github.com/chrislusf/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/filer2" + _ "github.com/joeslay/seaweedfs/weed/filer2/cassandra" + _ "github.com/joeslay/seaweedfs/weed/filer2/etcd" + _ "github.com/joeslay/seaweedfs/weed/filer2/leveldb" + _ "github.com/joeslay/seaweedfs/weed/filer2/leveldb2" + _ "github.com/joeslay/seaweedfs/weed/filer2/memdb" + _ "github.com/joeslay/seaweedfs/weed/filer2/mysql" + _ "github.com/joeslay/seaweedfs/weed/filer2/postgres" + _ "github.com/joeslay/seaweedfs/weed/filer2/redis" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/notification" + _ "github.com/joeslay/seaweedfs/weed/notification/aws_sqs" + _ "github.com/joeslay/seaweedfs/weed/notification/gocdk_pub_sub" + _ "github.com/joeslay/seaweedfs/weed/notification/google_pub_sub" + _ "github.com/joeslay/seaweedfs/weed/notification/kafka" + _ "github.com/joeslay/seaweedfs/weed/notification/log" + "github.com/joeslay/seaweedfs/weed/security" "github.com/spf13/viper" ) diff --git a/weed/server/filer_server_handlers.go b/weed/server/filer_server_handlers.go index b6bfc3b04..1b3547109 100644 --- a/weed/server/filer_server_handlers.go +++ b/weed/server/filer_server_handlers.go @@ -4,7 +4,7 @@ import ( "net/http" "time" - "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/joeslay/seaweedfs/weed/stats" ) func (fs *FilerServer) filerHandler(w http.ResponseWriter, r *http.Request) { diff --git a/weed/server/filer_server_handlers_read.go b/weed/server/filer_server_handlers_read.go index 0edf501a8..6e221575f 100644 --- a/weed/server/filer_server_handlers_read.go +++ b/weed/server/filer_server_handlers_read.go @@ -12,10 +12,10 @@ import ( "strconv" "strings" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/stats" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/stats" + "github.com/joeslay/seaweedfs/weed/util" ) func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request, isGetMethod bool) { diff --git a/weed/server/filer_server_handlers_read_dir.go b/weed/server/filer_server_handlers_read_dir.go index 87e864559..a1a934a57 100644 --- a/weed/server/filer_server_handlers_read_dir.go +++ b/weed/server/filer_server_handlers_read_dir.go @@ -6,10 +6,10 @@ import ( "strconv" "strings" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" - ui "github.com/chrislusf/seaweedfs/weed/server/filer_ui" - "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" + ui "github.com/joeslay/seaweedfs/weed/server/filer_ui" + "github.com/joeslay/seaweedfs/weed/stats" ) // listDirectoryHandler lists directories and folers under a directory diff --git a/weed/server/filer_server_handlers_write.go b/weed/server/filer_server_handlers_write.go index 0bf1218ce..e91840a74 100644 --- a/weed/server/filer_server_handlers_write.go +++ b/weed/server/filer_server_handlers_write.go @@ -16,13 +16,13 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/security" - "github.com/chrislusf/seaweedfs/weed/stats" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/stats" + "github.com/joeslay/seaweedfs/weed/util" ) var ( diff --git a/weed/server/filer_server_handlers_write_autochunk.go b/weed/server/filer_server_handlers_write_autochunk.go index 492b55943..d89716f0e 100644 --- a/weed/server/filer_server_handlers_write_autochunk.go +++ b/weed/server/filer_server_handlers_write_autochunk.go @@ -11,13 +11,13 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/security" - "github.com/chrislusf/seaweedfs/weed/stats" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/stats" + "github.com/joeslay/seaweedfs/weed/util" ) func (fs *FilerServer) autoChunk(ctx context.Context, w http.ResponseWriter, r *http.Request, diff --git a/weed/server/master_grpc_server.go b/weed/server/master_grpc_server.go index 6fa509e77..899d6d5f3 100644 --- a/weed/server/master_grpc_server.go +++ b/weed/server/master_grpc_server.go @@ -7,10 +7,10 @@ import ( "time" "github.com/chrislusf/raft" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - "github.com/chrislusf/seaweedfs/weed/topology" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/topology" "google.golang.org/grpc/peer" ) diff --git a/weed/server/master_grpc_server_collection.go b/weed/server/master_grpc_server_collection.go index a50cfa192..278acfe59 100644 --- a/weed/server/master_grpc_server_collection.go +++ b/weed/server/master_grpc_server_collection.go @@ -4,9 +4,9 @@ import ( "context" "github.com/chrislusf/raft" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" ) func (ms *MasterServer) CollectionList(ctx context.Context, req *master_pb.CollectionListRequest) (*master_pb.CollectionListResponse, error) { diff --git a/weed/server/master_grpc_server_volume.go b/weed/server/master_grpc_server_volume.go index 19064bcde..286ca355c 100644 --- a/weed/server/master_grpc_server_volume.go +++ b/weed/server/master_grpc_server_volume.go @@ -5,11 +5,11 @@ import ( "fmt" "github.com/chrislusf/raft" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/security" - "github.com/chrislusf/seaweedfs/weed/storage" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - "github.com/chrislusf/seaweedfs/weed/topology" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/topology" ) func (ms *MasterServer) LookupVolume(ctx context.Context, req *master_pb.LookupVolumeRequest) (*master_pb.LookupVolumeResponse, error) { diff --git a/weed/server/master_server.go b/weed/server/master_server.go index e9eb32cca..c928a5357 100644 --- a/weed/server/master_server.go +++ b/weed/server/master_server.go @@ -3,8 +3,8 @@ package weed_server import ( "context" "fmt" - "github.com/chrislusf/seaweedfs/weed/shell" - "github.com/chrislusf/seaweedfs/weed/wdclient" + "github.com/joeslay/seaweedfs/weed/shell" + "github.com/joeslay/seaweedfs/weed/wdclient" "google.golang.org/grpc" "net/http" "net/http/httputil" @@ -17,12 +17,12 @@ import ( "time" "github.com/chrislusf/raft" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/security" - "github.com/chrislusf/seaweedfs/weed/sequence" - "github.com/chrislusf/seaweedfs/weed/topology" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/sequence" + "github.com/joeslay/seaweedfs/weed/topology" + "github.com/joeslay/seaweedfs/weed/util" "github.com/gorilla/mux" "github.com/spf13/viper" ) diff --git a/weed/server/master_server_handlers.go b/weed/server/master_server_handlers.go index 93f983375..fd60e9615 100644 --- a/weed/server/master_server_handlers.go +++ b/weed/server/master_server_handlers.go @@ -6,10 +6,10 @@ import ( "strconv" "strings" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/security" - "github.com/chrislusf/seaweedfs/weed/stats" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/stats" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) func (ms *MasterServer) lookupVolumeId(vids []string, collection string) (volumeLocations map[string]operation.LookupResult) { diff --git a/weed/server/master_server_handlers_admin.go b/weed/server/master_server_handlers_admin.go index 6b5da1132..4bcff0822 100644 --- a/weed/server/master_server_handlers_admin.go +++ b/weed/server/master_server_handlers_admin.go @@ -8,13 +8,13 @@ import ( "net/http" "strconv" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/storage" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - "github.com/chrislusf/seaweedfs/weed/topology" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/topology" + "github.com/joeslay/seaweedfs/weed/util" ) func (ms *MasterServer) collectionDeleteHandler(w http.ResponseWriter, r *http.Request) { diff --git a/weed/server/master_server_handlers_ui.go b/weed/server/master_server_handlers_ui.go index f241df87f..0c40f6e14 100644 --- a/weed/server/master_server_handlers_ui.go +++ b/weed/server/master_server_handlers_ui.go @@ -4,9 +4,9 @@ import ( "net/http" "github.com/chrislusf/raft" - ui "github.com/chrislusf/seaweedfs/weed/server/master_ui" - "github.com/chrislusf/seaweedfs/weed/stats" - "github.com/chrislusf/seaweedfs/weed/util" + ui "github.com/joeslay/seaweedfs/weed/server/master_ui" + "github.com/joeslay/seaweedfs/weed/stats" + "github.com/joeslay/seaweedfs/weed/util" ) func (ms *MasterServer) uiStatusHandler(w http.ResponseWriter, r *http.Request) { diff --git a/weed/server/raft_server.go b/weed/server/raft_server.go index 88320ed98..0f10fcc55 100644 --- a/weed/server/raft_server.go +++ b/weed/server/raft_server.go @@ -2,7 +2,7 @@ package weed_server import ( "encoding/json" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/util" "google.golang.org/grpc" "io/ioutil" "os" @@ -12,8 +12,8 @@ import ( "time" "github.com/chrislusf/raft" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/topology" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/topology" ) type RaftServer struct { diff --git a/weed/server/volume_grpc_admin.go b/weed/server/volume_grpc_admin.go index 35c2508a6..67196211f 100644 --- a/weed/server/volume_grpc_admin.go +++ b/weed/server/volume_grpc_admin.go @@ -3,9 +3,9 @@ package weed_server import ( "context" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) func (vs *VolumeServer) DeleteCollection(ctx context.Context, req *volume_server_pb.DeleteCollectionRequest) (*volume_server_pb.DeleteCollectionResponse, error) { diff --git a/weed/server/volume_grpc_batch_delete.go b/weed/server/volume_grpc_batch_delete.go index fdb7937d2..35c7dd9d6 100644 --- a/weed/server/volume_grpc_batch_delete.go +++ b/weed/server/volume_grpc_batch_delete.go @@ -5,9 +5,9 @@ import ( "net/http" "time" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) func (vs *VolumeServer) BatchDelete(ctx context.Context, req *volume_server_pb.BatchDeleteRequest) (*volume_server_pb.BatchDeleteResponse, error) { diff --git a/weed/server/volume_grpc_client_to_master.go b/weed/server/volume_grpc_client_to_master.go index 731675b48..1f25502cd 100644 --- a/weed/server/volume_grpc_client_to_master.go +++ b/weed/server/volume_grpc_client_to_master.go @@ -5,14 +5,14 @@ import ( "net" "time" - "github.com/chrislusf/seaweedfs/weed/security" - "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" + "github.com/joeslay/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" "github.com/spf13/viper" "google.golang.org/grpc" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/util" "golang.org/x/net/context" ) diff --git a/weed/server/volume_grpc_copy.go b/weed/server/volume_grpc_copy.go index 8b39146ee..c836b05f0 100644 --- a/weed/server/volume_grpc_copy.go +++ b/weed/server/volume_grpc_copy.go @@ -9,13 +9,13 @@ import ( "path" "time" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/storage" - "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" + "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/util" ) const BufferSizeLimit = 1024 * 1024 * 2 diff --git a/weed/server/volume_grpc_copy_incremental.go b/weed/server/volume_grpc_copy_incremental.go index f56fbeef4..eb3398322 100644 --- a/weed/server/volume_grpc_copy_incremental.go +++ b/weed/server/volume_grpc_copy_incremental.go @@ -6,8 +6,8 @@ import ( "io" "os" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) func (vs *VolumeServer) VolumeIncrementalCopy(req *volume_server_pb.VolumeIncrementalCopyRequest, stream volume_server_pb.VolumeServer_VolumeIncrementalCopyServer) error { diff --git a/weed/server/volume_grpc_erasure_coding.go b/weed/server/volume_grpc_erasure_coding.go index 8140a06f6..65e59c683 100644 --- a/weed/server/volume_grpc_erasure_coding.go +++ b/weed/server/volume_grpc_erasure_coding.go @@ -10,14 +10,14 @@ import ( "path" "strings" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/storage" - "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - "github.com/chrislusf/seaweedfs/weed/storage/types" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" + "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/util" ) /* diff --git a/weed/server/volume_grpc_tail.go b/weed/server/volume_grpc_tail.go index 34c55a599..6803d5444 100644 --- a/weed/server/volume_grpc_tail.go +++ b/weed/server/volume_grpc_tail.go @@ -5,11 +5,11 @@ import ( "fmt" "time" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/storage" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) func (vs *VolumeServer) VolumeTailSender(req *volume_server_pb.VolumeTailSenderRequest, stream volume_server_pb.VolumeServer_VolumeTailSenderServer) error { diff --git a/weed/server/volume_grpc_vacuum.go b/weed/server/volume_grpc_vacuum.go index 24f982241..205843496 100644 --- a/weed/server/volume_grpc_vacuum.go +++ b/weed/server/volume_grpc_vacuum.go @@ -3,9 +3,9 @@ package weed_server import ( "context" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) func (vs *VolumeServer) VacuumVolumeCheck(ctx context.Context, req *volume_server_pb.VacuumVolumeCheckRequest) (*volume_server_pb.VacuumVolumeCheckResponse, error) { diff --git a/weed/server/volume_server.go b/weed/server/volume_server.go index 6cf654738..144fba8ac 100644 --- a/weed/server/volume_server.go +++ b/weed/server/volume_server.go @@ -4,12 +4,12 @@ import ( "fmt" "net/http" - "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/joeslay/seaweedfs/weed/stats" "google.golang.org/grpc" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/security" - "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/storage" "github.com/spf13/viper" ) diff --git a/weed/server/volume_server_handlers.go b/weed/server/volume_server_handlers.go index 14ad27d42..a3eb910eb 100644 --- a/weed/server/volume_server_handlers.go +++ b/weed/server/volume_server_handlers.go @@ -4,9 +4,9 @@ import ( "net/http" "strings" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/security" - "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/stats" ) /* diff --git a/weed/server/volume_server_handlers_admin.go b/weed/server/volume_server_handlers_admin.go index 25b6582f7..221bb1527 100644 --- a/weed/server/volume_server_handlers_admin.go +++ b/weed/server/volume_server_handlers_admin.go @@ -4,9 +4,9 @@ import ( "net/http" "path/filepath" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/stats" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/stats" + "github.com/joeslay/seaweedfs/weed/util" ) func (vs *VolumeServer) statusHandler(w http.ResponseWriter, r *http.Request) { diff --git a/weed/server/volume_server_handlers_read.go b/weed/server/volume_server_handlers_read.go index f30ffefaf..89f9bd9d3 100644 --- a/weed/server/volume_server_handlers_read.go +++ b/weed/server/volume_server_handlers_read.go @@ -16,12 +16,12 @@ import ( "encoding/json" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/images" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/stats" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/images" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/stats" + "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/util" ) var fileNameEscaper = strings.NewReplacer("\\", "\\\\", "\"", "\\\"") diff --git a/weed/server/volume_server_handlers_ui.go b/weed/server/volume_server_handlers_ui.go index 852f0b751..7fc70d8af 100644 --- a/weed/server/volume_server_handlers_ui.go +++ b/weed/server/volume_server_handlers_ui.go @@ -5,10 +5,10 @@ import ( "path/filepath" "time" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - ui "github.com/chrislusf/seaweedfs/weed/server/volume_server_ui" - "github.com/chrislusf/seaweedfs/weed/stats" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + ui "github.com/joeslay/seaweedfs/weed/server/volume_server_ui" + "github.com/joeslay/seaweedfs/weed/stats" + "github.com/joeslay/seaweedfs/weed/util" ) func (vs *VolumeServer) uiStatusHandler(w http.ResponseWriter, r *http.Request) { diff --git a/weed/server/volume_server_handlers_write.go b/weed/server/volume_server_handlers_write.go index db8fcb555..d0b177c72 100644 --- a/weed/server/volume_server_handlers_write.go +++ b/weed/server/volume_server_handlers_write.go @@ -9,11 +9,11 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/stats" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - "github.com/chrislusf/seaweedfs/weed/topology" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/stats" + "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/topology" ) func (vs *VolumeServer) PostHandler(w http.ResponseWriter, r *http.Request) { diff --git a/weed/server/webdav_server.go b/weed/server/webdav_server.go index 151b48a78..7eed37485 100644 --- a/weed/server/webdav_server.go +++ b/weed/server/webdav_server.go @@ -10,15 +10,15 @@ import ( "strings" "time" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/util" "golang.org/x/net/webdav" "google.golang.org/grpc" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/security" "github.com/spf13/viper" ) diff --git a/weed/shell/command_collection_delete.go b/weed/shell/command_collection_delete.go index fbaddcd51..d18161376 100644 --- a/weed/shell/command_collection_delete.go +++ b/weed/shell/command_collection_delete.go @@ -3,7 +3,7 @@ package shell import ( "context" "fmt" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" "io" ) diff --git a/weed/shell/command_collection_list.go b/weed/shell/command_collection_list.go index c4325c66f..9607c9999 100644 --- a/weed/shell/command_collection_list.go +++ b/weed/shell/command_collection_list.go @@ -3,7 +3,7 @@ package shell import ( "context" "fmt" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" "io" ) diff --git a/weed/shell/command_ec_balance.go b/weed/shell/command_ec_balance.go index 47ae7bad3..0ff2e3963 100644 --- a/weed/shell/command_ec_balance.go +++ b/weed/shell/command_ec_balance.go @@ -7,8 +7,8 @@ import ( "io" "sort" - "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) func init() { diff --git a/weed/shell/command_ec_common.go b/weed/shell/command_ec_common.go index d0fe16a68..c75e14feb 100644 --- a/weed/shell/command_ec_common.go +++ b/weed/shell/command_ec_common.go @@ -6,12 +6,12 @@ import ( "math" "sort" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" + "github.com/joeslay/seaweedfs/weed/storage/needle" "google.golang.org/grpc" ) diff --git a/weed/shell/command_ec_encode.go b/weed/shell/command_ec_encode.go index f07cb93f9..0dd3e0ea2 100644 --- a/weed/shell/command_ec_encode.go +++ b/weed/shell/command_ec_encode.go @@ -8,12 +8,12 @@ import ( "sync" "time" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - "github.com/chrislusf/seaweedfs/weed/wdclient" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" + "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/wdclient" "google.golang.org/grpc" ) diff --git a/weed/shell/command_ec_rebuild.go b/weed/shell/command_ec_rebuild.go index 63b7c4088..56bcd77bb 100644 --- a/weed/shell/command_ec_rebuild.go +++ b/weed/shell/command_ec_rebuild.go @@ -6,10 +6,10 @@ import ( "fmt" "io" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" + "github.com/joeslay/seaweedfs/weed/storage/needle" "google.golang.org/grpc" ) diff --git a/weed/shell/command_ec_test.go b/weed/shell/command_ec_test.go index 9e578ed28..d1a784821 100644 --- a/weed/shell/command_ec_test.go +++ b/weed/shell/command_ec_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) func TestCommandEcBalanceSmall(t *testing.T) { diff --git a/weed/shell/command_fs_cat.go b/weed/shell/command_fs_cat.go index 66ced46c5..fdeda17de 100644 --- a/weed/shell/command_fs_cat.go +++ b/weed/shell/command_fs_cat.go @@ -6,8 +6,8 @@ import ( "io" "math" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" ) func init() { diff --git a/weed/shell/command_fs_du.go b/weed/shell/command_fs_du.go index 5e634c82a..678e05eeb 100644 --- a/weed/shell/command_fs_du.go +++ b/weed/shell/command_fs_du.go @@ -3,9 +3,9 @@ package shell import ( "context" "fmt" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/util" "google.golang.org/grpc" "io" ) diff --git a/weed/shell/command_fs_ls.go b/weed/shell/command_fs_ls.go index 6979635e1..678f0b7a1 100644 --- a/weed/shell/command_fs_ls.go +++ b/weed/shell/command_fs_ls.go @@ -3,8 +3,8 @@ package shell import ( "context" "fmt" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" "io" "os" "os/user" diff --git a/weed/shell/command_fs_meta_load.go b/weed/shell/command_fs_meta_load.go index 5ea8de9f5..2146755fc 100644 --- a/weed/shell/command_fs_meta_load.go +++ b/weed/shell/command_fs_meta_load.go @@ -6,9 +6,9 @@ import ( "io" "os" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/util" "github.com/golang/protobuf/proto" ) diff --git a/weed/shell/command_fs_meta_notify.go b/weed/shell/command_fs_meta_notify.go index 13b272fbf..5064b0033 100644 --- a/weed/shell/command_fs_meta_notify.go +++ b/weed/shell/command_fs_meta_notify.go @@ -5,10 +5,10 @@ import ( "fmt" "io" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/notification" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/notification" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/util" "github.com/spf13/viper" ) diff --git a/weed/shell/command_fs_meta_save.go b/weed/shell/command_fs_meta_save.go index e710fe297..e0d24e672 100644 --- a/weed/shell/command_fs_meta_save.go +++ b/weed/shell/command_fs_meta_save.go @@ -8,9 +8,9 @@ import ( "os" "time" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/util" "github.com/golang/protobuf/proto" ) diff --git a/weed/shell/command_fs_mv.go b/weed/shell/command_fs_mv.go index 67606ab53..d1f04a851 100644 --- a/weed/shell/command_fs_mv.go +++ b/weed/shell/command_fs_mv.go @@ -6,8 +6,8 @@ import ( "io" "path/filepath" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" ) func init() { diff --git a/weed/shell/command_fs_tree.go b/weed/shell/command_fs_tree.go index 8474e43ea..c75c7d11f 100644 --- a/weed/shell/command_fs_tree.go +++ b/weed/shell/command_fs_tree.go @@ -3,8 +3,8 @@ package shell import ( "context" "fmt" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" "io" "strings" ) diff --git a/weed/shell/command_volume_balance.go b/weed/shell/command_volume_balance.go index d7ef0d005..b24fa43b6 100644 --- a/weed/shell/command_volume_balance.go +++ b/weed/shell/command_volume_balance.go @@ -9,8 +9,8 @@ import ( "sort" "time" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) func init() { diff --git a/weed/shell/command_volume_copy.go b/weed/shell/command_volume_copy.go index 1c83ba655..e44976f88 100644 --- a/weed/shell/command_volume_copy.go +++ b/weed/shell/command_volume_copy.go @@ -5,7 +5,7 @@ import ( "fmt" "io" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) func init() { diff --git a/weed/shell/command_volume_delete.go b/weed/shell/command_volume_delete.go index 17d27ea3a..604b7d9c1 100644 --- a/weed/shell/command_volume_delete.go +++ b/weed/shell/command_volume_delete.go @@ -5,7 +5,7 @@ import ( "fmt" "io" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) func init() { diff --git a/weed/shell/command_volume_fix_replication.go b/weed/shell/command_volume_fix_replication.go index 4c7a794c0..ced0b51f6 100644 --- a/weed/shell/command_volume_fix_replication.go +++ b/weed/shell/command_volume_fix_replication.go @@ -3,10 +3,10 @@ package shell import ( "context" "fmt" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/storage" "io" "math/rand" "sort" diff --git a/weed/shell/command_volume_list.go b/weed/shell/command_volume_list.go index 134580ffe..7a1aa0d87 100644 --- a/weed/shell/command_volume_list.go +++ b/weed/shell/command_volume_list.go @@ -3,8 +3,8 @@ package shell import ( "context" "fmt" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" "io" "sort" diff --git a/weed/shell/command_volume_mount.go b/weed/shell/command_volume_mount.go index 50a307492..78d3878bc 100644 --- a/weed/shell/command_volume_mount.go +++ b/weed/shell/command_volume_mount.go @@ -5,9 +5,9 @@ import ( "fmt" "io" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/storage/needle" "google.golang.org/grpc" ) diff --git a/weed/shell/command_volume_move.go b/weed/shell/command_volume_move.go index 08d87c988..bca3cebbb 100644 --- a/weed/shell/command_volume_move.go +++ b/weed/shell/command_volume_move.go @@ -7,9 +7,9 @@ import ( "log" "time" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/storage/needle" "google.golang.org/grpc" ) diff --git a/weed/shell/command_volume_unmount.go b/weed/shell/command_volume_unmount.go index 8096f34d8..f6e2efdcc 100644 --- a/weed/shell/command_volume_unmount.go +++ b/weed/shell/command_volume_unmount.go @@ -5,9 +5,9 @@ import ( "fmt" "io" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/storage/needle" "google.golang.org/grpc" ) diff --git a/weed/shell/commands.go b/weed/shell/commands.go index b642ec253..e361ae586 100644 --- a/weed/shell/commands.go +++ b/weed/shell/commands.go @@ -9,9 +9,9 @@ import ( "strconv" "strings" - "github.com/chrislusf/seaweedfs/weed/filer2" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/wdclient" + "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/joeslay/seaweedfs/weed/wdclient" "google.golang.org/grpc" ) diff --git a/weed/stats/disk.go b/weed/stats/disk.go index e9d8baedd..22e306312 100644 --- a/weed/stats/disk.go +++ b/weed/stats/disk.go @@ -1,6 +1,6 @@ package stats -import "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" +import "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" func NewDiskStatus(path string) (disk *volume_server_pb.DiskStatus) { disk = &volume_server_pb.DiskStatus{Dir: path} diff --git a/weed/stats/disk_notsupported.go b/weed/stats/disk_notsupported.go index ace662f6a..b2a9ce8c9 100644 --- a/weed/stats/disk_notsupported.go +++ b/weed/stats/disk_notsupported.go @@ -2,7 +2,7 @@ package stats -import "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" +import "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" func fillInDiskStatus(status *volume_server_pb.DiskStatus) { return diff --git a/weed/stats/disk_supported.go b/weed/stats/disk_supported.go index 0537828b0..549b2275a 100644 --- a/weed/stats/disk_supported.go +++ b/weed/stats/disk_supported.go @@ -5,7 +5,7 @@ package stats import ( "syscall" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" ) func fillInDiskStatus(disk *volume_server_pb.DiskStatus) { diff --git a/weed/stats/memory.go b/weed/stats/memory.go index c671efc4d..04531604e 100644 --- a/weed/stats/memory.go +++ b/weed/stats/memory.go @@ -3,7 +3,7 @@ package stats import ( "runtime" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" ) func MemStat() *volume_server_pb.MemStatus { diff --git a/weed/stats/memory_notsupported.go b/weed/stats/memory_notsupported.go index 2bed95266..865b43521 100644 --- a/weed/stats/memory_notsupported.go +++ b/weed/stats/memory_notsupported.go @@ -2,7 +2,7 @@ package stats -import "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" +import "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" func fillInMemStatus(status *volume_server_pb.MemStatus) { return diff --git a/weed/stats/memory_supported.go b/weed/stats/memory_supported.go index 91fdd005b..71ee28c12 100644 --- a/weed/stats/memory_supported.go +++ b/weed/stats/memory_supported.go @@ -5,7 +5,7 @@ package stats import ( "syscall" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" ) func fillInMemStatus(mem *volume_server_pb.MemStatus) { diff --git a/weed/stats/metrics.go b/weed/stats/metrics.go index a9624cd86..e079614e5 100644 --- a/weed/stats/metrics.go +++ b/weed/stats/metrics.go @@ -5,7 +5,7 @@ import ( "os" "time" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/glog" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/push" ) diff --git a/weed/storage/disk_location.go b/weed/storage/disk_location.go index e61623fc7..5148dfa2d 100644 --- a/weed/storage/disk_location.go +++ b/weed/storage/disk_location.go @@ -8,9 +8,9 @@ import ( "fmt" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) type DiskLocation struct { diff --git a/weed/storage/disk_location_ec.go b/weed/storage/disk_location_ec.go index ba0824c6d..4e7eeedfa 100644 --- a/weed/storage/disk_location_ec.go +++ b/weed/storage/disk_location_ec.go @@ -8,8 +8,8 @@ import ( "sort" "strconv" - "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) var ( diff --git a/weed/storage/erasure_coding/ec_encoder.go b/weed/storage/erasure_coding/ec_encoder.go index 97010a1ed..7a979ecad 100644 --- a/weed/storage/erasure_coding/ec_encoder.go +++ b/weed/storage/erasure_coding/ec_encoder.go @@ -5,11 +5,11 @@ import ( "io" "os" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/storage/idx" - "github.com/chrislusf/seaweedfs/weed/storage/needle_map" - "github.com/chrislusf/seaweedfs/weed/storage/types" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/storage/idx" + "github.com/joeslay/seaweedfs/weed/storage/needle_map" + "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/util" "github.com/klauspost/reedsolomon" ) diff --git a/weed/storage/erasure_coding/ec_shard.go b/weed/storage/erasure_coding/ec_shard.go index 47e6d3d1e..60c0a5794 100644 --- a/weed/storage/erasure_coding/ec_shard.go +++ b/weed/storage/erasure_coding/ec_shard.go @@ -6,8 +6,8 @@ import ( "path" "strconv" - "github.com/chrislusf/seaweedfs/weed/stats" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/stats" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) type ShardId uint8 diff --git a/weed/storage/erasure_coding/ec_test.go b/weed/storage/erasure_coding/ec_test.go index 57df09525..ba0a4306c 100644 --- a/weed/storage/erasure_coding/ec_test.go +++ b/weed/storage/erasure_coding/ec_test.go @@ -7,8 +7,8 @@ import ( "os" "testing" - "github.com/chrislusf/seaweedfs/weed/storage/needle_map" - "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/storage/needle_map" + "github.com/joeslay/seaweedfs/weed/storage/types" "github.com/klauspost/reedsolomon" ) diff --git a/weed/storage/erasure_coding/ec_volume.go b/weed/storage/erasure_coding/ec_volume.go index bcae164ca..00cd18e29 100644 --- a/weed/storage/erasure_coding/ec_volume.go +++ b/weed/storage/erasure_coding/ec_volume.go @@ -9,10 +9,10 @@ import ( "sync" "time" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/storage/idx" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/storage/idx" + "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/storage/types" ) var ( diff --git a/weed/storage/erasure_coding/ec_volume_delete.go b/weed/storage/erasure_coding/ec_volume_delete.go index 04102ec9e..71c00a44c 100644 --- a/weed/storage/erasure_coding/ec_volume_delete.go +++ b/weed/storage/erasure_coding/ec_volume_delete.go @@ -5,8 +5,8 @@ import ( "io" "os" - "github.com/chrislusf/seaweedfs/weed/storage/types" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/util" ) var ( diff --git a/weed/storage/erasure_coding/ec_volume_info.go b/weed/storage/erasure_coding/ec_volume_info.go index c9e85c662..b09b8ce92 100644 --- a/weed/storage/erasure_coding/ec_volume_info.go +++ b/weed/storage/erasure_coding/ec_volume_info.go @@ -1,8 +1,8 @@ package erasure_coding import ( - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) // data structure used in master diff --git a/weed/storage/idx/walk.go b/weed/storage/idx/walk.go index 90efb75e6..5677d5622 100644 --- a/weed/storage/idx/walk.go +++ b/weed/storage/idx/walk.go @@ -4,9 +4,9 @@ import ( "io" "os" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/storage/types" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/util" ) // walks through the index file, calls fn function with each key, offset, size diff --git a/weed/storage/needle/crc.go b/weed/storage/needle/crc.go index 00ea1db69..9d3d31963 100644 --- a/weed/storage/needle/crc.go +++ b/weed/storage/needle/crc.go @@ -4,7 +4,7 @@ import ( "crypto/md5" "fmt" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/util" "github.com/klauspost/crc32" ) diff --git a/weed/storage/needle/file_id.go b/weed/storage/needle/file_id.go index 5dabb0f25..3aaba7fbf 100644 --- a/weed/storage/needle/file_id.go +++ b/weed/storage/needle/file_id.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - . "github.com/chrislusf/seaweedfs/weed/storage/types" + . "github.com/joeslay/seaweedfs/weed/storage/types" ) type FileId struct { diff --git a/weed/storage/needle/file_id_test.go b/weed/storage/needle/file_id_test.go index a1a2c61fc..f21bc5c28 100644 --- a/weed/storage/needle/file_id_test.go +++ b/weed/storage/needle/file_id_test.go @@ -1,7 +1,7 @@ package needle import ( - "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/storage/types" "testing" ) diff --git a/weed/storage/needle/needle.go b/weed/storage/needle/needle.go index 2f03ba87b..7c841d037 100644 --- a/weed/storage/needle/needle.go +++ b/weed/storage/needle/needle.go @@ -10,8 +10,8 @@ import ( "io/ioutil" - "github.com/chrislusf/seaweedfs/weed/images" - . "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/images" + . "github.com/joeslay/seaweedfs/weed/storage/types" ) const ( diff --git a/weed/storage/needle/needle_parse_multipart.go b/weed/storage/needle/needle_parse_multipart.go index 8be1a1da4..993ae7178 100644 --- a/weed/storage/needle/needle_parse_multipart.go +++ b/weed/storage/needle/needle_parse_multipart.go @@ -1,8 +1,8 @@ package needle import ( - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/util" "io" "io/ioutil" diff --git a/weed/storage/needle/needle_read_write_test.go b/weed/storage/needle/needle_read_write_test.go index 4c507f9e6..c63662e5f 100644 --- a/weed/storage/needle/needle_read_write_test.go +++ b/weed/storage/needle/needle_read_write_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/storage/types" ) func TestAppend(t *testing.T) { diff --git a/weed/storage/needle/needle_test.go b/weed/storage/needle/needle_test.go index 0f2dde98e..a1aeddd27 100644 --- a/weed/storage/needle/needle_test.go +++ b/weed/storage/needle/needle_test.go @@ -3,7 +3,7 @@ package needle import ( "testing" - "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/storage/types" ) func TestParseKeyHash(t *testing.T) { diff --git a/weed/storage/needle_map.go b/weed/storage/needle_map.go index 876839be1..f2ff9bb76 100644 --- a/weed/storage/needle_map.go +++ b/weed/storage/needle_map.go @@ -6,8 +6,8 @@ import ( "os" "sync" - "github.com/chrislusf/seaweedfs/weed/storage/needle_map" - . "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/storage/needle_map" + . "github.com/joeslay/seaweedfs/weed/storage/types" ) type NeedleMapType int diff --git a/weed/storage/needle_map/btree_map.go b/weed/storage/needle_map/btree_map.go index a26c5e068..01a7ee5e0 100644 --- a/weed/storage/needle_map/btree_map.go +++ b/weed/storage/needle_map/btree_map.go @@ -1,7 +1,7 @@ package needle_map import ( - . "github.com/chrislusf/seaweedfs/weed/storage/types" + . "github.com/joeslay/seaweedfs/weed/storage/types" "github.com/google/btree" ) diff --git a/weed/storage/needle_map/compact_map.go b/weed/storage/needle_map/compact_map.go index 76783d0b0..da613124a 100644 --- a/weed/storage/needle_map/compact_map.go +++ b/weed/storage/needle_map/compact_map.go @@ -4,7 +4,7 @@ import ( "sort" "sync" - . "github.com/chrislusf/seaweedfs/weed/storage/types" + . "github.com/joeslay/seaweedfs/weed/storage/types" ) const ( diff --git a/weed/storage/needle_map/compact_map_perf_test.go b/weed/storage/needle_map/compact_map_perf_test.go index 3a3648641..8d1fa0fcf 100644 --- a/weed/storage/needle_map/compact_map_perf_test.go +++ b/weed/storage/needle_map/compact_map_perf_test.go @@ -8,8 +8,8 @@ import ( "testing" "time" - . "github.com/chrislusf/seaweedfs/weed/storage/types" - "github.com/chrislusf/seaweedfs/weed/util" + . "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/util" ) /* diff --git a/weed/storage/needle_map/compact_map_test.go b/weed/storage/needle_map/compact_map_test.go index 3bad85727..43761008c 100644 --- a/weed/storage/needle_map/compact_map_test.go +++ b/weed/storage/needle_map/compact_map_test.go @@ -2,7 +2,7 @@ package needle_map import ( "fmt" - . "github.com/chrislusf/seaweedfs/weed/storage/types" + . "github.com/joeslay/seaweedfs/weed/storage/types" "testing" ) diff --git a/weed/storage/needle_map/needle_value.go b/weed/storage/needle_map/needle_value.go index ef540b55e..fc54663bb 100644 --- a/weed/storage/needle_map/needle_value.go +++ b/weed/storage/needle_map/needle_value.go @@ -1,8 +1,8 @@ package needle_map import ( - . "github.com/chrislusf/seaweedfs/weed/storage/types" - "github.com/chrislusf/seaweedfs/weed/util" + . "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/util" "github.com/google/btree" ) diff --git a/weed/storage/needle_map/needle_value_map.go b/weed/storage/needle_map/needle_value_map.go index 0a5a00ef7..e0afb355c 100644 --- a/weed/storage/needle_map/needle_value_map.go +++ b/weed/storage/needle_map/needle_value_map.go @@ -1,7 +1,7 @@ package needle_map import ( - . "github.com/chrislusf/seaweedfs/weed/storage/types" + . "github.com/joeslay/seaweedfs/weed/storage/types" ) type NeedleValueMap interface { diff --git a/weed/storage/needle_map_leveldb.go b/weed/storage/needle_map_leveldb.go index ef8571e83..7eec4e349 100644 --- a/weed/storage/needle_map_leveldb.go +++ b/weed/storage/needle_map_leveldb.go @@ -5,13 +5,13 @@ import ( "os" "path/filepath" - "github.com/chrislusf/seaweedfs/weed/storage/idx" + "github.com/joeslay/seaweedfs/weed/storage/idx" "github.com/syndtr/goleveldb/leveldb/opt" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/storage/needle_map" - . "github.com/chrislusf/seaweedfs/weed/storage/types" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/storage/needle_map" + . "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/util" "github.com/syndtr/goleveldb/leveldb" ) diff --git a/weed/storage/needle_map_memory.go b/weed/storage/needle_map_memory.go index ee639a7e6..84ff51a33 100644 --- a/weed/storage/needle_map_memory.go +++ b/weed/storage/needle_map_memory.go @@ -3,10 +3,10 @@ package storage import ( "os" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/storage/idx" - "github.com/chrislusf/seaweedfs/weed/storage/needle_map" - . "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/storage/idx" + "github.com/joeslay/seaweedfs/weed/storage/needle_map" + . "github.com/joeslay/seaweedfs/weed/storage/types" ) type NeedleMap struct { diff --git a/weed/storage/needle_map_metric.go b/weed/storage/needle_map_metric.go index 823a04108..e22a5b5ca 100644 --- a/weed/storage/needle_map_metric.go +++ b/weed/storage/needle_map_metric.go @@ -5,8 +5,8 @@ import ( "os" "sync/atomic" - "github.com/chrislusf/seaweedfs/weed/storage/idx" - . "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/storage/idx" + . "github.com/joeslay/seaweedfs/weed/storage/types" "github.com/willf/bloom" ) diff --git a/weed/storage/needle_map_metric_test.go b/weed/storage/needle_map_metric_test.go index 539f83a87..9b946036f 100644 --- a/weed/storage/needle_map_metric_test.go +++ b/weed/storage/needle_map_metric_test.go @@ -1,8 +1,8 @@ package storage import ( - "github.com/chrislusf/seaweedfs/weed/glog" - . "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/glog" + . "github.com/joeslay/seaweedfs/weed/storage/types" "io/ioutil" "math/rand" "testing" diff --git a/weed/storage/store.go b/weed/storage/store.go index f0dc90790..d11c74d50 100644 --- a/weed/storage/store.go +++ b/weed/storage/store.go @@ -4,11 +4,11 @@ import ( "fmt" "sync/atomic" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/stats" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - . "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/stats" + "github.com/joeslay/seaweedfs/weed/storage/needle" + . "github.com/joeslay/seaweedfs/weed/storage/types" "google.golang.org/grpc" ) diff --git a/weed/storage/store_ec.go b/weed/storage/store_ec.go index 8271324cf..570f00713 100644 --- a/weed/storage/store_ec.go +++ b/weed/storage/store_ec.go @@ -8,14 +8,14 @@ import ( "sync" "time" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/stats" - "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/stats" + "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" + "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/storage/types" "github.com/klauspost/reedsolomon" ) diff --git a/weed/storage/store_ec_delete.go b/weed/storage/store_ec_delete.go index e027d2887..c1e582668 100644 --- a/weed/storage/store_ec_delete.go +++ b/weed/storage/store_ec_delete.go @@ -4,12 +4,12 @@ import ( "context" "fmt" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" + "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/storage/types" ) func (s *Store) DeleteEcShardNeedle(ctx context.Context, ecVolume *erasure_coding.EcVolume, n *needle.Needle, cookie types.Cookie) (int64, error) { diff --git a/weed/storage/store_vacuum.go b/weed/storage/store_vacuum.go index b1f1a6277..6acf5b10e 100644 --- a/weed/storage/store_vacuum.go +++ b/weed/storage/store_vacuum.go @@ -3,8 +3,8 @@ package storage import ( "fmt" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) func (s *Store) CheckCompactVolume(volumeId needle.VolumeId) (float64, error) { diff --git a/weed/storage/types/needle_id_type.go b/weed/storage/types/needle_id_type.go index 32a296613..556e1b9d2 100644 --- a/weed/storage/types/needle_id_type.go +++ b/weed/storage/types/needle_id_type.go @@ -2,7 +2,7 @@ package types import ( "fmt" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/util" "strconv" ) diff --git a/weed/storage/types/needle_types.go b/weed/storage/types/needle_types.go index 2ebb392db..b493af27e 100644 --- a/weed/storage/types/needle_types.go +++ b/weed/storage/types/needle_types.go @@ -2,7 +2,7 @@ package types import ( "fmt" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/util" "math" "strconv" ) diff --git a/weed/storage/volume.go b/weed/storage/volume.go index a2e34bd04..4a89667f0 100644 --- a/weed/storage/volume.go +++ b/weed/storage/volume.go @@ -3,10 +3,10 @@ package storage import ( "fmt" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/stats" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/stats" + "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/storage/types" "os" "path" @@ -14,7 +14,7 @@ import ( "sync" "time" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/glog" ) type Volume struct { diff --git a/weed/storage/volume_backup.go b/weed/storage/volume_backup.go index 86d13da7a..c9445881c 100644 --- a/weed/storage/volume_backup.go +++ b/weed/storage/volume_backup.go @@ -6,11 +6,11 @@ import ( "io" "os" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/storage/idx" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - . "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/storage/idx" + "github.com/joeslay/seaweedfs/weed/storage/needle" + . "github.com/joeslay/seaweedfs/weed/storage/types" "google.golang.org/grpc" ) diff --git a/weed/storage/volume_checking.go b/weed/storage/volume_checking.go index 8f930546f..0f26bd103 100644 --- a/weed/storage/volume_checking.go +++ b/weed/storage/volume_checking.go @@ -4,10 +4,10 @@ import ( "fmt" "os" - "github.com/chrislusf/seaweedfs/weed/storage/idx" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - . "github.com/chrislusf/seaweedfs/weed/storage/types" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/storage/idx" + "github.com/joeslay/seaweedfs/weed/storage/needle" + . "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/util" ) func CheckVolumeDataIntegrity(v *Volume, indexFile *os.File) (lastAppendAtNs uint64, e error) { diff --git a/weed/storage/volume_create.go b/weed/storage/volume_create.go index 275c69fad..02775c109 100644 --- a/weed/storage/volume_create.go +++ b/weed/storage/volume_create.go @@ -5,7 +5,7 @@ package storage import ( "os" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/glog" ) func createVolumeFile(fileName string, preallocate int64) (file *os.File, e error) { diff --git a/weed/storage/volume_create_linux.go b/weed/storage/volume_create_linux.go index 8f6bab2fe..875f02f00 100644 --- a/weed/storage/volume_create_linux.go +++ b/weed/storage/volume_create_linux.go @@ -6,7 +6,7 @@ import ( "os" "syscall" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/glog" ) func createVolumeFile(fileName string, preallocate int64) (file *os.File, e error) { diff --git a/weed/storage/volume_info.go b/weed/storage/volume_info.go index 111058b6e..6990d42b1 100644 --- a/weed/storage/volume_info.go +++ b/weed/storage/volume_info.go @@ -4,8 +4,8 @@ import ( "fmt" "sort" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) type VolumeInfo struct { diff --git a/weed/storage/volume_info_test.go b/weed/storage/volume_info_test.go index 5b1bacb52..9ace2be02 100644 --- a/weed/storage/volume_info_test.go +++ b/weed/storage/volume_info_test.go @@ -3,7 +3,7 @@ package storage import ( "testing" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) func TestSortVolumeInfos(t *testing.T) { diff --git a/weed/storage/volume_loading.go b/weed/storage/volume_loading.go index 0b6021ca8..27878befd 100644 --- a/weed/storage/volume_loading.go +++ b/weed/storage/volume_loading.go @@ -5,11 +5,11 @@ import ( "os" "time" - "github.com/chrislusf/seaweedfs/weed/stats" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/stats" + "github.com/joeslay/seaweedfs/weed/storage/needle" "github.com/syndtr/goleveldb/leveldb/opt" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/glog" ) func loadVolumeWithoutIndex(dirname string, collection string, id needle.VolumeId, needleMapKind NeedleMapType) (v *Volume, e error) { diff --git a/weed/storage/volume_super_block_test.go b/weed/storage/volume_super_block_test.go index 06ad8a5d3..433eacdff 100644 --- a/weed/storage/volume_super_block_test.go +++ b/weed/storage/volume_super_block_test.go @@ -3,7 +3,7 @@ package storage import ( "testing" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) func TestSuperBlockReadWrite(t *testing.T) { diff --git a/weed/storage/volume_vacuum.go b/weed/storage/volume_vacuum.go index c021c4c18..dc69efff2 100644 --- a/weed/storage/volume_vacuum.go +++ b/weed/storage/volume_vacuum.go @@ -5,13 +5,13 @@ import ( "os" "time" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/stats" - idx2 "github.com/chrislusf/seaweedfs/weed/storage/idx" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - "github.com/chrislusf/seaweedfs/weed/storage/needle_map" - . "github.com/chrislusf/seaweedfs/weed/storage/types" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/stats" + idx2 "github.com/joeslay/seaweedfs/weed/storage/idx" + "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/storage/needle_map" + . "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/util" ) func (v *Volume) garbageLevel() float64 { diff --git a/weed/storage/volume_vacuum_test.go b/weed/storage/volume_vacuum_test.go index 54899c788..7e2e43994 100644 --- a/weed/storage/volume_vacuum_test.go +++ b/weed/storage/volume_vacuum_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/storage/types" ) /* diff --git a/weed/topology/allocate_volume.go b/weed/topology/allocate_volume.go index 48336092f..69d106964 100644 --- a/weed/topology/allocate_volume.go +++ b/weed/topology/allocate_volume.go @@ -3,9 +3,9 @@ package topology import ( "context" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/storage/needle" "google.golang.org/grpc" ) diff --git a/weed/topology/cluster_commands.go b/weed/topology/cluster_commands.go index 152691ccb..a5843d0e5 100644 --- a/weed/topology/cluster_commands.go +++ b/weed/topology/cluster_commands.go @@ -2,8 +2,8 @@ package topology import ( "github.com/chrislusf/raft" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) type MaxVolumeIdCommand struct { diff --git a/weed/topology/collection.go b/weed/topology/collection.go index f6b728ec9..c4fd3af61 100644 --- a/weed/topology/collection.go +++ b/weed/topology/collection.go @@ -3,9 +3,9 @@ package topology import ( "fmt" - "github.com/chrislusf/seaweedfs/weed/storage" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/util" ) type Collection struct { diff --git a/weed/topology/data_center.go b/weed/topology/data_center.go index 640cb1937..b419070f8 100644 --- a/weed/topology/data_center.go +++ b/weed/topology/data_center.go @@ -1,6 +1,6 @@ package topology -import "github.com/chrislusf/seaweedfs/weed/pb/master_pb" +import "github.com/joeslay/seaweedfs/weed/pb/master_pb" type DataCenter struct { NodeImpl diff --git a/weed/topology/data_node.go b/weed/topology/data_node.go index 3e72ccdbf..83e58e075 100644 --- a/weed/topology/data_node.go +++ b/weed/topology/data_node.go @@ -4,14 +4,14 @@ import ( "fmt" "sync" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" + "github.com/joeslay/seaweedfs/weed/storage/needle" "strconv" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/storage" ) type DataNode struct { diff --git a/weed/topology/data_node_ec.go b/weed/topology/data_node_ec.go index 75c8784fe..404ce7c7b 100644 --- a/weed/topology/data_node_ec.go +++ b/weed/topology/data_node_ec.go @@ -1,8 +1,8 @@ package topology import ( - "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) func (dn *DataNode) GetEcShards() (ret []*erasure_coding.EcVolumeInfo) { diff --git a/weed/topology/node.go b/weed/topology/node.go index b2808f589..cfa6bebc4 100644 --- a/weed/topology/node.go +++ b/weed/topology/node.go @@ -7,9 +7,9 @@ import ( "sync" "sync/atomic" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) type NodeId string diff --git a/weed/topology/rack.go b/weed/topology/rack.go index 932c1a804..9926dbbff 100644 --- a/weed/topology/rack.go +++ b/weed/topology/rack.go @@ -1,7 +1,7 @@ package topology import ( - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" "strconv" "time" ) diff --git a/weed/topology/store_replicate.go b/weed/topology/store_replicate.go index d21c4d210..e3f3b445e 100644 --- a/weed/topology/store_replicate.go +++ b/weed/topology/store_replicate.go @@ -10,12 +10,12 @@ import ( "strconv" "strings" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/security" - "github.com/chrislusf/seaweedfs/weed/storage" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/security" + "github.com/joeslay/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/util" ) func ReplicatedWrite(masterNode string, s *storage.Store, diff --git a/weed/topology/topology.go b/weed/topology/topology.go index eff8c99a0..48b8080b7 100644 --- a/weed/topology/topology.go +++ b/weed/topology/topology.go @@ -7,12 +7,12 @@ import ( "sync" "github.com/chrislusf/raft" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/sequence" - "github.com/chrislusf/seaweedfs/weed/storage" - "github.com/chrislusf/seaweedfs/weed/storage/needle" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/sequence" + "github.com/joeslay/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/util" ) type Topology struct { diff --git a/weed/topology/topology_ec.go b/weed/topology/topology_ec.go index 93b39bb5d..91330f00f 100644 --- a/weed/topology/topology_ec.go +++ b/weed/topology/topology_ec.go @@ -1,10 +1,10 @@ package topology import ( - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) type EcShardLocations struct { diff --git a/weed/topology/topology_event_handling.go b/weed/topology/topology_event_handling.go index 041351492..c51070a32 100644 --- a/weed/topology/topology_event_handling.go +++ b/weed/topology/topology_event_handling.go @@ -5,8 +5,8 @@ import ( "math/rand" "time" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/storage" ) func (t *Topology) StartRefreshWritableVolumes(grpcDialOption grpc.DialOption, garbageThreshold float64, preallocate int64) { diff --git a/weed/topology/topology_map.go b/weed/topology/topology_map.go index 37a88c9ed..d779bd590 100644 --- a/weed/topology/topology_map.go +++ b/weed/topology/topology_map.go @@ -1,6 +1,6 @@ package topology -import "github.com/chrislusf/seaweedfs/weed/pb/master_pb" +import "github.com/joeslay/seaweedfs/weed/pb/master_pb" func (t *Topology) ToMap() interface{} { m := make(map[string]interface{}) diff --git a/weed/topology/topology_test.go b/weed/topology/topology_test.go index 8f79ad684..5910c87db 100644 --- a/weed/topology/topology_test.go +++ b/weed/topology/topology_test.go @@ -1,10 +1,10 @@ package topology import ( - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/sequence" - "github.com/chrislusf/seaweedfs/weed/storage" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/sequence" + "github.com/joeslay/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/storage/needle" "testing" ) diff --git a/weed/topology/topology_vacuum.go b/weed/topology/topology_vacuum.go index 37a6a30b9..15b813815 100644 --- a/weed/topology/topology_vacuum.go +++ b/weed/topology/topology_vacuum.go @@ -5,12 +5,12 @@ import ( "sync/atomic" "time" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/storage/needle" "google.golang.org/grpc" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/operation" - "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/operation" + "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" ) func batchVacuumVolumeCheck(grpcDialOption grpc.DialOption, vl *VolumeLayout, vid needle.VolumeId, locationlist *VolumeLocationList, garbageThreshold float64) bool { diff --git a/weed/topology/volume_growth.go b/weed/topology/volume_growth.go index ff02044a1..adbdd6b27 100644 --- a/weed/topology/volume_growth.go +++ b/weed/topology/volume_growth.go @@ -5,11 +5,11 @@ import ( "math/rand" "sync" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/storage/needle" "google.golang.org/grpc" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/storage" ) /* diff --git a/weed/topology/volume_growth_test.go b/weed/topology/volume_growth_test.go index 3573365fd..b1573ae00 100644 --- a/weed/topology/volume_growth_test.go +++ b/weed/topology/volume_growth_test.go @@ -5,9 +5,9 @@ import ( "fmt" "testing" - "github.com/chrislusf/seaweedfs/weed/sequence" - "github.com/chrislusf/seaweedfs/weed/storage" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/sequence" + "github.com/joeslay/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) var topologyLayout = ` diff --git a/weed/topology/volume_layout.go b/weed/topology/volume_layout.go index 799cbca62..b2b1dd49f 100644 --- a/weed/topology/volume_layout.go +++ b/weed/topology/volume_layout.go @@ -7,9 +7,9 @@ import ( "sync" "time" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/storage" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/storage" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) // mapping from volume to its locations, inverted from server to volume diff --git a/weed/topology/volume_location_list.go b/weed/topology/volume_location_list.go index 8905c54b5..8fddc1912 100644 --- a/weed/topology/volume_location_list.go +++ b/weed/topology/volume_location_list.go @@ -3,7 +3,7 @@ package topology import ( "fmt" - "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/joeslay/seaweedfs/weed/storage/needle" ) type VolumeLocationList struct { diff --git a/weed/util/compression.go b/weed/util/compression.go index c6c9423e2..a825dadcb 100644 --- a/weed/util/compression.go +++ b/weed/util/compression.go @@ -7,7 +7,7 @@ import ( "io/ioutil" "strings" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/glog" "golang.org/x/tools/godoc/util" ) diff --git a/weed/util/config.go b/weed/util/config.go index 1ea833d1f..3028b14bf 100644 --- a/weed/util/config.go +++ b/weed/util/config.go @@ -1,7 +1,7 @@ package util import ( - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/glog" "github.com/spf13/viper" ) diff --git a/weed/util/file_util.go b/weed/util/file_util.go index 78add6724..c6da9c934 100644 --- a/weed/util/file_util.go +++ b/weed/util/file_util.go @@ -4,7 +4,7 @@ import ( "errors" "os" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/glog" ) func TestFolderWritable(folder string) (err error) { diff --git a/weed/util/net_timeout.go b/weed/util/net_timeout.go index b8068e67f..10f3f893b 100644 --- a/weed/util/net_timeout.go +++ b/weed/util/net_timeout.go @@ -4,7 +4,7 @@ import ( "net" "time" - "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/joeslay/seaweedfs/weed/stats" ) // Listener wraps a net.Listener, and gives a place to store the timeout diff --git a/weed/util/pprof.go b/weed/util/pprof.go index a2621ceee..088053803 100644 --- a/weed/util/pprof.go +++ b/weed/util/pprof.go @@ -5,7 +5,7 @@ import ( "runtime" "runtime/pprof" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/glog" ) func SetupProfiling(cpuProfile, memProfile string) { diff --git a/weed/wdclient/masterclient.go b/weed/wdclient/masterclient.go index da867696d..bfe145b30 100644 --- a/weed/wdclient/masterclient.go +++ b/weed/wdclient/masterclient.go @@ -6,9 +6,9 @@ import ( "math/rand" "time" - "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/chrislusf/seaweedfs/weed/pb/master_pb" - "github.com/chrislusf/seaweedfs/weed/util" + "github.com/joeslay/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/joeslay/seaweedfs/weed/util" "google.golang.org/grpc" ) diff --git a/weed/wdclient/vid_map.go b/weed/wdclient/vid_map.go index 01d9cdaed..ccb9f926f 100644 --- a/weed/wdclient/vid_map.go +++ b/weed/wdclient/vid_map.go @@ -9,7 +9,7 @@ import ( "sync" "time" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/glog" ) type Location struct { diff --git a/weed/weed.go b/weed/weed.go index ecb0ba2a4..2bdefc9d7 100644 --- a/weed/weed.go +++ b/weed/weed.go @@ -16,8 +16,8 @@ import ( "unicode" "unicode/utf8" - "github.com/chrislusf/seaweedfs/weed/command" - "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/joeslay/seaweedfs/weed/command" + "github.com/joeslay/seaweedfs/weed/glog" ) var IsDebug *bool From 0123c7a8982be2fedc3148fefd4aec00dd90ff3f Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Mon, 2 Sep 2019 17:46:22 +0100 Subject: [PATCH 08/37] Change to max 2GB for now --- weed/storage/volume_create_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/storage/volume_create_windows.go b/weed/storage/volume_create_windows.go index 5b30d3d52..658086079 100644 --- a/weed/storage/volume_create_windows.go +++ b/weed/storage/volume_create_windows.go @@ -20,7 +20,7 @@ func createVolumeFile(fileName string, preallocate int64) (*os.File, error) { memory_map.FileMemoryMap[fileName] = new(memory_map.MemoryMap) new_mem_map := memory_map.FileMemoryMap[fileName] - new_mem_map.CreateMemoryMap(file, 1024*1024*1024*4) + new_mem_map.CreateMemoryMap(file, 1024*1024*1024*2) if preallocate > 0 { glog.V(0).Infof("Preallocated disk space for %s is not supported", fileName) From 9a459d984bd3fa0da0a45751e7244b82f8bc7b92 Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Tue, 3 Sep 2019 15:05:43 +0100 Subject: [PATCH 09/37] Do not vacuum memory mapped files --- weed/storage/volume_vacuum.go | 142 +++++++++++++++++++--------------- 1 file changed, 79 insertions(+), 63 deletions(-) diff --git a/weed/storage/volume_vacuum.go b/weed/storage/volume_vacuum.go index dc69efff2..fd43ae855 100644 --- a/weed/storage/volume_vacuum.go +++ b/weed/storage/volume_vacuum.go @@ -8,6 +8,7 @@ import ( "github.com/joeslay/seaweedfs/weed/glog" "github.com/joeslay/seaweedfs/weed/stats" idx2 "github.com/joeslay/seaweedfs/weed/storage/idx" + "github.com/joeslay/seaweedfs/weed/storage/memory_map" "github.com/joeslay/seaweedfs/weed/storage/needle" "github.com/joeslay/seaweedfs/weed/storage/needle_map" . "github.com/joeslay/seaweedfs/weed/storage/types" @@ -22,86 +23,101 @@ func (v *Volume) garbageLevel() float64 { } func (v *Volume) Compact(preallocate int64, compactionBytePerSecond int64) error { - glog.V(3).Infof("Compacting volume %d ...", v.Id) - //no need to lock for copy on write - //v.accessLock.Lock() - //defer v.accessLock.Unlock() - //glog.V(3).Infof("Got Compaction lock...") - v.isCompacting = true - defer func() { - v.isCompacting = false - }() - filePath := v.FileName() - v.lastCompactIndexOffset = v.IndexFileSize() - v.lastCompactRevision = v.SuperBlock.CompactionRevision - glog.V(3).Infof("creating copies for volume %d ,last offset %d...", v.Id, v.lastCompactIndexOffset) - return v.copyDataAndGenerateIndexFile(filePath+".cpd", filePath+".cpx", preallocate, compactionBytePerSecond) + _, exists := memory_map.FileMemoryMap[v.dataFile.Name()] + if !exists { //it makes no sense to compact in memory + glog.V(3).Infof("Compacting volume %d ...", v.Id) + //no need to lock for copy on write + //v.accessLock.Lock() + //defer v.accessLock.Unlock() + //glog.V(3).Infof("Got Compaction lock...") + v.isCompacting = true + defer func() { + v.isCompacting = false + }() + + filePath := v.FileName() + v.lastCompactIndexOffset = v.IndexFileSize() + v.lastCompactRevision = v.SuperBlock.CompactionRevision + glog.V(3).Infof("creating copies for volume %d ,last offset %d...", v.Id, v.lastCompactIndexOffset) + return v.copyDataAndGenerateIndexFile(filePath+".cpd", filePath+".cpx", preallocate, compactionBytePerSecond) + } else { + return nil + } } func (v *Volume) Compact2() error { - glog.V(3).Infof("Compact2 volume %d ...", v.Id) + _, exists := memory_map.FileMemoryMap[v.dataFile.Name()] + if !exists { //it makes no sense to compact in memory - v.isCompacting = true - defer func() { - v.isCompacting = false - }() + glog.V(3).Infof("Compact2 volume %d ...", v.Id) - filePath := v.FileName() - glog.V(3).Infof("creating copies for volume %d ...", v.Id) - return v.copyDataBasedOnIndexFile(filePath+".cpd", filePath+".cpx") + v.isCompacting = true + defer func() { + v.isCompacting = false + }() + + filePath := v.FileName() + glog.V(3).Infof("creating copies for volume %d ...", v.Id) + return v.copyDataBasedOnIndexFile(filePath+".cpd", filePath+".cpx") + } else { + return nil + } } func (v *Volume) CommitCompact() error { - glog.V(0).Infof("Committing volume %d vacuuming...", v.Id) + _, exists := memory_map.FileMemoryMap[v.dataFile.Name()] + if !exists { //it makes no sense to compact in memory + glog.V(0).Infof("Committing volume %d vacuuming...", v.Id) - v.isCompacting = true - defer func() { - v.isCompacting = false - }() + v.isCompacting = true + defer func() { + v.isCompacting = false + }() - v.dataFileAccessLock.Lock() - defer v.dataFileAccessLock.Unlock() + v.dataFileAccessLock.Lock() + defer v.dataFileAccessLock.Unlock() - glog.V(3).Infof("Got volume %d committing lock...", v.Id) - v.nm.Close() - if err := v.dataFile.Close(); err != nil { - glog.V(0).Infof("fail to close volume %d", v.Id) - } - v.dataFile = nil - stats.VolumeServerVolumeCounter.WithLabelValues(v.Collection, "volume").Dec() - - var e error - if e = v.makeupDiff(v.FileName()+".cpd", v.FileName()+".cpx", v.FileName()+".dat", v.FileName()+".idx"); e != nil { - glog.V(0).Infof("makeupDiff in CommitCompact volume %d failed %v", v.Id, e) - e = os.Remove(v.FileName() + ".cpd") - if e != nil { - return e + glog.V(3).Infof("Got volume %d committing lock...", v.Id) + v.nm.Close() + if err := v.dataFile.Close(); err != nil { + glog.V(0).Infof("fail to close volume %d", v.Id) } - e = os.Remove(v.FileName() + ".cpx") - if e != nil { - return e - } - } else { + v.dataFile = nil + stats.VolumeServerVolumeCounter.WithLabelValues(v.Collection, "volume").Dec() + var e error - if e = os.Rename(v.FileName()+".cpd", v.FileName()+".dat"); e != nil { - return fmt.Errorf("rename %s: %v", v.FileName()+".cpd", e) + if e = v.makeupDiff(v.FileName()+".cpd", v.FileName()+".cpx", v.FileName()+".dat", v.FileName()+".idx"); e != nil { + glog.V(0).Infof("makeupDiff in CommitCompact volume %d failed %v", v.Id, e) + e = os.Remove(v.FileName() + ".cpd") + if e != nil { + return e + } + e = os.Remove(v.FileName() + ".cpx") + if e != nil { + return e + } + } else { + var e error + if e = os.Rename(v.FileName()+".cpd", v.FileName()+".dat"); e != nil { + return fmt.Errorf("rename %s: %v", v.FileName()+".cpd", e) + } + if e = os.Rename(v.FileName()+".cpx", v.FileName()+".idx"); e != nil { + return fmt.Errorf("rename %s: %v", v.FileName()+".cpx", e) + } } - if e = os.Rename(v.FileName()+".cpx", v.FileName()+".idx"); e != nil { - return fmt.Errorf("rename %s: %v", v.FileName()+".cpx", e) + + //glog.V(3).Infof("Pretending to be vacuuming...") + //time.Sleep(20 * time.Second) + + os.RemoveAll(v.FileName() + ".ldb") + os.RemoveAll(v.FileName() + ".bdb") + + glog.V(3).Infof("Loading volume %d commit file...", v.Id) + if e = v.load(true, false, v.needleMapKind, 0); e != nil { + return e } } - - //glog.V(3).Infof("Pretending to be vacuuming...") - //time.Sleep(20 * time.Second) - - os.RemoveAll(v.FileName() + ".ldb") - os.RemoveAll(v.FileName() + ".bdb") - - glog.V(3).Infof("Loading volume %d commit file...", v.Id) - if e = v.load(true, false, v.needleMapKind, 0); e != nil { - return e - } return nil } From d637d86d22f6f4033d931dd59aa86233521246a4 Mon Sep 17 00:00:00 2001 From: Tom Maxwell Date: Tue, 3 Sep 2019 15:41:28 +0100 Subject: [PATCH 10/37] Changes to try and pass the URL parameters through - in memory flag not working still --- weed/command/backup.go | 6 ++--- weed/command/compact.go | 6 +++-- weed/pb/master.proto | 1 + weed/pb/master_pb/master.pb.go | 19 +++++++++++--- weed/pb/volume_server.proto | 2 ++ weed/pb/volume_server_pb/volume_server.pb.go | 27 +++++++++++++++++--- weed/server/volume_grpc_admin.go | 1 + weed/server/volume_grpc_vacuum.go | 2 +- weed/storage/disk_location.go | 2 +- weed/storage/store.go | 8 +++--- weed/storage/store_vacuum.go | 4 +-- weed/storage/volume.go | 4 +-- weed/storage/volume_create_windows.go | 12 +++++---- weed/storage/volume_loading.go | 6 ++--- weed/storage/volume_vacuum.go | 10 ++++---- 15 files changed, 74 insertions(+), 36 deletions(-) diff --git a/weed/command/backup.go b/weed/command/backup.go index 167f07225..64924c3c6 100644 --- a/weed/command/backup.go +++ b/weed/command/backup.go @@ -112,14 +112,14 @@ func runBackup(cmd *Command, args []string) bool { return true } } - v, err := storage.NewVolume(*s.dir, *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0) + v, err := storage.NewVolume(*s.dir, *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, false) if err != nil { fmt.Printf("Error creating or reading from volume %d: %v\n", vid, err) return true } if v.SuperBlock.CompactionRevision < uint16(stats.CompactRevision) { - if err = v.Compact(0, 0); err != nil { + if err = v.Compact(0, 0, false); err != nil { fmt.Printf("Compact Volume before synchronizing %v\n", err) return true } @@ -137,7 +137,7 @@ func runBackup(cmd *Command, args []string) bool { // remove the old data v.Destroy() // recreate an empty volume - v, err = storage.NewVolume(*s.dir, *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0) + v, err = storage.NewVolume(*s.dir, *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, false) if err != nil { fmt.Printf("Error creating or reading from volume %d: %v\n", vid, err) return true diff --git a/weed/command/compact.go b/weed/command/compact.go index df4bcdd6e..7a61f0b95 100644 --- a/weed/command/compact.go +++ b/weed/command/compact.go @@ -26,6 +26,7 @@ var ( compactVolumeId = cmdCompact.Flag.Int("volumeId", -1, "a volume id. The volume should already exist in the dir.") compactMethod = cmdCompact.Flag.Int("method", 0, "option to choose which compact method. use 0 or 1.") compactVolumePreallocate = cmdCompact.Flag.Int64("preallocateMB", 0, "preallocate volume disk space") + compactVolumeInMemory = cmdCompact.Flag.Bool("volumeInMemory", false, "create the volume in memory") ) func runCompact(cmd *Command, args []string) bool { @@ -35,15 +36,16 @@ func runCompact(cmd *Command, args []string) bool { } preallocate := *compactVolumePreallocate * (1 << 20) + inMemory := *compactVolumeInMemory vid := needle.VolumeId(*compactVolumeId) v, err := storage.NewVolume(*compactVolumePath, *compactVolumeCollection, vid, - storage.NeedleMapInMemory, nil, nil, preallocate) + storage.NeedleMapInMemory, nil, nil, preallocate, inMemory) if err != nil { glog.Fatalf("Load Volume [ERROR] %s\n", err) } if *compactMethod == 0 { - if err = v.Compact(preallocate, 0); err != nil { + if err = v.Compact(preallocate, 0, inMemory); err != nil { glog.Fatalf("Compact Volume [ERROR] %s\n", err) } } else { diff --git a/weed/pb/master.proto b/weed/pb/master.proto index 9cf46ab92..2bc05e2f0 100644 --- a/weed/pb/master.proto +++ b/weed/pb/master.proto @@ -139,6 +139,7 @@ message AssignRequest { string data_center = 5; string rack = 6; string data_node = 7; + bool in_memory = 8; } message AssignResponse { string fid = 1; diff --git a/weed/pb/master_pb/master.pb.go b/weed/pb/master_pb/master.pb.go index f2d9420f0..ed7ef8082 100644 --- a/weed/pb/master_pb/master.pb.go +++ b/weed/pb/master_pb/master.pb.go @@ -44,12 +44,15 @@ It has these top-level messages: */ package master_pb -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - import ( + fmt "fmt" + + proto "github.com/golang/protobuf/proto" + + math "math" + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" ) @@ -655,6 +658,7 @@ type AssignRequest struct { DataCenter string `protobuf:"bytes,5,opt,name=data_center,json=dataCenter" json:"data_center,omitempty"` Rack string `protobuf:"bytes,6,opt,name=rack" json:"rack,omitempty"` DataNode string `protobuf:"bytes,7,opt,name=data_node,json=dataNode" json:"data_node,omitempty"` + InMemory bool `protobuf:"bytes,4,opt,name=inmemory" json:"inmemory,omitempty"` } func (m *AssignRequest) Reset() { *m = AssignRequest{} } @@ -711,6 +715,13 @@ func (m *AssignRequest) GetDataNode() string { return "" } +func (m *AssignRequest) GetInMemory() bool { + if m != nil { + return m.InMemory + } + return false +} + type AssignResponse struct { Fid string `protobuf:"bytes,1,opt,name=fid" json:"fid,omitempty"` Url string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"` diff --git a/weed/pb/volume_server.proto b/weed/pb/volume_server.proto index 4004875ed..f2d1f61bd 100644 --- a/weed/pb/volume_server.proto +++ b/weed/pb/volume_server.proto @@ -99,6 +99,7 @@ message VacuumVolumeCheckResponse { message VacuumVolumeCompactRequest { uint32 volume_id = 1; int64 preallocate = 2; + bool inmemory = 3; } message VacuumVolumeCompactResponse { } @@ -127,6 +128,7 @@ message AllocateVolumeRequest { int64 preallocate = 3; string replication = 4; string ttl = 5; + bool inmemory = 6; } message AllocateVolumeResponse { } diff --git a/weed/pb/volume_server_pb/volume_server.pb.go b/weed/pb/volume_server_pb/volume_server.pb.go index 13d14b1e5..02aa78989 100644 --- a/weed/pb/volume_server_pb/volume_server.pb.go +++ b/weed/pb/volume_server_pb/volume_server.pb.go @@ -68,12 +68,15 @@ It has these top-level messages: */ package volume_server_pb -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - import ( + fmt "fmt" + + proto "github.com/golang/protobuf/proto" + + math "math" + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" ) @@ -211,6 +214,7 @@ func (m *VacuumVolumeCheckResponse) GetGarbageRatio() float64 { type VacuumVolumeCompactRequest struct { VolumeId uint32 `protobuf:"varint,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` Preallocate int64 `protobuf:"varint,2,opt,name=preallocate" json:"preallocate,omitempty"` + InMemory bool `protobuf:"varint,2,opt,name=inmemory" json:"inmemory,omitempty"` } func (m *VacuumVolumeCompactRequest) Reset() { *m = VacuumVolumeCompactRequest{} } @@ -232,6 +236,13 @@ func (m *VacuumVolumeCompactRequest) GetPreallocate() int64 { return 0 } +func (m *VacuumVolumeCompactRequest) GetInMemory() bool { + if m != nil { + return m.InMemory + } + return false +} + type VacuumVolumeCompactResponse struct { } @@ -318,6 +329,7 @@ type AllocateVolumeRequest struct { Preallocate int64 `protobuf:"varint,3,opt,name=preallocate" json:"preallocate,omitempty"` Replication string `protobuf:"bytes,4,opt,name=replication" json:"replication,omitempty"` Ttl string `protobuf:"bytes,5,opt,name=ttl" json:"ttl,omitempty"` + InMemory bool `protobuf:"varint,6,opt,name=inmemory" json:"inmemory,omitempty"` } func (m *AllocateVolumeRequest) Reset() { *m = AllocateVolumeRequest{} } @@ -360,6 +372,13 @@ func (m *AllocateVolumeRequest) GetTtl() string { return "" } +func (m *AllocateVolumeRequest) GetInMemory() bool { + if m != nil { + return m.InMemory + } + return false +} + type AllocateVolumeResponse struct { } diff --git a/weed/server/volume_grpc_admin.go b/weed/server/volume_grpc_admin.go index 67196211f..93d8c4709 100644 --- a/weed/server/volume_grpc_admin.go +++ b/weed/server/volume_grpc_admin.go @@ -35,6 +35,7 @@ func (vs *VolumeServer) AllocateVolume(ctx context.Context, req *volume_server_p req.Replication, req.Ttl, req.Preallocate, + req.GetInMemory(), ) if err != nil { diff --git a/weed/server/volume_grpc_vacuum.go b/weed/server/volume_grpc_vacuum.go index 205843496..020b9347c 100644 --- a/weed/server/volume_grpc_vacuum.go +++ b/weed/server/volume_grpc_vacuum.go @@ -28,7 +28,7 @@ func (vs *VolumeServer) VacuumVolumeCompact(ctx context.Context, req *volume_ser resp := &volume_server_pb.VacuumVolumeCompactResponse{} - err := vs.store.CompactVolume(needle.VolumeId(req.VolumeId), req.Preallocate, vs.compactionBytePerSecond) + err := vs.store.CompactVolume(needle.VolumeId(req.VolumeId), req.Preallocate, vs.compactionBytePerSecond, req.InMemory) if err != nil { glog.Errorf("compact volume %d: %v", req.VolumeId, err) diff --git a/weed/storage/disk_location.go b/weed/storage/disk_location.go index 5148dfa2d..a1104ed8e 100644 --- a/weed/storage/disk_location.go +++ b/weed/storage/disk_location.go @@ -60,7 +60,7 @@ func (l *DiskLocation) loadExistingVolume(fileInfo os.FileInfo, needleMapKind Ne _, found := l.volumes[vid] l.RUnlock() if !found { - if v, e := NewVolume(l.Directory, collection, vid, needleMapKind, nil, nil, 0); e == nil { + if v, e := NewVolume(l.Directory, collection, vid, needleMapKind, nil, nil, 0, false); e == nil { l.Lock() l.volumes[vid] = v l.Unlock() diff --git a/weed/storage/store.go b/weed/storage/store.go index d11c74d50..e9f1065e7 100644 --- a/weed/storage/store.go +++ b/weed/storage/store.go @@ -59,7 +59,7 @@ func NewStore(grpcDialOption grpc.DialOption, port int, ip, publicUrl string, di return } -func (s *Store) AddVolume(volumeId needle.VolumeId, collection string, needleMapKind NeedleMapType, replicaPlacement string, ttlString string, preallocate int64) error { +func (s *Store) AddVolume(volumeId needle.VolumeId, collection string, needleMapKind NeedleMapType, replicaPlacement string, ttlString string, preallocate int64, in_memory bool) error { rt, e := NewReplicaPlacementFromString(replicaPlacement) if e != nil { return e @@ -68,7 +68,7 @@ func (s *Store) AddVolume(volumeId needle.VolumeId, collection string, needleMap if e != nil { return e } - e = s.addVolume(volumeId, collection, needleMapKind, rt, ttl, preallocate) + e = s.addVolume(volumeId, collection, needleMapKind, rt, ttl, preallocate, in_memory) return e } func (s *Store) DeleteCollection(collection string) (e error) { @@ -101,14 +101,14 @@ func (s *Store) FindFreeLocation() (ret *DiskLocation) { } return ret } -func (s *Store) addVolume(vid needle.VolumeId, collection string, needleMapKind NeedleMapType, replicaPlacement *ReplicaPlacement, ttl *needle.TTL, preallocate int64) error { +func (s *Store) addVolume(vid needle.VolumeId, collection string, needleMapKind NeedleMapType, replicaPlacement *ReplicaPlacement, ttl *needle.TTL, preallocate int64, in_memory bool) error { if s.findVolume(vid) != nil { return fmt.Errorf("Volume Id %d already exists!", vid) } if location := s.FindFreeLocation(); location != nil { glog.V(0).Infof("In dir %s adds volume:%v collection:%s replicaPlacement:%v ttl:%v", location.Directory, vid, collection, replicaPlacement, ttl) - if volume, err := NewVolume(location.Directory, collection, vid, needleMapKind, replicaPlacement, ttl, preallocate); err == nil { + if volume, err := NewVolume(location.Directory, collection, vid, needleMapKind, replicaPlacement, ttl, preallocate, in_memory); err == nil { location.SetVolume(vid, volume) glog.V(0).Infof("add volume %d", vid) s.NewVolumesChan <- master_pb.VolumeShortInformationMessage{ diff --git a/weed/storage/store_vacuum.go b/weed/storage/store_vacuum.go index 6acf5b10e..3e244c832 100644 --- a/weed/storage/store_vacuum.go +++ b/weed/storage/store_vacuum.go @@ -14,9 +14,9 @@ func (s *Store) CheckCompactVolume(volumeId needle.VolumeId) (float64, error) { } return 0, fmt.Errorf("volume id %d is not found during check compact", volumeId) } -func (s *Store) CompactVolume(vid needle.VolumeId, preallocate int64, compactionBytePerSecond int64) error { +func (s *Store) CompactVolume(vid needle.VolumeId, preallocate int64, compactionBytePerSecond int64, in_memory bool) error { if v := s.findVolume(vid); v != nil { - return v.Compact(preallocate, compactionBytePerSecond) + return v.Compact(preallocate, compactionBytePerSecond, in_memory) } return fmt.Errorf("volume id %d is not found during compact", vid) } diff --git a/weed/storage/volume.go b/weed/storage/volume.go index 4a89667f0..59cb6d504 100644 --- a/weed/storage/volume.go +++ b/weed/storage/volume.go @@ -38,12 +38,12 @@ type Volume struct { isCompacting bool } -func NewVolume(dirname string, collection string, id needle.VolumeId, needleMapKind NeedleMapType, replicaPlacement *ReplicaPlacement, ttl *needle.TTL, preallocate int64) (v *Volume, e error) { +func NewVolume(dirname string, collection string, id needle.VolumeId, needleMapKind NeedleMapType, replicaPlacement *ReplicaPlacement, ttl *needle.TTL, preallocate int64, in_memory bool) (v *Volume, e error) { // if replicaPlacement is nil, the superblock will be loaded from disk v = &Volume{dir: dirname, Collection: collection, Id: id} v.SuperBlock = SuperBlock{ReplicaPlacement: replicaPlacement, Ttl: ttl} v.needleMapKind = needleMapKind - e = v.load(true, true, needleMapKind, preallocate) + e = v.load(true, true, needleMapKind, preallocate, in_memory) return } func (v *Volume) String() string { diff --git a/weed/storage/volume_create_windows.go b/weed/storage/volume_create_windows.go index 658086079..6e8627feb 100644 --- a/weed/storage/volume_create_windows.go +++ b/weed/storage/volume_create_windows.go @@ -12,15 +12,17 @@ import ( "github.com/joeslay/seaweedfs/weed/os_overloads" ) -func createVolumeFile(fileName string, preallocate int64) (*os.File, error) { +func createVolumeFile(fileName string, preallocate int64, in_memory bool) (*os.File, error) { mem_map, exists := memory_map.FileMemoryMap[fileName] if !exists { - file, e := os_overloads.OpenFile(fileName, windows.O_RDWR|windows.O_CREAT, 0644, true) - memory_map.FileMemoryMap[fileName] = new(memory_map.MemoryMap) + file, e := os_overloads.OpenFile(fileName, windows.O_RDWR|windows.O_CREAT, 0644, in_memory) + if in_memory { + memory_map.FileMemoryMap[fileName] = new(memory_map.MemoryMap) - new_mem_map := memory_map.FileMemoryMap[fileName] - new_mem_map.CreateMemoryMap(file, 1024*1024*1024*2) + new_mem_map := memory_map.FileMemoryMap[fileName] + new_mem_map.CreateMemoryMap(file, 1024*1024*1024*2) + } if preallocate > 0 { glog.V(0).Infof("Preallocated disk space for %s is not supported", fileName) diff --git a/weed/storage/volume_loading.go b/weed/storage/volume_loading.go index 27878befd..d90439822 100644 --- a/weed/storage/volume_loading.go +++ b/weed/storage/volume_loading.go @@ -16,11 +16,11 @@ func loadVolumeWithoutIndex(dirname string, collection string, id needle.VolumeI v = &Volume{dir: dirname, Collection: collection, Id: id} v.SuperBlock = SuperBlock{} v.needleMapKind = needleMapKind - e = v.load(false, false, needleMapKind, 0) + e = v.load(false, false, needleMapKind, 0, false) return } -func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind NeedleMapType, preallocate int64) error { +func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind NeedleMapType, preallocate int64, in_memory bool) error { var e error fileName := v.FileName() alreadyHasSuperBlock := false @@ -42,7 +42,7 @@ func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind } } else { if createDatIfMissing { - v.dataFile, e = createVolumeFile(fileName+".dat", preallocate) + v.dataFile, e = createVolumeFile(fileName+".dat", preallocate, in_memory) } else { return fmt.Errorf("Volume Data file %s.dat does not exist.", fileName) } diff --git a/weed/storage/volume_vacuum.go b/weed/storage/volume_vacuum.go index fd43ae855..2b2b37633 100644 --- a/weed/storage/volume_vacuum.go +++ b/weed/storage/volume_vacuum.go @@ -22,7 +22,7 @@ func (v *Volume) garbageLevel() float64 { return float64(v.DeletedSize()) / float64(v.ContentSize()) } -func (v *Volume) Compact(preallocate int64, compactionBytePerSecond int64) error { +func (v *Volume) Compact(preallocate int64, compactionBytePerSecond int64, in_memory bool) error { _, exists := memory_map.FileMemoryMap[v.dataFile.Name()] if !exists { //it makes no sense to compact in memory @@ -40,7 +40,7 @@ func (v *Volume) Compact(preallocate int64, compactionBytePerSecond int64) error v.lastCompactIndexOffset = v.IndexFileSize() v.lastCompactRevision = v.SuperBlock.CompactionRevision glog.V(3).Infof("creating copies for volume %d ,last offset %d...", v.Id, v.lastCompactIndexOffset) - return v.copyDataAndGenerateIndexFile(filePath+".cpd", filePath+".cpx", preallocate, compactionBytePerSecond) + return v.copyDataAndGenerateIndexFile(filePath+".cpd", filePath+".cpx", preallocate, compactionBytePerSecond, in_memory) } else { return nil } @@ -114,7 +114,7 @@ func (v *Volume) CommitCompact() error { os.RemoveAll(v.FileName() + ".bdb") glog.V(3).Infof("Loading volume %d commit file...", v.Id) - if e = v.load(true, false, v.needleMapKind, 0); e != nil { + if e = v.load(true, false, v.needleMapKind, 0, false); e != nil { return e } } @@ -311,11 +311,11 @@ func (scanner *VolumeFileScanner4Vacuum) VisitNeedle(n *needle.Needle, offset in return nil } -func (v *Volume) copyDataAndGenerateIndexFile(dstName, idxName string, preallocate int64, compactionBytePerSecond int64) (err error) { +func (v *Volume) copyDataAndGenerateIndexFile(dstName, idxName string, preallocate int64, compactionBytePerSecond int64, in_memory bool) (err error) { var ( dst, idx *os.File ) - if dst, err = createVolumeFile(dstName, preallocate); err != nil { + if dst, err = createVolumeFile(dstName, preallocate, in_memory); err != nil { return } defer dst.Close() From 1f01eb78e81454c54569d8c7baaca115982a87c2 Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Tue, 3 Sep 2019 17:00:59 +0100 Subject: [PATCH 11/37] Rename mem_map to mMap, remove some in_memory variables being passed around, added MemoryMapped member to volume struct --- weed/command/backup.go | 2 +- weed/command/compact.go | 6 +-- weed/server/volume_grpc_vacuum.go | 2 +- weed/storage/memory_map/memory_map.go | 23 +++++++++ weed/storage/memory_map/memory_map_windows.go | 48 +++++++++---------- weed/storage/needle/needle_read_write.go | 18 +++---- weed/storage/store.go | 4 +- weed/storage/store_vacuum.go | 4 +- weed/storage/volume.go | 7 +-- weed/storage/volume_create.go | 2 +- weed/storage/volume_create_linux.go | 2 +- weed/storage/volume_create_windows.go | 15 +++--- weed/storage/volume_loading.go | 6 +-- weed/storage/volume_read_write.go | 4 +- weed/storage/volume_super_block.go | 10 ++-- weed/storage/volume_vacuum.go | 20 ++++---- weed/storage/volume_vacuum_test.go | 4 +- 17 files changed, 98 insertions(+), 79 deletions(-) create mode 100644 weed/storage/memory_map/memory_map.go diff --git a/weed/command/backup.go b/weed/command/backup.go index 64924c3c6..65d2a745b 100644 --- a/weed/command/backup.go +++ b/weed/command/backup.go @@ -119,7 +119,7 @@ func runBackup(cmd *Command, args []string) bool { } if v.SuperBlock.CompactionRevision < uint16(stats.CompactRevision) { - if err = v.Compact(0, 0, false); err != nil { + if err = v.Compact(0, 0); err != nil { fmt.Printf("Compact Volume before synchronizing %v\n", err) return true } diff --git a/weed/command/compact.go b/weed/command/compact.go index 7a61f0b95..f10b0b2bc 100644 --- a/weed/command/compact.go +++ b/weed/command/compact.go @@ -26,7 +26,6 @@ var ( compactVolumeId = cmdCompact.Flag.Int("volumeId", -1, "a volume id. The volume should already exist in the dir.") compactMethod = cmdCompact.Flag.Int("method", 0, "option to choose which compact method. use 0 or 1.") compactVolumePreallocate = cmdCompact.Flag.Int64("preallocateMB", 0, "preallocate volume disk space") - compactVolumeInMemory = cmdCompact.Flag.Bool("volumeInMemory", false, "create the volume in memory") ) func runCompact(cmd *Command, args []string) bool { @@ -36,16 +35,15 @@ func runCompact(cmd *Command, args []string) bool { } preallocate := *compactVolumePreallocate * (1 << 20) - inMemory := *compactVolumeInMemory vid := needle.VolumeId(*compactVolumeId) v, err := storage.NewVolume(*compactVolumePath, *compactVolumeCollection, vid, - storage.NeedleMapInMemory, nil, nil, preallocate, inMemory) + storage.NeedleMapInMemory, nil, nil, preallocate, false) if err != nil { glog.Fatalf("Load Volume [ERROR] %s\n", err) } if *compactMethod == 0 { - if err = v.Compact(preallocate, 0, inMemory); err != nil { + if err = v.Compact(preallocate, 0); err != nil { glog.Fatalf("Compact Volume [ERROR] %s\n", err) } } else { diff --git a/weed/server/volume_grpc_vacuum.go b/weed/server/volume_grpc_vacuum.go index 020b9347c..205843496 100644 --- a/weed/server/volume_grpc_vacuum.go +++ b/weed/server/volume_grpc_vacuum.go @@ -28,7 +28,7 @@ func (vs *VolumeServer) VacuumVolumeCompact(ctx context.Context, req *volume_ser resp := &volume_server_pb.VacuumVolumeCompactResponse{} - err := vs.store.CompactVolume(needle.VolumeId(req.VolumeId), req.Preallocate, vs.compactionBytePerSecond, req.InMemory) + err := vs.store.CompactVolume(needle.VolumeId(req.VolumeId), req.Preallocate, vs.compactionBytePerSecond) if err != nil { glog.Errorf("compact volume %d: %v", req.VolumeId, err) diff --git a/weed/storage/memory_map/memory_map.go b/weed/storage/memory_map/memory_map.go new file mode 100644 index 000000000..1c1f8dd69 --- /dev/null +++ b/weed/storage/memory_map/memory_map.go @@ -0,0 +1,23 @@ +// +build !windows + +package memory_map + +import "os" + +type MemoryBuffer struct { + aligned_length uint64 + length uint64 + aligned_ptr uintptr + ptr uintptr + Buffer []byte +} + +type MemoryMap struct { + File *os.File + file_memory_map_handle uintptr + write_map_views []MemoryBuffer + max_length uint64 + End_Of_File int64 +} + +var FileMemoryMap = make(map[string]MemoryMap) diff --git a/weed/storage/memory_map/memory_map_windows.go b/weed/storage/memory_map/memory_map_windows.go index ffc3a0854..fe6f152b7 100644 --- a/weed/storage/memory_map/memory_map_windows.go +++ b/weed/storage/memory_map/memory_map_windows.go @@ -40,31 +40,31 @@ var system_info, err = getSystemInfo() var chunk_size = uint64(system_info.dwAllocationGranularity) * 512 -func (mem_map *MemoryMap) CreateMemoryMap(file *os.File, maxlength uint64) { +func (mMap *MemoryMap) CreateMemoryMap(file *os.File, maxlength uint64) { maxlength_high := uint32(maxlength >> 32) maxlength_low := uint32(maxlength & 0xFFFFFFFF) file_memory_map_handle, err := windows.CreateFileMapping(windows.Handle(file.Fd()), nil, windows.PAGE_READWRITE, maxlength_high, maxlength_low, nil) if err == nil { - mem_map.File = file - mem_map.file_memory_map_handle = uintptr(file_memory_map_handle) - mem_map.write_map_views = make([]MemoryBuffer, 0, maxlength/chunk_size) - mem_map.max_length = maxlength - mem_map.End_Of_File = -1 + mMap.File = file + mMap.file_memory_map_handle = uintptr(file_memory_map_handle) + mMap.write_map_views = make([]MemoryBuffer, 0, maxlength/chunk_size) + mMap.max_length = maxlength + mMap.End_Of_File = -1 } } -func (mem_map *MemoryMap) DeleteFileAndMemoryMap() { - windows.CloseHandle(windows.Handle(mem_map.file_memory_map_handle)) - windows.CloseHandle(windows.Handle(mem_map.File.Fd())) +func (mMap *MemoryMap) DeleteFileAndMemoryMap() { + windows.CloseHandle(windows.Handle(mMap.file_memory_map_handle)) + windows.CloseHandle(windows.Handle(mMap.File.Fd())) - for _, view := range mem_map.write_map_views { + for _, view := range mMap.write_map_views { view.ReleaseMemory() } - mem_map.write_map_views = nil - mem_map.max_length = 0 + mMap.write_map_views = nil + mMap.max_length = 0 } func min(x, y uint64) uint64 { @@ -74,11 +74,11 @@ func min(x, y uint64) uint64 { return y } -func (mem_map *MemoryMap) WriteMemory(offset uint64, length uint64, data []byte) { +func (mMap *MemoryMap) WriteMemory(offset uint64, length uint64, data []byte) { for { - if ((offset+length)/chunk_size)+1 > uint64(len(mem_map.write_map_views)) { - allocateChunk(mem_map) + if ((offset+length)/chunk_size)+1 > uint64(len(mMap.write_map_views)) { + allocateChunk(mMap) } else { break } @@ -91,7 +91,7 @@ func (mem_map *MemoryMap) WriteMemory(offset uint64, length uint64, data []byte) for { write_end := min((remaining_length + slice_offset), chunk_size) - copy(mem_map.write_map_views[slice_index].Buffer[slice_offset:write_end], data[data_offset:]) + copy(mMap.write_map_views[slice_index].Buffer[slice_offset:write_end], data[data_offset:]) remaining_length -= (write_end - slice_offset) data_offset += (write_end - slice_offset) @@ -103,13 +103,13 @@ func (mem_map *MemoryMap) WriteMemory(offset uint64, length uint64, data []byte) } } - if mem_map.End_Of_File < int64(offset+length-1) { - mem_map.End_Of_File = int64(offset + length - 1) + if mMap.End_Of_File < int64(offset+length-1) { + mMap.End_Of_File = int64(offset + length - 1) } } -func (mem_map *MemoryMap) ReadMemory(offset uint64, length uint64) (MemoryBuffer, error) { - return allocate(windows.Handle(mem_map.file_memory_map_handle), offset, length, false) +func (mMap *MemoryMap) ReadMemory(offset uint64, length uint64) (MemoryBuffer, error) { + return allocate(windows.Handle(mMap.file_memory_map_handle), offset, length, false) } func (mem_buffer *MemoryBuffer) ReleaseMemory() { @@ -122,13 +122,13 @@ func (mem_buffer *MemoryBuffer) ReleaseMemory() { mem_buffer.Buffer = nil } -func allocateChunk(mem_map *MemoryMap) { +func allocateChunk(mMap *MemoryMap) { - start := uint64(len(mem_map.write_map_views)) * chunk_size - mem_buffer, err := allocate(windows.Handle(mem_map.file_memory_map_handle), start, chunk_size, true) + start := uint64(len(mMap.write_map_views)) * chunk_size + mem_buffer, err := allocate(windows.Handle(mMap.file_memory_map_handle), start, chunk_size, true) if err == nil { - mem_map.write_map_views = append(mem_map.write_map_views, mem_buffer) + mMap.write_map_views = append(mMap.write_map_views, mem_buffer) } } diff --git a/weed/storage/needle/needle_read_write.go b/weed/storage/needle/needle_read_write.go index 7edc35536..c29e17079 100644 --- a/weed/storage/needle/needle_read_write.go +++ b/weed/storage/needle/needle_read_write.go @@ -129,7 +129,7 @@ func (n *Needle) prepareWriteBuffer(version Version) ([]byte, uint32, int64, err func (n *Needle) Append(w *os.File, version Version) (offset uint64, size uint32, actualSize int64, err error) { - mem_map, exists := memory_map.FileMemoryMap[w.Name()] + mMap, exists := memory_map.FileMemoryMap[w.Name()] if !exists { if end, e := w.Seek(0, io.SeekEnd); e == nil { defer func(w *os.File, off int64) { @@ -145,14 +145,14 @@ func (n *Needle) Append(w *os.File, version Version) (offset uint64, size uint32 return } } else { - offset = uint64(mem_map.End_Of_File + 1) + offset = uint64(mMap.End_Of_File + 1) } bytesToWrite, size, actualSize, err := n.prepareWriteBuffer(version) if err == nil { if exists { - mem_map.WriteMemory(offset, uint64(len(bytesToWrite)), bytesToWrite) + mMap.WriteMemory(offset, uint64(len(bytesToWrite)), bytesToWrite) } else { _, err = w.Write(bytesToWrite) } @@ -166,11 +166,11 @@ func ReadNeedleBlob(r *os.File, offset int64, size uint32, version Version) (dat dataSize := GetActualSize(size, version) dataSlice = make([]byte, dataSize) - mem_map, exists := memory_map.FileMemoryMap[r.Name()] + mMap, exists := memory_map.FileMemoryMap[r.Name()] if exists { - mem_buffer, err := mem_map.ReadMemory(uint64(offset), uint64(dataSize)) - copy(dataSlice, mem_buffer.Buffer) - mem_buffer.ReleaseMemory() + mBuffer, err := mMap.ReadMemory(uint64(offset), uint64(dataSize)) + copy(dataSlice, mBuffer.Buffer) + mBuffer.ReleaseMemory() return dataSlice, err } else { _, err = r.ReadAt(dataSlice, offset) @@ -289,9 +289,9 @@ func ReadNeedleHeader(r *os.File, version Version, offset int64) (n *Needle, byt if version == Version1 || version == Version2 || version == Version3 { bytes = make([]byte, NeedleHeaderSize) - mem_map, exists := memory_map.FileMemoryMap[r.Name()] + mMap, exists := memory_map.FileMemoryMap[r.Name()] if exists { - mem_buffer, err := mem_map.ReadMemory(uint64(offset), NeedleHeaderSize) + mem_buffer, err := mMap.ReadMemory(uint64(offset), NeedleHeaderSize) copy(bytes, mem_buffer.Buffer) mem_buffer.ReleaseMemory() diff --git a/weed/storage/store.go b/weed/storage/store.go index e9f1065e7..5f55db31e 100644 --- a/weed/storage/store.go +++ b/weed/storage/store.go @@ -101,14 +101,14 @@ func (s *Store) FindFreeLocation() (ret *DiskLocation) { } return ret } -func (s *Store) addVolume(vid needle.VolumeId, collection string, needleMapKind NeedleMapType, replicaPlacement *ReplicaPlacement, ttl *needle.TTL, preallocate int64, in_memory bool) error { +func (s *Store) addVolume(vid needle.VolumeId, collection string, needleMapKind NeedleMapType, replicaPlacement *ReplicaPlacement, ttl *needle.TTL, preallocate int64, memoryMapped bool) error { if s.findVolume(vid) != nil { return fmt.Errorf("Volume Id %d already exists!", vid) } if location := s.FindFreeLocation(); location != nil { glog.V(0).Infof("In dir %s adds volume:%v collection:%s replicaPlacement:%v ttl:%v", location.Directory, vid, collection, replicaPlacement, ttl) - if volume, err := NewVolume(location.Directory, collection, vid, needleMapKind, replicaPlacement, ttl, preallocate, in_memory); err == nil { + if volume, err := NewVolume(location.Directory, collection, vid, needleMapKind, replicaPlacement, ttl, preallocate, memoryMapped); err == nil { location.SetVolume(vid, volume) glog.V(0).Infof("add volume %d", vid) s.NewVolumesChan <- master_pb.VolumeShortInformationMessage{ diff --git a/weed/storage/store_vacuum.go b/weed/storage/store_vacuum.go index 3e244c832..6acf5b10e 100644 --- a/weed/storage/store_vacuum.go +++ b/weed/storage/store_vacuum.go @@ -14,9 +14,9 @@ func (s *Store) CheckCompactVolume(volumeId needle.VolumeId) (float64, error) { } return 0, fmt.Errorf("volume id %d is not found during check compact", volumeId) } -func (s *Store) CompactVolume(vid needle.VolumeId, preallocate int64, compactionBytePerSecond int64, in_memory bool) error { +func (s *Store) CompactVolume(vid needle.VolumeId, preallocate int64, compactionBytePerSecond int64) error { if v := s.findVolume(vid); v != nil { - return v.Compact(preallocate, compactionBytePerSecond, in_memory) + return v.Compact(preallocate, compactionBytePerSecond) } return fmt.Errorf("volume id %d is not found during compact", vid) } diff --git a/weed/storage/volume.go b/weed/storage/volume.go index 59cb6d504..efe0328cd 100644 --- a/weed/storage/volume.go +++ b/weed/storage/volume.go @@ -25,6 +25,7 @@ type Volume struct { nm NeedleMapper needleMapKind NeedleMapType readOnly bool + MemoryMapped bool SuperBlock @@ -38,12 +39,12 @@ type Volume struct { isCompacting bool } -func NewVolume(dirname string, collection string, id needle.VolumeId, needleMapKind NeedleMapType, replicaPlacement *ReplicaPlacement, ttl *needle.TTL, preallocate int64, in_memory bool) (v *Volume, e error) { +func NewVolume(dirname string, collection string, id needle.VolumeId, needleMapKind NeedleMapType, replicaPlacement *ReplicaPlacement, ttl *needle.TTL, preallocate int64, memoryMapped bool) (v *Volume, e error) { // if replicaPlacement is nil, the superblock will be loaded from disk - v = &Volume{dir: dirname, Collection: collection, Id: id} + v = &Volume{dir: dirname, Collection: collection, Id: id, MemoryMapped: memoryMapped} v.SuperBlock = SuperBlock{ReplicaPlacement: replicaPlacement, Ttl: ttl} v.needleMapKind = needleMapKind - e = v.load(true, true, needleMapKind, preallocate, in_memory) + e = v.load(true, true, needleMapKind, preallocate) return } func (v *Volume) String() string { diff --git a/weed/storage/volume_create.go b/weed/storage/volume_create.go index 12b608841..a3d889de2 100644 --- a/weed/storage/volume_create.go +++ b/weed/storage/volume_create.go @@ -8,7 +8,7 @@ import ( "github.com/joeslay/seaweedfs/weed/glog" ) -func createVolumeFile(fileName string, preallocate int64) (file *os.File, e error) { +func createVolumeFile(fileName string, preallocate int64, useMemoryMap bool) (*os.File, error) { file, e = os.OpenFile(fileName, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644) if preallocate > 0 { glog.V(0).Infof("Preallocated disk space for %s is not supported", fileName) diff --git a/weed/storage/volume_create_linux.go b/weed/storage/volume_create_linux.go index df458166d..47c00fc66 100644 --- a/weed/storage/volume_create_linux.go +++ b/weed/storage/volume_create_linux.go @@ -9,7 +9,7 @@ import ( "github.com/joeslay/seaweedfs/weed/glog" ) -func createVolumeFile(fileName string, preallocate int64) (file *os.File, e error) { +func createVolumeFile(fileName string, preallocate int64, useMemoryMap bool) (file *os.File, e error) { file, e = os.OpenFile(fileName, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644) if preallocate != 0 { syscall.Fallocate(int(file.Fd()), 1, 0, preallocate) diff --git a/weed/storage/volume_create_windows.go b/weed/storage/volume_create_windows.go index 6e8627feb..3e7b5a879 100644 --- a/weed/storage/volume_create_windows.go +++ b/weed/storage/volume_create_windows.go @@ -12,16 +12,17 @@ import ( "github.com/joeslay/seaweedfs/weed/os_overloads" ) -func createVolumeFile(fileName string, preallocate int64, in_memory bool) (*os.File, error) { +func createVolumeFile(fileName string, preallocate int64, useMemoryMap bool) (*os.File, error) { - mem_map, exists := memory_map.FileMemoryMap[fileName] + useMemoryMap = true + mMap, exists := memory_map.FileMemoryMap[fileName] if !exists { - file, e := os_overloads.OpenFile(fileName, windows.O_RDWR|windows.O_CREAT, 0644, in_memory) - if in_memory { + file, e := os_overloads.OpenFile(fileName, windows.O_RDWR|windows.O_CREAT, 0644, useMemoryMap) + if useMemoryMap { memory_map.FileMemoryMap[fileName] = new(memory_map.MemoryMap) - new_mem_map := memory_map.FileMemoryMap[fileName] - new_mem_map.CreateMemoryMap(file, 1024*1024*1024*2) + new_mMap := memory_map.FileMemoryMap[fileName] + new_mMap.CreateMemoryMap(file, 1024*1024*1024*2) } if preallocate > 0 { @@ -29,6 +30,6 @@ func createVolumeFile(fileName string, preallocate int64, in_memory bool) (*os.F } return file, e } else { - return mem_map.File, nil + return mMap.File, nil } } diff --git a/weed/storage/volume_loading.go b/weed/storage/volume_loading.go index d90439822..bdf9984e5 100644 --- a/weed/storage/volume_loading.go +++ b/weed/storage/volume_loading.go @@ -16,11 +16,11 @@ func loadVolumeWithoutIndex(dirname string, collection string, id needle.VolumeI v = &Volume{dir: dirname, Collection: collection, Id: id} v.SuperBlock = SuperBlock{} v.needleMapKind = needleMapKind - e = v.load(false, false, needleMapKind, 0, false) + e = v.load(false, false, needleMapKind, 0) return } -func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind NeedleMapType, preallocate int64, in_memory bool) error { +func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind NeedleMapType, preallocate int64) error { var e error fileName := v.FileName() alreadyHasSuperBlock := false @@ -42,7 +42,7 @@ func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind } } else { if createDatIfMissing { - v.dataFile, e = createVolumeFile(fileName+".dat", preallocate, in_memory) + v.dataFile, e = createVolumeFile(fileName+".dat", preallocate, v.MemoryMapped) } else { return fmt.Errorf("Volume Data file %s.dat does not exist.", fileName) } diff --git a/weed/storage/volume_read_write.go b/weed/storage/volume_read_write.go index 2cb437730..78010482d 100644 --- a/weed/storage/volume_read_write.go +++ b/weed/storage/volume_read_write.go @@ -49,9 +49,9 @@ func (v *Volume) Destroy() (err error) { err = fmt.Errorf("volume %d is compacting", v.Id) return } - mem_map, exists := memory_map.FileMemoryMap[v.dataFile.Name()] + mMap, exists := memory_map.FileMemoryMap[v.dataFile.Name()] if exists { - mem_map.DeleteFileAndMemoryMap() + mMap.DeleteFileAndMemoryMap() delete(memory_map.FileMemoryMap, v.dataFile.Name()) } diff --git a/weed/storage/volume_super_block.go b/weed/storage/volume_super_block.go index 8829909c1..936648f44 100644 --- a/weed/storage/volume_super_block.go +++ b/weed/storage/volume_super_block.go @@ -73,11 +73,11 @@ func (s *SuperBlock) Bytes() []byte { func (v *Volume) maybeWriteSuperBlock() error { - mem_map, exists := memory_map.FileMemoryMap[v.dataFile.Name()] + mMap, exists := memory_map.FileMemoryMap[v.dataFile.Name()] if exists { - if mem_map.End_Of_File == -1 { + if mMap.End_Of_File == -1 { v.SuperBlock.version = needle.CurrentVersion - mem_map.WriteMemory(0, uint64(len(v.SuperBlock.Bytes())), v.SuperBlock.Bytes()) + mMap.WriteMemory(0, uint64(len(v.SuperBlock.Bytes())), v.SuperBlock.Bytes()) } return nil } else { @@ -111,9 +111,9 @@ func (v *Volume) readSuperBlock() (err error) { func ReadSuperBlock(dataFile *os.File) (superBlock SuperBlock, err error) { header := make([]byte, _SuperBlockSize) - mem_map, exists := memory_map.FileMemoryMap[dataFile.Name()] + mMap, exists := memory_map.FileMemoryMap[dataFile.Name()] if exists { - mem_buffer, e := mem_map.ReadMemory(0, _SuperBlockSize) + mem_buffer, e := mMap.ReadMemory(0, _SuperBlockSize) if err != nil { err = fmt.Errorf("cannot read volume %s super block: %v", dataFile.Name(), e) return diff --git a/weed/storage/volume_vacuum.go b/weed/storage/volume_vacuum.go index 2b2b37633..48b3958d5 100644 --- a/weed/storage/volume_vacuum.go +++ b/weed/storage/volume_vacuum.go @@ -8,7 +8,6 @@ import ( "github.com/joeslay/seaweedfs/weed/glog" "github.com/joeslay/seaweedfs/weed/stats" idx2 "github.com/joeslay/seaweedfs/weed/storage/idx" - "github.com/joeslay/seaweedfs/weed/storage/memory_map" "github.com/joeslay/seaweedfs/weed/storage/needle" "github.com/joeslay/seaweedfs/weed/storage/needle_map" . "github.com/joeslay/seaweedfs/weed/storage/types" @@ -22,10 +21,9 @@ func (v *Volume) garbageLevel() float64 { return float64(v.DeletedSize()) / float64(v.ContentSize()) } -func (v *Volume) Compact(preallocate int64, compactionBytePerSecond int64, in_memory bool) error { +func (v *Volume) Compact(preallocate int64, compactionBytePerSecond int64) error { - _, exists := memory_map.FileMemoryMap[v.dataFile.Name()] - if !exists { //it makes no sense to compact in memory + if !v.MemoryMapped { //it makes no sense to compact in memory glog.V(3).Infof("Compacting volume %d ...", v.Id) //no need to lock for copy on write //v.accessLock.Lock() @@ -40,16 +38,15 @@ func (v *Volume) Compact(preallocate int64, compactionBytePerSecond int64, in_me v.lastCompactIndexOffset = v.IndexFileSize() v.lastCompactRevision = v.SuperBlock.CompactionRevision glog.V(3).Infof("creating copies for volume %d ,last offset %d...", v.Id, v.lastCompactIndexOffset) - return v.copyDataAndGenerateIndexFile(filePath+".cpd", filePath+".cpx", preallocate, compactionBytePerSecond, in_memory) + return v.copyDataAndGenerateIndexFile(filePath+".cpd", filePath+".cpx", preallocate, compactionBytePerSecond) } else { return nil } } func (v *Volume) Compact2() error { - _, exists := memory_map.FileMemoryMap[v.dataFile.Name()] - if !exists { //it makes no sense to compact in memory + if !v.MemoryMapped { //it makes no sense to compact in memory glog.V(3).Infof("Compact2 volume %d ...", v.Id) v.isCompacting = true @@ -66,8 +63,7 @@ func (v *Volume) Compact2() error { } func (v *Volume) CommitCompact() error { - _, exists := memory_map.FileMemoryMap[v.dataFile.Name()] - if !exists { //it makes no sense to compact in memory + if !v.MemoryMapped { //it makes no sense to compact in memory glog.V(0).Infof("Committing volume %d vacuuming...", v.Id) v.isCompacting = true @@ -114,7 +110,7 @@ func (v *Volume) CommitCompact() error { os.RemoveAll(v.FileName() + ".bdb") glog.V(3).Infof("Loading volume %d commit file...", v.Id) - if e = v.load(true, false, v.needleMapKind, 0, false); e != nil { + if e = v.load(true, false, v.needleMapKind, 0); e != nil { return e } } @@ -311,11 +307,11 @@ func (scanner *VolumeFileScanner4Vacuum) VisitNeedle(n *needle.Needle, offset in return nil } -func (v *Volume) copyDataAndGenerateIndexFile(dstName, idxName string, preallocate int64, compactionBytePerSecond int64, in_memory bool) (err error) { +func (v *Volume) copyDataAndGenerateIndexFile(dstName, idxName string, preallocate int64, compactionBytePerSecond int64) (err error) { var ( dst, idx *os.File ) - if dst, err = createVolumeFile(dstName, preallocate, in_memory); err != nil { + if dst, err = createVolumeFile(dstName, preallocate, v.MemoryMapped); err != nil { return } defer dst.Close() diff --git a/weed/storage/volume_vacuum_test.go b/weed/storage/volume_vacuum_test.go index 7e2e43994..3657404ca 100644 --- a/weed/storage/volume_vacuum_test.go +++ b/weed/storage/volume_vacuum_test.go @@ -68,7 +68,7 @@ func TestCompaction(t *testing.T) { } defer os.RemoveAll(dir) // clean up - v, err := NewVolume(dir, "", 1, NeedleMapInMemory, &ReplicaPlacement{}, &needle.TTL{}, 0) + v, err := NewVolume(dir, "", 1, NeedleMapInMemory, &ReplicaPlacement{}, &needle.TTL{}, 0, false) if err != nil { t.Fatalf("volume creation: %v", err) } @@ -95,7 +95,7 @@ func TestCompaction(t *testing.T) { v.Close() - v, err = NewVolume(dir, "", 1, NeedleMapInMemory, nil, nil, 0) + v, err = NewVolume(dir, "", 1, NeedleMapInMemory, nil, nil, 0, false) if err != nil { t.Fatalf("volume reloading: %v", err) } From cbd0a98fa12c20f5ace09bda44d2d2700d8dc74e Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Tue, 3 Sep 2019 18:19:02 +0100 Subject: [PATCH 12/37] Add InMemory to Volume Grow structure --- weed/pb/volume_server_pb/volume_server.pb.go | 8 -------- weed/server/volume_grpc_admin.go | 2 +- weed/storage/store.go | 4 ++-- weed/topology/allocate_volume.go | 1 + weed/topology/volume_growth.go | 1 + 5 files changed, 5 insertions(+), 11 deletions(-) diff --git a/weed/pb/volume_server_pb/volume_server.pb.go b/weed/pb/volume_server_pb/volume_server.pb.go index 02aa78989..897ad7fbb 100644 --- a/weed/pb/volume_server_pb/volume_server.pb.go +++ b/weed/pb/volume_server_pb/volume_server.pb.go @@ -214,7 +214,6 @@ func (m *VacuumVolumeCheckResponse) GetGarbageRatio() float64 { type VacuumVolumeCompactRequest struct { VolumeId uint32 `protobuf:"varint,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` Preallocate int64 `protobuf:"varint,2,opt,name=preallocate" json:"preallocate,omitempty"` - InMemory bool `protobuf:"varint,2,opt,name=inmemory" json:"inmemory,omitempty"` } func (m *VacuumVolumeCompactRequest) Reset() { *m = VacuumVolumeCompactRequest{} } @@ -236,13 +235,6 @@ func (m *VacuumVolumeCompactRequest) GetPreallocate() int64 { return 0 } -func (m *VacuumVolumeCompactRequest) GetInMemory() bool { - if m != nil { - return m.InMemory - } - return false -} - type VacuumVolumeCompactResponse struct { } diff --git a/weed/server/volume_grpc_admin.go b/weed/server/volume_grpc_admin.go index 93d8c4709..f52f9fd2d 100644 --- a/weed/server/volume_grpc_admin.go +++ b/weed/server/volume_grpc_admin.go @@ -35,7 +35,7 @@ func (vs *VolumeServer) AllocateVolume(ctx context.Context, req *volume_server_p req.Replication, req.Ttl, req.Preallocate, - req.GetInMemory(), + req.InMemory, ) if err != nil { diff --git a/weed/storage/store.go b/weed/storage/store.go index 5f55db31e..89b92f229 100644 --- a/weed/storage/store.go +++ b/weed/storage/store.go @@ -59,7 +59,7 @@ func NewStore(grpcDialOption grpc.DialOption, port int, ip, publicUrl string, di return } -func (s *Store) AddVolume(volumeId needle.VolumeId, collection string, needleMapKind NeedleMapType, replicaPlacement string, ttlString string, preallocate int64, in_memory bool) error { +func (s *Store) AddVolume(volumeId needle.VolumeId, collection string, needleMapKind NeedleMapType, replicaPlacement string, ttlString string, preallocate int64, memoryMapped bool) error { rt, e := NewReplicaPlacementFromString(replicaPlacement) if e != nil { return e @@ -68,7 +68,7 @@ func (s *Store) AddVolume(volumeId needle.VolumeId, collection string, needleMap if e != nil { return e } - e = s.addVolume(volumeId, collection, needleMapKind, rt, ttl, preallocate, in_memory) + e = s.addVolume(volumeId, collection, needleMapKind, rt, ttl, preallocate, memoryMapped) return e } func (s *Store) DeleteCollection(collection string) (e error) { diff --git a/weed/topology/allocate_volume.go b/weed/topology/allocate_volume.go index 69d106964..91a67681a 100644 --- a/weed/topology/allocate_volume.go +++ b/weed/topology/allocate_volume.go @@ -23,6 +23,7 @@ func AllocateVolume(dn *DataNode, grpcDialOption grpc.DialOption, vid needle.Vol Replication: option.ReplicaPlacement.String(), Ttl: option.Ttl.String(), Preallocate: option.Prealloacte, + InMemory: option.InMemory, }) return deleteErr }) diff --git a/weed/topology/volume_growth.go b/weed/topology/volume_growth.go index adbdd6b27..b9b2b69f7 100644 --- a/weed/topology/volume_growth.go +++ b/weed/topology/volume_growth.go @@ -28,6 +28,7 @@ type VolumeGrowOption struct { DataCenter string Rack string DataNode string + InMemory bool } type VolumeGrowth struct { From de5a7e60a26eef58c733eaeaf21385a0c7da0c27 Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Tue, 3 Sep 2019 18:20:09 +0100 Subject: [PATCH 13/37] remove temp hack --- weed/storage/volume_create_windows.go | 1 - 1 file changed, 1 deletion(-) diff --git a/weed/storage/volume_create_windows.go b/weed/storage/volume_create_windows.go index 3e7b5a879..494b13728 100644 --- a/weed/storage/volume_create_windows.go +++ b/weed/storage/volume_create_windows.go @@ -14,7 +14,6 @@ import ( func createVolumeFile(fileName string, preallocate int64, useMemoryMap bool) (*os.File, error) { - useMemoryMap = true mMap, exists := memory_map.FileMemoryMap[fileName] if !exists { file, e := os_overloads.OpenFile(fileName, windows.O_RDWR|windows.O_CREAT, 0644, useMemoryMap) From 9aa0859697d903ecd2c53ebd73df164de14a835b Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Tue, 3 Sep 2019 18:20:45 +0100 Subject: [PATCH 14/37] Remove inmemory from vaccum stuff --- weed/pb/volume_server.proto | 1 - 1 file changed, 1 deletion(-) diff --git a/weed/pb/volume_server.proto b/weed/pb/volume_server.proto index f2d1f61bd..bee054cd5 100644 --- a/weed/pb/volume_server.proto +++ b/weed/pb/volume_server.proto @@ -99,7 +99,6 @@ message VacuumVolumeCheckResponse { message VacuumVolumeCompactRequest { uint32 volume_id = 1; int64 preallocate = 2; - bool inmemory = 3; } message VacuumVolumeCompactResponse { } From cc756ddd79608ff46839a1542c3f42d4ab8148d7 Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Wed, 4 Sep 2019 14:24:17 +0100 Subject: [PATCH 15/37] Rename End_of_file variable, implement platform indepenent memory_map.go --- weed/storage/memory_map/memory_map.go | 25 ++++++++++++++++--- weed/storage/memory_map/memory_map_windows.go | 8 +++--- weed/storage/needle/needle_read_write.go | 2 +- weed/storage/volume_super_block.go | 2 +- 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/weed/storage/memory_map/memory_map.go b/weed/storage/memory_map/memory_map.go index 1c1f8dd69..e8d3de6e0 100644 --- a/weed/storage/memory_map/memory_map.go +++ b/weed/storage/memory_map/memory_map.go @@ -2,7 +2,10 @@ package memory_map -import "os" +import ( + "fmt" + "os" +) type MemoryBuffer struct { aligned_length uint64 @@ -17,7 +20,23 @@ type MemoryMap struct { file_memory_map_handle uintptr write_map_views []MemoryBuffer max_length uint64 - End_Of_File int64 + End_of_file int64 } -var FileMemoryMap = make(map[string]MemoryMap) +var FileMemoryMap = make(map[string]*MemoryMap) + +func (mMap *MemoryMap) WriteMemory(offset uint64, length uint64, data []byte) { + +} + +func (mMap *MemoryMap) ReadMemory(offset uint64, length uint64) (MemoryBuffer, error) { + return MemoryBuffer{}, fmt.Errorf("Memory Map not implemented for this platform") +} + +func (mem_buffer *MemoryBuffer) ReleaseMemory() { + +} + +func (mMap *MemoryMap) DeleteFileAndMemoryMap() { + +} diff --git a/weed/storage/memory_map/memory_map_windows.go b/weed/storage/memory_map/memory_map_windows.go index fe6f152b7..055aeacc5 100644 --- a/weed/storage/memory_map/memory_map_windows.go +++ b/weed/storage/memory_map/memory_map_windows.go @@ -24,7 +24,7 @@ type MemoryMap struct { file_memory_map_handle uintptr write_map_views []MemoryBuffer max_length uint64 - End_Of_File int64 + End_of_file int64 } var FileMemoryMap = make(map[string]*MemoryMap) @@ -51,7 +51,7 @@ func (mMap *MemoryMap) CreateMemoryMap(file *os.File, maxlength uint64) { mMap.file_memory_map_handle = uintptr(file_memory_map_handle) mMap.write_map_views = make([]MemoryBuffer, 0, maxlength/chunk_size) mMap.max_length = maxlength - mMap.End_Of_File = -1 + mMap.End_of_file = -1 } } @@ -103,8 +103,8 @@ func (mMap *MemoryMap) WriteMemory(offset uint64, length uint64, data []byte) { } } - if mMap.End_Of_File < int64(offset+length-1) { - mMap.End_Of_File = int64(offset + length - 1) + if mMap.End_of_file < int64(offset+length-1) { + mMap.End_of_file = int64(offset + length - 1) } } diff --git a/weed/storage/needle/needle_read_write.go b/weed/storage/needle/needle_read_write.go index c29e17079..23a192543 100644 --- a/weed/storage/needle/needle_read_write.go +++ b/weed/storage/needle/needle_read_write.go @@ -145,7 +145,7 @@ func (n *Needle) Append(w *os.File, version Version) (offset uint64, size uint32 return } } else { - offset = uint64(mMap.End_Of_File + 1) + offset = uint64(mMap.End_of_file + 1) } bytesToWrite, size, actualSize, err := n.prepareWriteBuffer(version) diff --git a/weed/storage/volume_super_block.go b/weed/storage/volume_super_block.go index 936648f44..f93c43fbf 100644 --- a/weed/storage/volume_super_block.go +++ b/weed/storage/volume_super_block.go @@ -75,7 +75,7 @@ func (v *Volume) maybeWriteSuperBlock() error { mMap, exists := memory_map.FileMemoryMap[v.dataFile.Name()] if exists { - if mMap.End_Of_File == -1 { + if mMap.End_of_file == -1 { v.SuperBlock.version = needle.CurrentVersion mMap.WriteMemory(0, uint64(len(v.SuperBlock.Bytes())), v.SuperBlock.Bytes()) } From 4a878c0006ba97af83e8ad546839f42f1a224c7f Mon Sep 17 00:00:00 2001 From: Tom Maxwell Date: Wed, 4 Sep 2019 15:27:14 +0100 Subject: [PATCH 16/37] Changed the InMemory bool to a uint32 so that it can be used to alter how much space to reserve --- weed/command/backup.go | 4 +-- weed/command/compact.go | 2 +- weed/pb/master.proto | 2 +- weed/pb/master_pb/master.pb.go | 22 ++++++------- weed/pb/volume_server.proto | 2 +- weed/pb/volume_server_pb/volume_server.pb.go | 31 +++++++++++++------ weed/server/master_grpc_server_volume.go | 15 ++++----- weed/server/master_server_handlers_admin.go | 20 +++++++----- weed/server/volume_grpc_admin.go | 2 +- weed/storage/disk_location.go | 2 +- .../needle/volume_memory_map_max_size.go | 14 +++++++++ .../needle/volume_memory_map_max_size_test.go | 10 ++++++ weed/storage/store.go | 4 +-- weed/storage/volume.go | 4 +-- weed/storage/volume_create.go | 2 +- weed/storage/volume_create_linux.go | 2 +- weed/storage/volume_create_windows.go | 6 ++-- weed/storage/volume_vacuum.go | 6 ++-- weed/topology/allocate_volume.go | 12 +++---- weed/topology/volume_growth.go | 16 +++++----- 20 files changed, 111 insertions(+), 67 deletions(-) create mode 100644 weed/storage/needle/volume_memory_map_max_size.go create mode 100644 weed/storage/needle/volume_memory_map_max_size_test.go diff --git a/weed/command/backup.go b/weed/command/backup.go index 65d2a745b..9849f566e 100644 --- a/weed/command/backup.go +++ b/weed/command/backup.go @@ -112,7 +112,7 @@ func runBackup(cmd *Command, args []string) bool { return true } } - v, err := storage.NewVolume(*s.dir, *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, false) + v, err := storage.NewVolume(*s.dir, *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, 0) if err != nil { fmt.Printf("Error creating or reading from volume %d: %v\n", vid, err) return true @@ -137,7 +137,7 @@ func runBackup(cmd *Command, args []string) bool { // remove the old data v.Destroy() // recreate an empty volume - v, err = storage.NewVolume(*s.dir, *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, false) + v, err = storage.NewVolume(*s.dir, *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, 0) if err != nil { fmt.Printf("Error creating or reading from volume %d: %v\n", vid, err) return true diff --git a/weed/command/compact.go b/weed/command/compact.go index f10b0b2bc..03f1a14db 100644 --- a/weed/command/compact.go +++ b/weed/command/compact.go @@ -38,7 +38,7 @@ func runCompact(cmd *Command, args []string) bool { vid := needle.VolumeId(*compactVolumeId) v, err := storage.NewVolume(*compactVolumePath, *compactVolumeCollection, vid, - storage.NeedleMapInMemory, nil, nil, preallocate, false) + storage.NeedleMapInMemory, nil, nil, preallocate, 0) if err != nil { glog.Fatalf("Load Volume [ERROR] %s\n", err) } diff --git a/weed/pb/master.proto b/weed/pb/master.proto index 2bc05e2f0..f4230d029 100644 --- a/weed/pb/master.proto +++ b/weed/pb/master.proto @@ -139,7 +139,7 @@ message AssignRequest { string data_center = 5; string rack = 6; string data_node = 7; - bool in_memory = 8; + uint32 MemoryMapMaxSizeMB = 8; } message AssignResponse { string fid = 1; diff --git a/weed/pb/master_pb/master.pb.go b/weed/pb/master_pb/master.pb.go index ed7ef8082..a5d665289 100644 --- a/weed/pb/master_pb/master.pb.go +++ b/weed/pb/master_pb/master.pb.go @@ -651,14 +651,14 @@ func (m *Location) GetPublicUrl() string { } type AssignRequest struct { - Count uint64 `protobuf:"varint,1,opt,name=count" json:"count,omitempty"` - Replication string `protobuf:"bytes,2,opt,name=replication" json:"replication,omitempty"` - Collection string `protobuf:"bytes,3,opt,name=collection" json:"collection,omitempty"` - Ttl string `protobuf:"bytes,4,opt,name=ttl" json:"ttl,omitempty"` - DataCenter string `protobuf:"bytes,5,opt,name=data_center,json=dataCenter" json:"data_center,omitempty"` - Rack string `protobuf:"bytes,6,opt,name=rack" json:"rack,omitempty"` - DataNode string `protobuf:"bytes,7,opt,name=data_node,json=dataNode" json:"data_node,omitempty"` - InMemory bool `protobuf:"bytes,4,opt,name=inmemory" json:"inmemory,omitempty"` + Count uint64 `protobuf:"varint,1,opt,name=count" json:"count,omitempty"` + Replication string `protobuf:"bytes,2,opt,name=replication" json:"replication,omitempty"` + Collection string `protobuf:"bytes,3,opt,name=collection" json:"collection,omitempty"` + Ttl string `protobuf:"bytes,4,opt,name=ttl" json:"ttl,omitempty"` + DataCenter string `protobuf:"bytes,5,opt,name=data_center,json=dataCenter" json:"data_center,omitempty"` + Rack string `protobuf:"bytes,6,opt,name=rack" json:"rack,omitempty"` + DataNode string `protobuf:"bytes,7,opt,name=data_node,json=dataNode" json:"data_node,omitempty"` + MemoryMapMaxSizeMB uint32 `protobuf:"varint,8,opt,name=memorymapmaxsizemb" json:"memorymapmaxsizemb,omitempty"` } func (m *AssignRequest) Reset() { *m = AssignRequest{} } @@ -715,11 +715,11 @@ func (m *AssignRequest) GetDataNode() string { return "" } -func (m *AssignRequest) GetInMemory() bool { +func (m *AssignRequest) GetMemoryMapMaxSizeMB() uint32 { if m != nil { - return m.InMemory + return m.MemoryMapMaxSizeMB } - return false + return 0 } type AssignResponse struct { diff --git a/weed/pb/volume_server.proto b/weed/pb/volume_server.proto index bee054cd5..04114981d 100644 --- a/weed/pb/volume_server.proto +++ b/weed/pb/volume_server.proto @@ -127,7 +127,7 @@ message AllocateVolumeRequest { int64 preallocate = 3; string replication = 4; string ttl = 5; - bool inmemory = 6; + int32 memorymapmaxsizemb = 6; } message AllocateVolumeResponse { } diff --git a/weed/pb/volume_server_pb/volume_server.pb.go b/weed/pb/volume_server_pb/volume_server.pb.go index 897ad7fbb..addaf9a65 100644 --- a/weed/pb/volume_server_pb/volume_server.pb.go +++ b/weed/pb/volume_server_pb/volume_server.pb.go @@ -316,12 +316,12 @@ func (*DeleteCollectionResponse) ProtoMessage() {} func (*DeleteCollectionResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } type AllocateVolumeRequest struct { - VolumeId uint32 `protobuf:"varint,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` - Collection string `protobuf:"bytes,2,opt,name=collection" json:"collection,omitempty"` - Preallocate int64 `protobuf:"varint,3,opt,name=preallocate" json:"preallocate,omitempty"` - Replication string `protobuf:"bytes,4,opt,name=replication" json:"replication,omitempty"` - Ttl string `protobuf:"bytes,5,opt,name=ttl" json:"ttl,omitempty"` - InMemory bool `protobuf:"varint,6,opt,name=inmemory" json:"inmemory,omitempty"` + VolumeId uint32 `protobuf:"varint,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"` + Collection string `protobuf:"bytes,2,opt,name=collection" json:"collection,omitempty"` + Preallocate int64 `protobuf:"varint,3,opt,name=preallocate" json:"preallocate,omitempty"` + Replication string `protobuf:"bytes,4,opt,name=replication" json:"replication,omitempty"` + Ttl string `protobuf:"bytes,5,opt,name=ttl" json:"ttl,omitempty"` + MemoryMapMaxSizeMB uint32 `protobuf:"varint,6,opt,name=memorymapmaxsizemb" json:"memorymapmaxsizemb,omitempty"` } func (m *AllocateVolumeRequest) Reset() { *m = AllocateVolumeRequest{} } @@ -364,11 +364,11 @@ func (m *AllocateVolumeRequest) GetTtl() string { return "" } -func (m *AllocateVolumeRequest) GetInMemory() bool { +func (m *AllocateVolumeRequest) GetMemoryMapMaxSizeMB() uint32 { if m != nil { - return m.InMemory + return m.MemoryMapMaxSizeMB } - return false + return 0 } type AllocateVolumeResponse struct { @@ -1978,6 +1978,19 @@ func _VolumeServer_DeleteCollection_Handler(srv interface{}, ctx context.Context func _VolumeServer_AllocateVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AllocateVolumeRequest) + + if in.MemoryMapMaxSizeMB > 0 { + test := 6 + test += 5 + } + if in.MemoryMapMaxSizeMB == 77 { + test := 7 + test += 656 + } + if in.Ttl != "" { + test := 2345 + test += 567 + } if err := dec(in); err != nil { return nil, err } diff --git a/weed/server/master_grpc_server_volume.go b/weed/server/master_grpc_server_volume.go index 286ca355c..b94895798 100644 --- a/weed/server/master_grpc_server_volume.go +++ b/weed/server/master_grpc_server_volume.go @@ -62,13 +62,14 @@ func (ms *MasterServer) Assign(ctx context.Context, req *master_pb.AssignRequest } option := &topology.VolumeGrowOption{ - Collection: req.Collection, - ReplicaPlacement: replicaPlacement, - Ttl: ttl, - Prealloacte: ms.preallocateSize, - DataCenter: req.DataCenter, - Rack: req.Rack, - DataNode: req.DataNode, + Collection: req.Collection, + ReplicaPlacement: replicaPlacement, + Ttl: ttl, + Prealloacte: ms.preallocateSize, + DataCenter: req.DataCenter, + Rack: req.Rack, + DataNode: req.DataNode, + MemoryMapMaxSizeMB: req.MemoryMapMaxSizeMB, } if !ms.Topo.HasWritableVolume(option) { diff --git a/weed/server/master_server_handlers_admin.go b/weed/server/master_server_handlers_admin.go index 4bcff0822..553bfd181 100644 --- a/weed/server/master_server_handlers_admin.go +++ b/weed/server/master_server_handlers_admin.go @@ -148,6 +148,11 @@ func (ms *MasterServer) getVolumeGrowOption(r *http.Request) (*topology.VolumeGr if err != nil { return nil, err } + memoryMapMaxSizeMB, err := needle.ReadMemoryMapMaxSizeMB(r.FormValue("memorymapmaxsizemb")) + if err != nil { + return nil, err + } + preallocate := ms.preallocateSize if r.FormValue("preallocate") != "" { preallocate, err = strconv.ParseInt(r.FormValue("preallocate"), 10, 64) @@ -156,13 +161,14 @@ func (ms *MasterServer) getVolumeGrowOption(r *http.Request) (*topology.VolumeGr } } volumeGrowOption := &topology.VolumeGrowOption{ - Collection: r.FormValue("collection"), - ReplicaPlacement: replicaPlacement, - Ttl: ttl, - Prealloacte: preallocate, - DataCenter: r.FormValue("dataCenter"), - Rack: r.FormValue("rack"), - DataNode: r.FormValue("dataNode"), + Collection: r.FormValue("collection"), + ReplicaPlacement: replicaPlacement, + Ttl: ttl, + Prealloacte: preallocate, + DataCenter: r.FormValue("dataCenter"), + Rack: r.FormValue("rack"), + DataNode: r.FormValue("dataNode"), + MemoryMapMaxSizeMB: memoryMapMaxSizeMB, } return volumeGrowOption, nil } diff --git a/weed/server/volume_grpc_admin.go b/weed/server/volume_grpc_admin.go index f52f9fd2d..4118437b6 100644 --- a/weed/server/volume_grpc_admin.go +++ b/weed/server/volume_grpc_admin.go @@ -35,7 +35,7 @@ func (vs *VolumeServer) AllocateVolume(ctx context.Context, req *volume_server_p req.Replication, req.Ttl, req.Preallocate, - req.InMemory, + req.MemoryMapMaxSizeMB, ) if err != nil { diff --git a/weed/storage/disk_location.go b/weed/storage/disk_location.go index a1104ed8e..a8f3ec11e 100644 --- a/weed/storage/disk_location.go +++ b/weed/storage/disk_location.go @@ -60,7 +60,7 @@ func (l *DiskLocation) loadExistingVolume(fileInfo os.FileInfo, needleMapKind Ne _, found := l.volumes[vid] l.RUnlock() if !found { - if v, e := NewVolume(l.Directory, collection, vid, needleMapKind, nil, nil, 0, false); e == nil { + if v, e := NewVolume(l.Directory, collection, vid, needleMapKind, nil, nil, 0, 0); e == nil { l.Lock() l.volumes[vid] = v l.Unlock() diff --git a/weed/storage/needle/volume_memory_map_max_size.go b/weed/storage/needle/volume_memory_map_max_size.go new file mode 100644 index 000000000..ee6c6ede6 --- /dev/null +++ b/weed/storage/needle/volume_memory_map_max_size.go @@ -0,0 +1,14 @@ +package needle + +import "strconv" + +func ReadMemoryMapMaxSizeMB(MemoryMapMaxSizeMBString string) (uint32, error) { + if MemoryMapMaxSizeMBString == "" { + return 0, nil + } + var MemoryMapMaxSize64 uint64 + var err error + MemoryMapMaxSize64, err = strconv.ParseUint(MemoryMapMaxSizeMBString, 10, 32) + MemoryMapMaxSize := uint32(MemoryMapMaxSize64) + return MemoryMapMaxSize, err +} diff --git a/weed/storage/needle/volume_memory_map_max_size_test.go b/weed/storage/needle/volume_memory_map_max_size_test.go new file mode 100644 index 000000000..ee9923f2b --- /dev/null +++ b/weed/storage/needle/volume_memory_map_max_size_test.go @@ -0,0 +1,10 @@ +package needle + +import "testing" + +func TestMemoryMapMaxSizeReadWrite(t *testing.T) { + memoryMapSize, _ := ReadMemoryMapMaxSizeMB("5000") + if memoryMapSize != 5000 { + t.Errorf("empty memoryMapSize:%v", memoryMapSize) + } +} diff --git a/weed/storage/store.go b/weed/storage/store.go index 89b92f229..abb4d6264 100644 --- a/weed/storage/store.go +++ b/weed/storage/store.go @@ -59,7 +59,7 @@ func NewStore(grpcDialOption grpc.DialOption, port int, ip, publicUrl string, di return } -func (s *Store) AddVolume(volumeId needle.VolumeId, collection string, needleMapKind NeedleMapType, replicaPlacement string, ttlString string, preallocate int64, memoryMapped bool) error { +func (s *Store) AddVolume(volumeId needle.VolumeId, collection string, needleMapKind NeedleMapType, replicaPlacement string, ttlString string, preallocate int64, memoryMapped uint32) error { rt, e := NewReplicaPlacementFromString(replicaPlacement) if e != nil { return e @@ -101,7 +101,7 @@ func (s *Store) FindFreeLocation() (ret *DiskLocation) { } return ret } -func (s *Store) addVolume(vid needle.VolumeId, collection string, needleMapKind NeedleMapType, replicaPlacement *ReplicaPlacement, ttl *needle.TTL, preallocate int64, memoryMapped bool) error { +func (s *Store) addVolume(vid needle.VolumeId, collection string, needleMapKind NeedleMapType, replicaPlacement *ReplicaPlacement, ttl *needle.TTL, preallocate int64, memoryMapped uint32) error { if s.findVolume(vid) != nil { return fmt.Errorf("Volume Id %d already exists!", vid) } diff --git a/weed/storage/volume.go b/weed/storage/volume.go index efe0328cd..7d1a2802a 100644 --- a/weed/storage/volume.go +++ b/weed/storage/volume.go @@ -25,7 +25,7 @@ type Volume struct { nm NeedleMapper needleMapKind NeedleMapType readOnly bool - MemoryMapped bool + MemoryMapped uint32 SuperBlock @@ -39,7 +39,7 @@ type Volume struct { isCompacting bool } -func NewVolume(dirname string, collection string, id needle.VolumeId, needleMapKind NeedleMapType, replicaPlacement *ReplicaPlacement, ttl *needle.TTL, preallocate int64, memoryMapped bool) (v *Volume, e error) { +func NewVolume(dirname string, collection string, id needle.VolumeId, needleMapKind NeedleMapType, replicaPlacement *ReplicaPlacement, ttl *needle.TTL, preallocate int64, memoryMapped uint32) (v *Volume, e error) { // if replicaPlacement is nil, the superblock will be loaded from disk v = &Volume{dir: dirname, Collection: collection, Id: id, MemoryMapped: memoryMapped} v.SuperBlock = SuperBlock{ReplicaPlacement: replicaPlacement, Ttl: ttl} diff --git a/weed/storage/volume_create.go b/weed/storage/volume_create.go index a3d889de2..d1935f0cd 100644 --- a/weed/storage/volume_create.go +++ b/weed/storage/volume_create.go @@ -8,7 +8,7 @@ import ( "github.com/joeslay/seaweedfs/weed/glog" ) -func createVolumeFile(fileName string, preallocate int64, useMemoryMap bool) (*os.File, error) { +func createVolumeFile(fileName string, preallocate int64, useMemoryMap uint32) (*os.File, error) { file, e = os.OpenFile(fileName, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644) if preallocate > 0 { glog.V(0).Infof("Preallocated disk space for %s is not supported", fileName) diff --git a/weed/storage/volume_create_linux.go b/weed/storage/volume_create_linux.go index 47c00fc66..f21267f01 100644 --- a/weed/storage/volume_create_linux.go +++ b/weed/storage/volume_create_linux.go @@ -9,7 +9,7 @@ import ( "github.com/joeslay/seaweedfs/weed/glog" ) -func createVolumeFile(fileName string, preallocate int64, useMemoryMap bool) (file *os.File, e error) { +func createVolumeFile(fileName string, preallocate int64, useMemoryMap uint32) (file *os.File, e error) { file, e = os.OpenFile(fileName, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644) if preallocate != 0 { syscall.Fallocate(int(file.Fd()), 1, 0, preallocate) diff --git a/weed/storage/volume_create_windows.go b/weed/storage/volume_create_windows.go index 494b13728..92f4523ba 100644 --- a/weed/storage/volume_create_windows.go +++ b/weed/storage/volume_create_windows.go @@ -12,12 +12,12 @@ import ( "github.com/joeslay/seaweedfs/weed/os_overloads" ) -func createVolumeFile(fileName string, preallocate int64, useMemoryMap bool) (*os.File, error) { +func createVolumeFile(fileName string, preallocate int64, useMemoryMap uint32) (*os.File, error) { mMap, exists := memory_map.FileMemoryMap[fileName] if !exists { - file, e := os_overloads.OpenFile(fileName, windows.O_RDWR|windows.O_CREAT, 0644, useMemoryMap) - if useMemoryMap { + file, e := os_overloads.OpenFile(fileName, windows.O_RDWR|windows.O_CREAT, 0644, useMemoryMap > 0) + if useMemoryMap > 0 { memory_map.FileMemoryMap[fileName] = new(memory_map.MemoryMap) new_mMap := memory_map.FileMemoryMap[fileName] diff --git a/weed/storage/volume_vacuum.go b/weed/storage/volume_vacuum.go index 48b3958d5..301c8bb0e 100644 --- a/weed/storage/volume_vacuum.go +++ b/weed/storage/volume_vacuum.go @@ -23,7 +23,7 @@ func (v *Volume) garbageLevel() float64 { func (v *Volume) Compact(preallocate int64, compactionBytePerSecond int64) error { - if !v.MemoryMapped { //it makes no sense to compact in memory + if v.MemoryMapped > 0 { //it makes no sense to compact in memory glog.V(3).Infof("Compacting volume %d ...", v.Id) //no need to lock for copy on write //v.accessLock.Lock() @@ -46,7 +46,7 @@ func (v *Volume) Compact(preallocate int64, compactionBytePerSecond int64) error func (v *Volume) Compact2() error { - if !v.MemoryMapped { //it makes no sense to compact in memory + if v.MemoryMapped > 0 { //it makes no sense to compact in memory glog.V(3).Infof("Compact2 volume %d ...", v.Id) v.isCompacting = true @@ -63,7 +63,7 @@ func (v *Volume) Compact2() error { } func (v *Volume) CommitCompact() error { - if !v.MemoryMapped { //it makes no sense to compact in memory + if v.MemoryMapped>0 { //it makes no sense to compact in memory glog.V(0).Infof("Committing volume %d vacuuming...", v.Id) v.isCompacting = true diff --git a/weed/topology/allocate_volume.go b/weed/topology/allocate_volume.go index 91a67681a..9dfd46825 100644 --- a/weed/topology/allocate_volume.go +++ b/weed/topology/allocate_volume.go @@ -18,12 +18,12 @@ func AllocateVolume(dn *DataNode, grpcDialOption grpc.DialOption, vid needle.Vol return operation.WithVolumeServerClient(dn.Url(), grpcDialOption, func(client volume_server_pb.VolumeServerClient) error { _, deleteErr := client.AllocateVolume(context.Background(), &volume_server_pb.AllocateVolumeRequest{ - VolumeId: uint32(vid), - Collection: option.Collection, - Replication: option.ReplicaPlacement.String(), - Ttl: option.Ttl.String(), - Preallocate: option.Prealloacte, - InMemory: option.InMemory, + VolumeId: uint32(vid), + Collection: option.Collection, + Replication: option.ReplicaPlacement.String(), + Ttl: option.Ttl.String(), + Preallocate: option.Prealloacte, + MemoryMapMaxSizeMB: option.MemoryMapMaxSizeMB, }) return deleteErr }) diff --git a/weed/topology/volume_growth.go b/weed/topology/volume_growth.go index b9b2b69f7..e4446ade0 100644 --- a/weed/topology/volume_growth.go +++ b/weed/topology/volume_growth.go @@ -21,14 +21,14 @@ This package is created to resolve these replica placement issues: */ type VolumeGrowOption struct { - Collection string - ReplicaPlacement *storage.ReplicaPlacement - Ttl *needle.TTL - Prealloacte int64 - DataCenter string - Rack string - DataNode string - InMemory bool + Collection string + ReplicaPlacement *storage.ReplicaPlacement + Ttl *needle.TTL + Prealloacte int64 + DataCenter string + Rack string + DataNode string + MemoryMapMaxSizeMB uint32 } type VolumeGrowth struct { From 84f2dc3b53e7c8d6f3732bcb18303ff85a0c30ee Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Thu, 5 Sep 2019 11:14:02 +0100 Subject: [PATCH 17/37] Remove test code --- weed/pb/volume_server_pb/volume_server.pb.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/weed/pb/volume_server_pb/volume_server.pb.go b/weed/pb/volume_server_pb/volume_server.pb.go index addaf9a65..deab62bb1 100644 --- a/weed/pb/volume_server_pb/volume_server.pb.go +++ b/weed/pb/volume_server_pb/volume_server.pb.go @@ -1979,18 +1979,6 @@ func _VolumeServer_DeleteCollection_Handler(srv interface{}, ctx context.Context func _VolumeServer_AllocateVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AllocateVolumeRequest) - if in.MemoryMapMaxSizeMB > 0 { - test := 6 - test += 5 - } - if in.MemoryMapMaxSizeMB == 77 { - test := 7 - test += 656 - } - if in.Ttl != "" { - test := 2345 - test += 567 - } if err := dec(in); err != nil { return nil, err } From 4257582db5e70ea628ef7f7d45cf2b5bcc6a3eda Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Thu, 5 Sep 2019 11:15:01 +0100 Subject: [PATCH 18/37] Allocate in 16MB chunks, make creation of memory maps always aligned to 16MB chunks --- weed/storage/memory_map/memory_map_windows.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/weed/storage/memory_map/memory_map_windows.go b/weed/storage/memory_map/memory_map_windows.go index 055aeacc5..c5deef84a 100644 --- a/weed/storage/memory_map/memory_map_windows.go +++ b/weed/storage/memory_map/memory_map_windows.go @@ -38,19 +38,26 @@ var ( var system_info, err = getSystemInfo() -var chunk_size = uint64(system_info.dwAllocationGranularity) * 512 +var chunk_size = uint64(system_info.dwAllocationGranularity) * 256 func (mMap *MemoryMap) CreateMemoryMap(file *os.File, maxlength uint64) { - maxlength_high := uint32(maxlength >> 32) - maxlength_low := uint32(maxlength & 0xFFFFFFFF) + chunks := (maxlength / chunk_size) + if chunks*chunk_size < maxlength { + chunks = chunks + 1 + } + + alignedMaxLength := chunks * chunk_size + + maxlength_high := uint32(alignedMaxLength >> 32) + maxlength_low := uint32(alignedMaxLength & 0xFFFFFFFF) file_memory_map_handle, err := windows.CreateFileMapping(windows.Handle(file.Fd()), nil, windows.PAGE_READWRITE, maxlength_high, maxlength_low, nil) if err == nil { mMap.File = file mMap.file_memory_map_handle = uintptr(file_memory_map_handle) - mMap.write_map_views = make([]MemoryBuffer, 0, maxlength/chunk_size) - mMap.max_length = maxlength + mMap.write_map_views = make([]MemoryBuffer, 0, alignedMaxLength/chunk_size) + mMap.max_length = alignedMaxLength mMap.End_of_file = -1 } } From f6146d6ad2dc70ca463cb2879b9d862141d0d5ea Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Thu, 5 Sep 2019 11:43:18 +0100 Subject: [PATCH 19/37] use 0 instead of false for max memory flag --- weed/storage/volume_vacuum_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weed/storage/volume_vacuum_test.go b/weed/storage/volume_vacuum_test.go index 3657404ca..2ec9dbfa2 100644 --- a/weed/storage/volume_vacuum_test.go +++ b/weed/storage/volume_vacuum_test.go @@ -68,7 +68,7 @@ func TestCompaction(t *testing.T) { } defer os.RemoveAll(dir) // clean up - v, err := NewVolume(dir, "", 1, NeedleMapInMemory, &ReplicaPlacement{}, &needle.TTL{}, 0, false) + v, err := NewVolume(dir, "", 1, NeedleMapInMemory, &ReplicaPlacement{}, &needle.TTL{}, 0, 0) if err != nil { t.Fatalf("volume creation: %v", err) } @@ -95,7 +95,7 @@ func TestCompaction(t *testing.T) { v.Close() - v, err = NewVolume(dir, "", 1, NeedleMapInMemory, nil, nil, 0, false) + v, err = NewVolume(dir, "", 1, NeedleMapInMemory, nil, nil, 0, 0) if err != nil { t.Fatalf("volume reloading: %v", err) } From 5a6dfb05fc0d248f896aa7f341f55a257a5b58f8 Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Thu, 5 Sep 2019 11:46:12 +0100 Subject: [PATCH 20/37] Only use truncate flag when creating non memory map files, rename and use memory map size for reserving max file size --- weed/storage/volume_create_windows.go | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/weed/storage/volume_create_windows.go b/weed/storage/volume_create_windows.go index 92f4523ba..1b29b43c8 100644 --- a/weed/storage/volume_create_windows.go +++ b/weed/storage/volume_create_windows.go @@ -12,22 +12,26 @@ import ( "github.com/joeslay/seaweedfs/weed/os_overloads" ) -func createVolumeFile(fileName string, preallocate int64, useMemoryMap uint32) (*os.File, error) { +func createVolumeFile(fileName string, preallocate int64, memoryMapSizeMB uint32) (*os.File, error) { mMap, exists := memory_map.FileMemoryMap[fileName] if !exists { - file, e := os_overloads.OpenFile(fileName, windows.O_RDWR|windows.O_CREAT, 0644, useMemoryMap > 0) - if useMemoryMap > 0 { - memory_map.FileMemoryMap[fileName] = new(memory_map.MemoryMap) - - new_mMap := memory_map.FileMemoryMap[fileName] - new_mMap.CreateMemoryMap(file, 1024*1024*1024*2) - } if preallocate > 0 { glog.V(0).Infof("Preallocated disk space for %s is not supported", fileName) } - return file, e + + if memoryMapSizeMB > 0 { + file, e := os_overloads.OpenFile(fileName, windows.O_RDWR|windows.O_CREAT, 0644, true) + memory_map.FileMemoryMap[fileName] = new(memory_map.MemoryMap) + + new_mMap := memory_map.FileMemoryMap[fileName] + new_mMap.CreateMemoryMap(file, 1024*1024*uint64(memoryMapSizeMB)) + return file, e + } else { + file, e := os_overloads.OpenFile(fileName, windows.O_RDWR|windows.O_CREAT|windows.O_TRUNC, 0644, false) + return file, e + } } else { return mMap.File, nil } From 5885ab67b3d128e9890e12b4fbc8dde2460d9ace Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Thu, 5 Sep 2019 11:56:48 +0100 Subject: [PATCH 21/37] rename volume property MemoryMap to MemoryMapMaxSizeMB --- weed/storage/volume.go | 20 ++++++++++---------- weed/storage/volume_loading.go | 2 +- weed/storage/volume_vacuum.go | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/weed/storage/volume.go b/weed/storage/volume.go index 7d1a2802a..afe3b4c8a 100644 --- a/weed/storage/volume.go +++ b/weed/storage/volume.go @@ -18,14 +18,14 @@ import ( ) type Volume struct { - Id needle.VolumeId - dir string - Collection string - dataFile *os.File - nm NeedleMapper - needleMapKind NeedleMapType - readOnly bool - MemoryMapped uint32 + Id needle.VolumeId + dir string + Collection string + dataFile *os.File + nm NeedleMapper + needleMapKind NeedleMapType + readOnly bool + MemoryMapMaxSizeMB uint32 SuperBlock @@ -39,9 +39,9 @@ type Volume struct { isCompacting bool } -func NewVolume(dirname string, collection string, id needle.VolumeId, needleMapKind NeedleMapType, replicaPlacement *ReplicaPlacement, ttl *needle.TTL, preallocate int64, memoryMapped uint32) (v *Volume, e error) { +func NewVolume(dirname string, collection string, id needle.VolumeId, needleMapKind NeedleMapType, replicaPlacement *ReplicaPlacement, ttl *needle.TTL, preallocate int64, memoryMapMaxSizeMB uint32) (v *Volume, e error) { // if replicaPlacement is nil, the superblock will be loaded from disk - v = &Volume{dir: dirname, Collection: collection, Id: id, MemoryMapped: memoryMapped} + v = &Volume{dir: dirname, Collection: collection, Id: id, MemoryMapMaxSizeMB: memoryMapMaxSizeMB} v.SuperBlock = SuperBlock{ReplicaPlacement: replicaPlacement, Ttl: ttl} v.needleMapKind = needleMapKind e = v.load(true, true, needleMapKind, preallocate) diff --git a/weed/storage/volume_loading.go b/weed/storage/volume_loading.go index bdf9984e5..49bbcd22b 100644 --- a/weed/storage/volume_loading.go +++ b/weed/storage/volume_loading.go @@ -42,7 +42,7 @@ func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind } } else { if createDatIfMissing { - v.dataFile, e = createVolumeFile(fileName+".dat", preallocate, v.MemoryMapped) + v.dataFile, e = createVolumeFile(fileName+".dat", preallocate, v.MemoryMapMaxSizeMB) } else { return fmt.Errorf("Volume Data file %s.dat does not exist.", fileName) } diff --git a/weed/storage/volume_vacuum.go b/weed/storage/volume_vacuum.go index 301c8bb0e..1b47f0483 100644 --- a/weed/storage/volume_vacuum.go +++ b/weed/storage/volume_vacuum.go @@ -23,7 +23,7 @@ func (v *Volume) garbageLevel() float64 { func (v *Volume) Compact(preallocate int64, compactionBytePerSecond int64) error { - if v.MemoryMapped > 0 { //it makes no sense to compact in memory + if v.MemoryMapMaxSizeMB > 0 { //it makes no sense to compact in memory glog.V(3).Infof("Compacting volume %d ...", v.Id) //no need to lock for copy on write //v.accessLock.Lock() @@ -46,7 +46,7 @@ func (v *Volume) Compact(preallocate int64, compactionBytePerSecond int64) error func (v *Volume) Compact2() error { - if v.MemoryMapped > 0 { //it makes no sense to compact in memory + if v.MemoryMapMaxSizeMB > 0 { //it makes no sense to compact in memory glog.V(3).Infof("Compact2 volume %d ...", v.Id) v.isCompacting = true @@ -63,7 +63,7 @@ func (v *Volume) Compact2() error { } func (v *Volume) CommitCompact() error { - if v.MemoryMapped>0 { //it makes no sense to compact in memory + if v.MemoryMapMaxSizeMB > 0 { //it makes no sense to compact in memory glog.V(0).Infof("Committing volume %d vacuuming...", v.Id) v.isCompacting = true @@ -311,7 +311,7 @@ func (v *Volume) copyDataAndGenerateIndexFile(dstName, idxName string, prealloca var ( dst, idx *os.File ) - if dst, err = createVolumeFile(dstName, preallocate, v.MemoryMapped); err != nil { + if dst, err = createVolumeFile(dstName, preallocate, v.MemoryMapMaxSizeMB); err != nil { return } defer dst.Close() From 44ae041e8079dfb50a1add0dab3fc9e221d56faa Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Thu, 5 Sep 2019 13:42:23 +0100 Subject: [PATCH 22/37] rename more memorymapped variables to memoryMapMaxSizeMB --- weed/storage/store.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/weed/storage/store.go b/weed/storage/store.go index abb4d6264..8a253d2c3 100644 --- a/weed/storage/store.go +++ b/weed/storage/store.go @@ -59,7 +59,7 @@ func NewStore(grpcDialOption grpc.DialOption, port int, ip, publicUrl string, di return } -func (s *Store) AddVolume(volumeId needle.VolumeId, collection string, needleMapKind NeedleMapType, replicaPlacement string, ttlString string, preallocate int64, memoryMapped uint32) error { +func (s *Store) AddVolume(volumeId needle.VolumeId, collection string, needleMapKind NeedleMapType, replicaPlacement string, ttlString string, preallocate int64, memoryMapMaxSizeMB uint32) error { rt, e := NewReplicaPlacementFromString(replicaPlacement) if e != nil { return e @@ -68,7 +68,7 @@ func (s *Store) AddVolume(volumeId needle.VolumeId, collection string, needleMap if e != nil { return e } - e = s.addVolume(volumeId, collection, needleMapKind, rt, ttl, preallocate, memoryMapped) + e = s.addVolume(volumeId, collection, needleMapKind, rt, ttl, preallocate, memoryMapMaxSizeMB) return e } func (s *Store) DeleteCollection(collection string) (e error) { @@ -101,14 +101,14 @@ func (s *Store) FindFreeLocation() (ret *DiskLocation) { } return ret } -func (s *Store) addVolume(vid needle.VolumeId, collection string, needleMapKind NeedleMapType, replicaPlacement *ReplicaPlacement, ttl *needle.TTL, preallocate int64, memoryMapped uint32) error { +func (s *Store) addVolume(vid needle.VolumeId, collection string, needleMapKind NeedleMapType, replicaPlacement *ReplicaPlacement, ttl *needle.TTL, preallocate int64, memoryMapMaxSizeMB uint32) error { if s.findVolume(vid) != nil { return fmt.Errorf("Volume Id %d already exists!", vid) } if location := s.FindFreeLocation(); location != nil { glog.V(0).Infof("In dir %s adds volume:%v collection:%s replicaPlacement:%v ttl:%v", location.Directory, vid, collection, replicaPlacement, ttl) - if volume, err := NewVolume(location.Directory, collection, vid, needleMapKind, replicaPlacement, ttl, preallocate, memoryMapped); err == nil { + if volume, err := NewVolume(location.Directory, collection, vid, needleMapKind, replicaPlacement, ttl, preallocate, memoryMapMaxSizeMB); err == nil { location.SetVolume(vid, volume) glog.V(0).Infof("add volume %d", vid) s.NewVolumesChan <- master_pb.VolumeShortInformationMessage{ From 63acc8c9724f5a7e0ef1f784602fff0a7d3280ef Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Thu, 5 Sep 2019 13:46:29 +0100 Subject: [PATCH 23/37] rename mem_buffer to mBuffer --- weed/storage/memory_map/memory_map.go | 4 +-- weed/storage/memory_map/memory_map_windows.go | 34 +++++++++---------- weed/storage/needle/needle_read_write.go | 6 ++-- weed/storage/volume_super_block.go | 6 ++-- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/weed/storage/memory_map/memory_map.go b/weed/storage/memory_map/memory_map.go index e8d3de6e0..4baf6fc1f 100644 --- a/weed/storage/memory_map/memory_map.go +++ b/weed/storage/memory_map/memory_map.go @@ -33,10 +33,10 @@ func (mMap *MemoryMap) ReadMemory(offset uint64, length uint64) (MemoryBuffer, e return MemoryBuffer{}, fmt.Errorf("Memory Map not implemented for this platform") } -func (mem_buffer *MemoryBuffer) ReleaseMemory() { +func (mBuffer *MemoryBuffer) ReleaseMemory() { } -func (mMap *MemoryMap) DeleteFileAndMemoryMap() { +func (mBuffer *MemoryMap) DeleteFileAndMemoryMap() { } diff --git a/weed/storage/memory_map/memory_map_windows.go b/weed/storage/memory_map/memory_map_windows.go index c5deef84a..58ebcea22 100644 --- a/weed/storage/memory_map/memory_map_windows.go +++ b/weed/storage/memory_map/memory_map_windows.go @@ -119,29 +119,29 @@ func (mMap *MemoryMap) ReadMemory(offset uint64, length uint64) (MemoryBuffer, e return allocate(windows.Handle(mMap.file_memory_map_handle), offset, length, false) } -func (mem_buffer *MemoryBuffer) ReleaseMemory() { - windows.UnmapViewOfFile(mem_buffer.aligned_ptr) +func (mBuffer *MemoryBuffer) ReleaseMemory() { + windows.UnmapViewOfFile(mBuffer.aligned_ptr) - mem_buffer.ptr = 0 - mem_buffer.aligned_ptr = 0 - mem_buffer.length = 0 - mem_buffer.aligned_length = 0 - mem_buffer.Buffer = nil + mBuffer.ptr = 0 + mBuffer.aligned_ptr = 0 + mBuffer.length = 0 + mBuffer.aligned_length = 0 + mBuffer.Buffer = nil } func allocateChunk(mMap *MemoryMap) { start := uint64(len(mMap.write_map_views)) * chunk_size - mem_buffer, err := allocate(windows.Handle(mMap.file_memory_map_handle), start, chunk_size, true) + mBuffer, err := allocate(windows.Handle(mMap.file_memory_map_handle), start, chunk_size, true) if err == nil { - mMap.write_map_views = append(mMap.write_map_views, mem_buffer) + mMap.write_map_views = append(mMap.write_map_views, mBuffer) } } func allocate(hMapFile windows.Handle, offset uint64, length uint64, write bool) (MemoryBuffer, error) { - mem_buffer := MemoryBuffer{} + mBuffer := MemoryBuffer{} dwSysGran := system_info.dwAllocationGranularity @@ -165,20 +165,20 @@ func allocate(hMapFile windows.Handle, offset uint64, length uint64, write bool) uintptr(aligned_length)) if addr_ptr == 0 { - return mem_buffer, errno + return mBuffer, errno } - mem_buffer.aligned_ptr = addr_ptr - mem_buffer.aligned_length = aligned_length - mem_buffer.ptr = addr_ptr + uintptr(diff) - mem_buffer.length = length + mBuffer.aligned_ptr = addr_ptr + mBuffer.aligned_length = aligned_length + mBuffer.ptr = addr_ptr + uintptr(diff) + mBuffer.length = length - slice_header := (*reflect.SliceHeader)(unsafe.Pointer(&mem_buffer.Buffer)) + slice_header := (*reflect.SliceHeader)(unsafe.Pointer(&mBuffer.Buffer)) slice_header.Data = addr_ptr + uintptr(diff) slice_header.Len = int(length) slice_header.Cap = int(length) - return mem_buffer, nil + return mBuffer, nil } // typedef struct _SYSTEM_INFO { diff --git a/weed/storage/needle/needle_read_write.go b/weed/storage/needle/needle_read_write.go index 23a192543..c942af206 100644 --- a/weed/storage/needle/needle_read_write.go +++ b/weed/storage/needle/needle_read_write.go @@ -291,9 +291,9 @@ func ReadNeedleHeader(r *os.File, version Version, offset int64) (n *Needle, byt mMap, exists := memory_map.FileMemoryMap[r.Name()] if exists { - mem_buffer, err := mMap.ReadMemory(uint64(offset), NeedleHeaderSize) - copy(bytes, mem_buffer.Buffer) - mem_buffer.ReleaseMemory() + mBuffer, err := mMap.ReadMemory(uint64(offset), NeedleHeaderSize) + copy(bytes, mBuffer.Buffer) + mBuffer.ReleaseMemory() if err != nil { return nil, bytes, 0, err diff --git a/weed/storage/volume_super_block.go b/weed/storage/volume_super_block.go index f93c43fbf..20a223f7d 100644 --- a/weed/storage/volume_super_block.go +++ b/weed/storage/volume_super_block.go @@ -113,13 +113,13 @@ func ReadSuperBlock(dataFile *os.File) (superBlock SuperBlock, err error) { header := make([]byte, _SuperBlockSize) mMap, exists := memory_map.FileMemoryMap[dataFile.Name()] if exists { - mem_buffer, e := mMap.ReadMemory(0, _SuperBlockSize) + mBuffer, e := mMap.ReadMemory(0, _SuperBlockSize) if err != nil { err = fmt.Errorf("cannot read volume %s super block: %v", dataFile.Name(), e) return } - copy(header, mem_buffer.Buffer) - mem_buffer.ReleaseMemory() + copy(header, mBuffer.Buffer) + mBuffer.ReleaseMemory() } else { if _, err = dataFile.Seek(0, 0); err != nil { err = fmt.Errorf("cannot seek to the beginning of %s: %v", dataFile.Name(), err) From 303234ebd5c13a5f7bfa0dfde494230b1688208a Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Thu, 5 Sep 2019 13:48:55 +0100 Subject: [PATCH 24/37] change go.mod --- go.mod | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index ebf7d38e3..45e5bc8b4 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/chrislusf/seaweedfs +module github.com/joeslay/seaweedfs go 1.12 @@ -34,7 +34,6 @@ require ( github.com/go-kit/kit v0.9.0 // indirect github.com/go-redis/redis v6.15.2+incompatible github.com/go-sql-driver/mysql v1.4.1 - github.com/go-stack/stack v1.8.0 // indirect github.com/gocql/gocql v0.0.0-20190829130954-e163eff7a8c6 github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48 // indirect github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 // indirect @@ -59,8 +58,6 @@ require ( github.com/mattn/go-ieproxy v0.0.0-20190805055040-f9202b1cfdeb // indirect github.com/mattn/go-isatty v0.0.9 // indirect github.com/mattn/go-runewidth v0.0.4 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.1 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect github.com/nats-io/gnatsd v1.4.1 // indirect github.com/nats-io/go-nats v1.7.2 // indirect @@ -108,7 +105,7 @@ require ( golang.org/x/image v0.0.0-20190829233526-b3c06291d021 // indirect golang.org/x/mobile v0.0.0-20190830201351-c6da95954960 // indirect golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 - golang.org/x/sys v0.0.0-20190830142957-1e83adbbebd0 // indirect + golang.org/x/sys v0.0.0-20190830142957-1e83adbbebd0 golang.org/x/tools v0.0.0-20190830223141-573d9926052a google.golang.org/api v0.9.0 google.golang.org/appengine v1.6.2 // indirect From 9c9dff7386acdd1002849c855ea1b3e160e7a177 Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Tue, 10 Sep 2019 16:18:51 +0100 Subject: [PATCH 25/37] Virtual lock memory pages and Set Process Working set size to hint to windows harder not to write pages to disk as much, add finalize function, minor renaming --- weed/storage/memory_map/memory_map_windows.go | 103 ++++++++++++++---- 1 file changed, 79 insertions(+), 24 deletions(-) diff --git a/weed/storage/memory_map/memory_map_windows.go b/weed/storage/memory_map/memory_map_windows.go index 58ebcea22..fd11a688a 100644 --- a/weed/storage/memory_map/memory_map_windows.go +++ b/weed/storage/memory_map/memory_map_windows.go @@ -5,6 +5,7 @@ package memory_map import ( "os" "reflect" + "runtime" "syscall" "unsafe" @@ -33,32 +34,41 @@ type DWORD = uint32 type WORD = uint16 var ( - procGetSystemInfo = syscall.NewLazyDLL("kernel32.dll").NewProc("GetSystemInfo") + modkernel32 = syscall.NewLazyDLL("kernel32.dll") + + procGetSystemInfo = modkernel32.NewProc("GetSystemInfo") + procGetProcessWorkingSetSize = modkernel32.NewProc("GetProcessWorkingSetSize") + procSetProcessWorkingSetSize = modkernel32.NewProc("SetProcessWorkingSetSize") ) -var system_info, err = getSystemInfo() +var currentProcess, _ = windows.GetCurrentProcess() +var currentMinWorkingSet uint64 = 0 +var currentMaxWorkingSet uint64 = 0 +var _ = getProcessWorkingSetSize(uintptr(currentProcess), ¤tMinWorkingSet, ¤tMaxWorkingSet) -var chunk_size = uint64(system_info.dwAllocationGranularity) * 256 +var systemInfo, _ = getSystemInfo() +var chunkSize = uint64(systemInfo.dwAllocationGranularity) * 256 -func (mMap *MemoryMap) CreateMemoryMap(file *os.File, maxlength uint64) { +func (mMap *MemoryMap) CreateMemoryMap(file *os.File, maxLength uint64) { - chunks := (maxlength / chunk_size) - if chunks*chunk_size < maxlength { + chunks := (maxLength / chunkSize) + if chunks*chunkSize < maxLength { chunks = chunks + 1 } - alignedMaxLength := chunks * chunk_size + alignedMaxLength := chunks * chunkSize - maxlength_high := uint32(alignedMaxLength >> 32) - maxlength_low := uint32(alignedMaxLength & 0xFFFFFFFF) - file_memory_map_handle, err := windows.CreateFileMapping(windows.Handle(file.Fd()), nil, windows.PAGE_READWRITE, maxlength_high, maxlength_low, nil) + maxLength_high := uint32(alignedMaxLength >> 32) + maxLength_low := uint32(alignedMaxLength & 0xFFFFFFFF) + file_memory_map_handle, err := windows.CreateFileMapping(windows.Handle(file.Fd()), nil, windows.PAGE_READWRITE, maxLength_high, maxLength_low, nil) if err == nil { mMap.File = file mMap.file_memory_map_handle = uintptr(file_memory_map_handle) - mMap.write_map_views = make([]MemoryBuffer, 0, alignedMaxLength/chunk_size) + mMap.write_map_views = make([]MemoryBuffer, 0, alignedMaxLength/chunkSize) mMap.max_length = alignedMaxLength mMap.End_of_file = -1 + runtime.SetFinalizer(mMap, mMap.DeleteFileAndMemoryMap) } } @@ -84,7 +94,7 @@ func min(x, y uint64) uint64 { func (mMap *MemoryMap) WriteMemory(offset uint64, length uint64, data []byte) { for { - if ((offset+length)/chunk_size)+1 > uint64(len(mMap.write_map_views)) { + if ((offset+length)/chunkSize)+1 > uint64(len(mMap.write_map_views)) { allocateChunk(mMap) } else { break @@ -92,19 +102,19 @@ func (mMap *MemoryMap) WriteMemory(offset uint64, length uint64, data []byte) { } remaining_length := length - slice_index := offset / chunk_size - slice_offset := offset - (slice_index * chunk_size) - data_offset := uint64(0) + sliceIndex := offset / chunkSize + sliceOffset := offset - (sliceIndex * chunkSize) + dataOffset := uint64(0) for { - write_end := min((remaining_length + slice_offset), chunk_size) - copy(mMap.write_map_views[slice_index].Buffer[slice_offset:write_end], data[data_offset:]) - remaining_length -= (write_end - slice_offset) - data_offset += (write_end - slice_offset) + writeEnd := min((remaining_length + sliceOffset), chunkSize) + copy(mMap.write_map_views[sliceIndex].Buffer[sliceOffset:writeEnd], data[dataOffset:]) + remaining_length -= (writeEnd - sliceOffset) + dataOffset += (writeEnd - sliceOffset) if remaining_length > 0 { - slice_index += 1 - slice_offset = 0 + sliceIndex += 1 + sliceOffset = 0 } else { break } @@ -120,8 +130,15 @@ func (mMap *MemoryMap) ReadMemory(offset uint64, length uint64) (MemoryBuffer, e } func (mBuffer *MemoryBuffer) ReleaseMemory() { + + currentMinWorkingSet = currentMinWorkingSet - mBuffer.aligned_length + currentMaxWorkingSet = currentMaxWorkingSet - mBuffer.aligned_length + + windows.VirtualUnlock(mBuffer.aligned_ptr, uintptr(mBuffer.aligned_length)) windows.UnmapViewOfFile(mBuffer.aligned_ptr) + var _ = setProcessWorkingSetSize(uintptr(currentProcess), uintptr(currentMinWorkingSet), uintptr(currentMaxWorkingSet)) + mBuffer.ptr = 0 mBuffer.aligned_ptr = 0 mBuffer.length = 0 @@ -131,11 +148,12 @@ func (mBuffer *MemoryBuffer) ReleaseMemory() { func allocateChunk(mMap *MemoryMap) { - start := uint64(len(mMap.write_map_views)) * chunk_size - mBuffer, err := allocate(windows.Handle(mMap.file_memory_map_handle), start, chunk_size, true) + start := uint64(len(mMap.write_map_views)) * chunkSize + mBuffer, err := allocate(windows.Handle(mMap.file_memory_map_handle), start, chunkSize, true) if err == nil { mMap.write_map_views = append(mMap.write_map_views, mBuffer) + windows.VirtualLock(mBuffer.aligned_ptr, uintptr(mBuffer.aligned_length)) } } @@ -143,7 +161,7 @@ func allocate(hMapFile windows.Handle, offset uint64, length uint64, write bool) mBuffer := MemoryBuffer{} - dwSysGran := system_info.dwAllocationGranularity + dwSysGran := systemInfo.dwAllocationGranularity start := (offset / uint64(dwSysGran)) * uint64(dwSysGran) diff := offset - start @@ -158,6 +176,11 @@ func allocate(hMapFile windows.Handle, offset uint64, length uint64, write bool) access = windows.FILE_MAP_WRITE } + currentMinWorkingSet = currentMinWorkingSet + aligned_length + currentMaxWorkingSet = currentMaxWorkingSet + aligned_length + + var _ = setProcessWorkingSetSize(uintptr(currentProcess), uintptr(currentMinWorkingSet), uintptr(currentMaxWorkingSet)) + addr_ptr, errno := windows.MapViewOfFile(hMapFile, uint32(access), // read/write permission offset_high, @@ -227,3 +250,35 @@ func getSystemInfo() (_SYSTEM_INFO, error) { } return si, nil } + +// BOOL GetProcessWorkingSetSize( +// HANDLE hProcess, +// PSIZE_T lpMinimumWorkingSetSize, +// PSIZE_T lpMaximumWorkingSetSize +// ); + +func getProcessWorkingSetSize(process uintptr, dwMinWorkingSet *uint64, dwMaxWorkingSet *uint64) error { + r1, _, err := syscall.Syscall(procGetProcessWorkingSetSize.Addr(), 3, process, uintptr(unsafe.Pointer(dwMinWorkingSet)), uintptr(unsafe.Pointer(dwMaxWorkingSet))) + if r1 == 0 { + if err != syscall.Errno(0) { + return err + } + } + return nil +} + +// BOOL SetProcessWorkingSetSize( +// HANDLE hProcess, +// SIZE_T dwMinimumWorkingSetSize, +// SIZE_T dwMaximumWorkingSetSize +// ); + +func setProcessWorkingSetSize(process uintptr, dwMinWorkingSet uintptr, dwMaxWorkingSet uintptr) error { + r1, _, err := syscall.Syscall(procSetProcessWorkingSetSize.Addr(), 3, process, (dwMinWorkingSet), (dwMaxWorkingSet)) + if r1 == 0 { + if err != syscall.Errno(0) { + return err + } + } + return nil +} From 15a4c91c28d41a143728677b0a73e57ef56af19c Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Tue, 10 Sep 2019 17:05:54 +0100 Subject: [PATCH 26/37] Remove Finalizer --- weed/storage/memory_map/memory_map_windows.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/weed/storage/memory_map/memory_map_windows.go b/weed/storage/memory_map/memory_map_windows.go index fd11a688a..5ce750cf4 100644 --- a/weed/storage/memory_map/memory_map_windows.go +++ b/weed/storage/memory_map/memory_map_windows.go @@ -5,7 +5,6 @@ package memory_map import ( "os" "reflect" - "runtime" "syscall" "unsafe" @@ -68,7 +67,6 @@ func (mMap *MemoryMap) CreateMemoryMap(file *os.File, maxLength uint64) { mMap.write_map_views = make([]MemoryBuffer, 0, alignedMaxLength/chunkSize) mMap.max_length = alignedMaxLength mMap.End_of_file = -1 - runtime.SetFinalizer(mMap, mMap.DeleteFileAndMemoryMap) } } From c1a928887a0da5825b7ba36ddb0530951eb6ee9a Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Wed, 11 Sep 2019 10:41:59 +0100 Subject: [PATCH 27/37] Add some comments/documentation --- weed/storage/memory_map/memory_map_windows.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/weed/storage/memory_map/memory_map_windows.go b/weed/storage/memory_map/memory_map_windows.go index 5ce750cf4..82d7696f1 100644 --- a/weed/storage/memory_map/memory_map_windows.go +++ b/weed/storage/memory_map/memory_map_windows.go @@ -71,6 +71,8 @@ func (mMap *MemoryMap) CreateMemoryMap(file *os.File, maxLength uint64) { } func (mMap *MemoryMap) DeleteFileAndMemoryMap() { + //First we close the file handles first to delete the file, + //Then we unmap the memory to ensure the unmapping process doesn't write the data to disk windows.CloseHandle(windows.Handle(mMap.file_memory_map_handle)) windows.CloseHandle(windows.Handle(mMap.File.Fd())) @@ -145,7 +147,6 @@ func (mBuffer *MemoryBuffer) ReleaseMemory() { } func allocateChunk(mMap *MemoryMap) { - start := uint64(len(mMap.write_map_views)) * chunkSize mBuffer, err := allocate(windows.Handle(mMap.file_memory_map_handle), start, chunkSize, true) @@ -159,6 +160,7 @@ func allocate(hMapFile windows.Handle, offset uint64, length uint64, write bool) mBuffer := MemoryBuffer{} + //align memory allocations to the minium virtal memory allocation size dwSysGran := systemInfo.dwAllocationGranularity start := (offset / uint64(dwSysGran)) * uint64(dwSysGran) @@ -177,6 +179,8 @@ func allocate(hMapFile windows.Handle, offset uint64, length uint64, write bool) currentMinWorkingSet = currentMinWorkingSet + aligned_length currentMaxWorkingSet = currentMaxWorkingSet + aligned_length + // increase the process working set size to hint to windows memory manager to + // prioritise keeping this memory mapped in physical memory over other standby memory var _ = setProcessWorkingSetSize(uintptr(currentProcess), uintptr(currentMinWorkingSet), uintptr(currentMaxWorkingSet)) addr_ptr, errno := windows.MapViewOfFile(hMapFile, @@ -254,6 +258,7 @@ func getSystemInfo() (_SYSTEM_INFO, error) { // PSIZE_T lpMinimumWorkingSetSize, // PSIZE_T lpMaximumWorkingSetSize // ); +// https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getprocessworkingsetsize func getProcessWorkingSetSize(process uintptr, dwMinWorkingSet *uint64, dwMaxWorkingSet *uint64) error { r1, _, err := syscall.Syscall(procGetProcessWorkingSetSize.Addr(), 3, process, uintptr(unsafe.Pointer(dwMinWorkingSet)), uintptr(unsafe.Pointer(dwMaxWorkingSet))) @@ -270,6 +275,7 @@ func getProcessWorkingSetSize(process uintptr, dwMinWorkingSet *uint64, dwMaxWor // SIZE_T dwMinimumWorkingSetSize, // SIZE_T dwMaximumWorkingSetSize // ); +// https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setprocessworkingsetsize func setProcessWorkingSetSize(process uintptr, dwMinWorkingSet uintptr, dwMaxWorkingSet uintptr) error { r1, _, err := syscall.Syscall(procSetProcessWorkingSetSize.Addr(), 3, process, (dwMinWorkingSet), (dwMaxWorkingSet)) From 6fc6322c904eeca4d7e73258cd99c04f65aa5eba Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Thu, 12 Sep 2019 14:18:21 +0100 Subject: [PATCH 28/37] Change joeslay paths to chrislusf paths --- go.mod | 79 +------------------ go.sum | 3 + .../change_superblock/change_superblock.go | 6 +- unmaintained/fix_dat/fix_dat.go | 10 +-- .../repeated_vacuum/repeated_vacuum.go | 6 +- unmaintained/see_dat/see_dat.go | 6 +- unmaintained/see_idx/see_idx.go | 6 +- unmaintained/see_meta/see_meta.go | 6 +- unmaintained/volume_tailer/volume_tailer.go | 8 +- weed/command/backup.go | 10 +-- weed/command/benchmark.go | 10 +-- weed/command/compact.go | 6 +- weed/command/download.go | 4 +- weed/command/export.go | 8 +- weed/command/filer.go | 10 +-- weed/command/filer_copy.go | 10 +-- weed/command/filer_replication.go | 20 ++--- weed/command/fix.go | 8 +- weed/command/master.go | 10 +-- weed/command/mount_std.go | 8 +- weed/command/s3.go | 8 +- weed/command/server.go | 4 +- weed/command/shell.go | 6 +- weed/command/upload.go | 6 +- weed/command/version.go | 2 +- weed/command/volume.go | 12 +-- weed/command/volume_test.go | 2 +- weed/command/webdav.go | 8 +- .../filer2/abstract_sql/abstract_sql_store.go | 4 +- weed/filer2/cassandra/cassandra_store.go | 6 +- weed/filer2/configuration.go | 2 +- weed/filer2/entry.go | 2 +- weed/filer2/entry_codec.go | 2 +- weed/filer2/etcd/etcd_store.go | 6 +- weed/filer2/filechunks.go | 2 +- weed/filer2/filechunks_test.go | 2 +- weed/filer2/filer.go | 4 +- weed/filer2/filer_client_util.go | 6 +- weed/filer2/filer_deletion.go | 6 +- weed/filer2/filer_notify.go | 6 +- weed/filer2/filer_notify_test.go | 2 +- weed/filer2/filerstore.go | 6 +- weed/filer2/leveldb/leveldb_store.go | 6 +- weed/filer2/leveldb/leveldb_store_test.go | 2 +- weed/filer2/leveldb2/leveldb2_store.go | 6 +- weed/filer2/leveldb2/leveldb2_store_test.go | 2 +- weed/filer2/memdb/memdb_store.go | 4 +- weed/filer2/memdb/memdb_store_test.go | 2 +- weed/filer2/mysql/mysql_store.go | 6 +- weed/filer2/postgres/postgres_store.go | 6 +- weed/filer2/redis/redis_cluster_store.go | 4 +- weed/filer2/redis/redis_store.go | 4 +- weed/filer2/redis/universal_redis_store.go | 4 +- weed/filer2/stream.go | 8 +- weed/filesys/dir.go | 6 +- weed/filesys/dir_link.go | 4 +- weed/filesys/dir_rename.go | 2 +- weed/filesys/dirty_page.go | 8 +- weed/filesys/file.go | 6 +- weed/filesys/filehandle.go | 6 +- weed/filesys/wfs.go | 6 +- weed/filesys/wfs_deletion.go | 8 +- weed/images/resizing.go | 2 +- weed/notification/aws_sqs/aws_sqs_pub.go | 6 +- weed/notification/configuration.go | 4 +- .../gocdk_pub_sub/gocdk_pub_sub.go | 6 +- .../google_pub_sub/google_pub_sub.go | 6 +- weed/notification/kafka/kafka_queue.go | 6 +- weed/notification/log/log_queue.go | 6 +- weed/operation/assign_file_id.go | 6 +- weed/operation/chunked_file.go | 4 +- weed/operation/delete_content.go | 4 +- weed/operation/grpc_client.go | 8 +- weed/operation/lookup.go | 4 +- weed/operation/lookup_vid_cache.go | 2 +- weed/operation/stats.go | 2 +- weed/operation/submit.go | 4 +- weed/operation/sync_volume.go | 2 +- weed/operation/tail_volume.go | 4 +- weed/operation/upload_content.go | 6 +- weed/pb/filer_pb/filer_pb_helper.go | 2 +- weed/replication/replicator.go | 10 +-- weed/replication/sink/azuresink/azure_sink.go | 12 +-- weed/replication/sink/b2sink/b2_sink.go | 10 +-- .../replication/sink/filersink/fetch_write.go | 10 +-- weed/replication/sink/filersink/filer_sink.go | 14 ++-- weed/replication/sink/gcssink/gcs_sink.go | 12 +-- weed/replication/sink/replication_sink.go | 6 +- weed/replication/sink/s3sink/s3_sink.go | 12 +-- weed/replication/sink/s3sink/s3_write.go | 8 +- weed/replication/source/filer_source.go | 8 +- weed/replication/sub/notification_aws_sqs.go | 6 +- .../sub/notification_gocdk_pub_sub.go | 6 +- .../sub/notification_google_pub_sub.go | 6 +- weed/replication/sub/notification_kafka.go | 6 +- weed/replication/sub/notifications.go | 4 +- weed/s3api/filer_multipart.go | 6 +- weed/s3api/filer_util.go | 4 +- weed/s3api/s3api_bucket_handlers.go | 4 +- weed/s3api/s3api_handlers.go | 6 +- weed/s3api/s3api_object_handlers.go | 4 +- weed/s3api/s3api_objects_list_handlers.go | 6 +- weed/s3api/s3api_server.go | 12 +-- weed/security/guard.go | 2 +- weed/security/jwt.go | 2 +- weed/security/tls.go | 2 +- weed/server/common.go | 12 +-- weed/server/filer_grpc_server.go | 10 +-- weed/server/filer_grpc_server_rename.go | 6 +- weed/server/filer_server.go | 42 +++++----- weed/server/filer_server_handlers.go | 2 +- weed/server/filer_server_handlers_read.go | 8 +- weed/server/filer_server_handlers_read_dir.go | 8 +- weed/server/filer_server_handlers_write.go | 14 ++-- .../filer_server_handlers_write_autochunk.go | 14 ++-- weed/server/master_grpc_server.go | 8 +- weed/server/master_grpc_server_collection.go | 6 +- weed/server/master_grpc_server_volume.go | 10 +-- weed/server/master_server.go | 16 ++-- weed/server/master_server_handlers.go | 8 +- weed/server/master_server_handlers_admin.go | 14 ++-- weed/server/master_server_handlers_ui.go | 6 +- weed/server/raft_server.go | 6 +- weed/server/volume_grpc_admin.go | 6 +- weed/server/volume_grpc_batch_delete.go | 6 +- weed/server/volume_grpc_client_to_master.go | 10 +-- weed/server/volume_grpc_copy.go | 14 ++-- weed/server/volume_grpc_copy_incremental.go | 4 +- weed/server/volume_grpc_erasure_coding.go | 16 ++-- weed/server/volume_grpc_tail.go | 10 +-- weed/server/volume_grpc_vacuum.go | 6 +- weed/server/volume_server.go | 8 +- weed/server/volume_server_handlers.go | 6 +- weed/server/volume_server_handlers_admin.go | 6 +- weed/server/volume_server_handlers_read.go | 12 +-- weed/server/volume_server_handlers_ui.go | 8 +- weed/server/volume_server_handlers_write.go | 10 +-- weed/server/webdav_server.go | 12 +-- weed/shell/command_collection_delete.go | 2 +- weed/shell/command_collection_list.go | 2 +- weed/shell/command_ec_balance.go | 4 +- weed/shell/command_ec_common.go | 12 +-- weed/shell/command_ec_encode.go | 12 +-- weed/shell/command_ec_rebuild.go | 8 +- weed/shell/command_ec_test.go | 4 +- weed/shell/command_fs_cat.go | 4 +- weed/shell/command_fs_du.go | 6 +- weed/shell/command_fs_ls.go | 4 +- weed/shell/command_fs_meta_load.go | 6 +- weed/shell/command_fs_meta_notify.go | 8 +- weed/shell/command_fs_meta_save.go | 6 +- weed/shell/command_fs_mv.go | 4 +- weed/shell/command_fs_tree.go | 4 +- weed/shell/command_volume_balance.go | 4 +- weed/shell/command_volume_copy.go | 2 +- weed/shell/command_volume_delete.go | 2 +- weed/shell/command_volume_fix_replication.go | 8 +- weed/shell/command_volume_list.go | 4 +- weed/shell/command_volume_mount.go | 6 +- weed/shell/command_volume_move.go | 6 +- weed/shell/command_volume_unmount.go | 6 +- weed/shell/commands.go | 6 +- weed/stats/disk.go | 2 +- weed/stats/disk_notsupported.go | 2 +- weed/stats/disk_supported.go | 2 +- weed/stats/memory.go | 2 +- weed/stats/memory_notsupported.go | 2 +- weed/stats/memory_supported.go | 2 +- weed/stats/metrics.go | 2 +- weed/storage/disk_location.go | 6 +- weed/storage/disk_location_ec.go | 4 +- weed/storage/erasure_coding/ec_encoder.go | 10 +-- weed/storage/erasure_coding/ec_shard.go | 4 +- weed/storage/erasure_coding/ec_test.go | 4 +- weed/storage/erasure_coding/ec_volume.go | 8 +- .../erasure_coding/ec_volume_delete.go | 4 +- weed/storage/erasure_coding/ec_volume_info.go | 4 +- weed/storage/idx/walk.go | 6 +- weed/storage/needle/crc.go | 2 +- weed/storage/needle/file_id.go | 2 +- weed/storage/needle/file_id_test.go | 2 +- weed/storage/needle/needle.go | 4 +- weed/storage/needle/needle_parse_multipart.go | 4 +- weed/storage/needle/needle_read_write.go | 8 +- weed/storage/needle/needle_read_write_test.go | 2 +- weed/storage/needle/needle_test.go | 2 +- weed/storage/needle_map.go | 4 +- weed/storage/needle_map/btree_map.go | 2 +- weed/storage/needle_map/compact_map.go | 2 +- .../needle_map/compact_map_perf_test.go | 4 +- weed/storage/needle_map/compact_map_test.go | 2 +- weed/storage/needle_map/needle_value.go | 4 +- weed/storage/needle_map/needle_value_map.go | 2 +- weed/storage/needle_map_leveldb.go | 10 +-- weed/storage/needle_map_memory.go | 8 +- weed/storage/needle_map_metric.go | 4 +- weed/storage/needle_map_metric_test.go | 4 +- weed/storage/store.go | 10 +-- weed/storage/store_ec.go | 16 ++-- weed/storage/store_ec_delete.go | 12 +-- weed/storage/store_vacuum.go | 4 +- weed/storage/types/needle_id_type.go | 2 +- weed/storage/types/needle_types.go | 2 +- weed/storage/volume.go | 10 +-- weed/storage/volume_backup.go | 10 +-- weed/storage/volume_checking.go | 8 +- weed/storage/volume_create.go | 2 +- weed/storage/volume_create_linux.go | 2 +- weed/storage/volume_create_windows.go | 6 +- weed/storage/volume_info.go | 4 +- weed/storage/volume_info_test.go | 2 +- weed/storage/volume_loading.go | 6 +- weed/storage/volume_read_write.go | 8 +- weed/storage/volume_super_block.go | 10 +-- weed/storage/volume_super_block_test.go | 2 +- weed/storage/volume_vacuum.go | 14 ++-- weed/storage/volume_vacuum_test.go | 4 +- weed/topology/allocate_volume.go | 6 +- weed/topology/cluster_commands.go | 4 +- weed/topology/collection.go | 6 +- weed/topology/data_center.go | 2 +- weed/topology/data_node.go | 10 +-- weed/topology/data_node_ec.go | 4 +- weed/topology/node.go | 6 +- weed/topology/rack.go | 2 +- weed/topology/store_replicate.go | 12 +-- weed/topology/topology.go | 12 +-- weed/topology/topology_ec.go | 8 +- weed/topology/topology_event_handling.go | 4 +- weed/topology/topology_map.go | 2 +- weed/topology/topology_test.go | 8 +- weed/topology/topology_vacuum.go | 8 +- weed/topology/volume_growth.go | 6 +- weed/topology/volume_growth_test.go | 6 +- weed/topology/volume_layout.go | 6 +- weed/topology/volume_location_list.go | 2 +- weed/util/compression.go | 2 +- weed/util/config.go | 2 +- weed/util/file_util.go | 2 +- weed/util/net_timeout.go | 2 +- weed/util/pprof.go | 2 +- weed/wdclient/masterclient.go | 6 +- weed/wdclient/vid_map.go | 2 +- weed/weed.go | 4 +- 244 files changed, 745 insertions(+), 815 deletions(-) diff --git a/go.mod b/go.mod index 45e5bc8b4..dd77af8aa 100644 --- a/go.mod +++ b/go.mod @@ -1,121 +1,48 @@ -module github.com/joeslay/seaweedfs +module github.com/chrislusf/seaweedfs -go 1.12 +go 1.13 require ( cloud.google.com/go v0.44.3 - contrib.go.opencensus.io/exporter/aws v0.0.0-20190807220307-c50fb1bd7f21 // indirect - contrib.go.opencensus.io/exporter/ocagent v0.6.0 // indirect - contrib.go.opencensus.io/exporter/stackdriver v0.12.5 // indirect - contrib.go.opencensus.io/resource v0.1.2 // indirect - github.com/Azure/azure-amqp-common-go v1.1.4 // indirect - github.com/Azure/azure-pipeline-go v0.2.2 // indirect - github.com/Azure/azure-sdk-for-go v33.0.0+incompatible // indirect github.com/Azure/azure-storage-blob-go v0.8.0 - github.com/Azure/go-autorest v13.0.0+incompatible // indirect - github.com/Azure/go-autorest/tracing v0.5.0 // indirect - github.com/DataDog/zstd v1.4.1 // indirect - github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20190828224159-d93c53a4824c // indirect github.com/Shopify/sarama v1.23.1 - github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect - github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4 // indirect github.com/aws/aws-sdk-go v1.23.13 github.com/chrislusf/raft v0.0.0-20190225081310-10d6e2182d92 - github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd // indirect - github.com/coreos/bbolt v1.3.3 // indirect - github.com/coreos/etcd v3.3.15+incompatible // indirect - github.com/coreos/go-semver v0.3.0 // indirect - github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect github.com/dgrijalva/jwt-go v3.2.0+incompatible github.com/disintegration/imaging v1.6.1 github.com/dustin/go-humanize v1.0.0 - github.com/eapache/go-resiliency v1.2.0 // indirect github.com/gabriel-vasile/mimetype v0.3.17 - github.com/go-kit/kit v0.9.0 // indirect github.com/go-redis/redis v6.15.2+incompatible github.com/go-sql-driver/mysql v1.4.1 github.com/gocql/gocql v0.0.0-20190829130954-e163eff7a8c6 - github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48 // indirect - github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 // indirect github.com/golang/protobuf v1.3.2 github.com/google/btree v1.0.0 - github.com/google/pprof v0.0.0-20190723021845-34ac40c74b70 // indirect github.com/gorilla/mux v1.7.3 - github.com/gorilla/websocket v1.4.1 // indirect - github.com/grpc-ecosystem/grpc-gateway v1.11.0 // indirect github.com/jacobsa/daemonize v0.0.0-20160101105449-e460293e890f - github.com/jcmturner/gofork v1.0.0 // indirect + github.com/joeslay/seaweedfs v0.0.0-20190912104409-d8c34b032fb6 // indirect github.com/karlseguin/ccache v2.0.3+incompatible - github.com/karlseguin/expect v1.0.1 // indirect - github.com/klauspost/cpuid v1.2.1 // indirect github.com/klauspost/crc32 v1.2.0 github.com/klauspost/reedsolomon v1.9.2 - github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect - github.com/kr/pty v1.1.8 // indirect github.com/kurin/blazer v0.5.3 github.com/lib/pq v1.2.0 - github.com/magiconair/properties v1.8.1 // indirect - github.com/mattn/go-ieproxy v0.0.0-20190805055040-f9202b1cfdeb // indirect - github.com/mattn/go-isatty v0.0.9 // indirect - github.com/mattn/go-runewidth v0.0.4 // indirect - github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect - github.com/nats-io/gnatsd v1.4.1 // indirect - github.com/nats-io/go-nats v1.7.2 // indirect - github.com/nats-io/nats-server/v2 v2.0.4 // indirect - github.com/onsi/ginkgo v1.10.1 // indirect - github.com/onsi/gomega v1.7.0 // indirect - github.com/opentracing/opentracing-go v1.1.0 // indirect - github.com/pelletier/go-toml v1.4.0 // indirect github.com/peterh/liner v1.1.0 - github.com/pierrec/lz4 v2.2.7+incompatible // indirect github.com/prometheus/client_golang v1.1.0 - github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 // indirect - github.com/prometheus/procfs v0.0.4 // indirect github.com/rakyll/statik v0.1.6 - github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563 // indirect - github.com/rogpeppe/fastuuid v1.2.0 // indirect - github.com/rogpeppe/go-internal v1.3.1 // indirect github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd github.com/satori/go.uuid v1.2.0 github.com/seaweedfs/fuse v0.0.0-20190510212405-310228904eff - github.com/sirupsen/logrus v1.4.2 // indirect - github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/spf13/afero v1.2.2 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/viper v1.4.0 - github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271 // indirect - github.com/stretchr/testify v1.4.0 // indirect github.com/syndtr/goleveldb v1.0.0 - github.com/tidwall/pretty v1.0.0 // indirect - github.com/uber-go/atomic v1.4.0 // indirect - github.com/uber/jaeger-client-go v2.17.0+incompatible // indirect - github.com/uber/jaeger-lib v2.0.0+incompatible // indirect - github.com/ugorji/go v1.1.7 // indirect - github.com/willf/bitset v1.1.10 // indirect github.com/willf/bloom v2.0.3+incompatible - github.com/wsxiaoys/terminal v0.0.0-20160513160801-0940f3fc43a0 // indirect - go.etcd.io/bbolt v1.3.3 // indirect go.etcd.io/etcd v3.3.15+incompatible - go.mongodb.org/mongo-driver v1.1.0 // indirect gocloud.dev v0.16.0 gocloud.dev/pubsub/natspubsub v0.16.0 gocloud.dev/pubsub/rabbitpubsub v0.16.0 - golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472 // indirect - golang.org/x/exp v0.0.0-20190829153037-c13cbed26979 // indirect - golang.org/x/image v0.0.0-20190829233526-b3c06291d021 // indirect - golang.org/x/mobile v0.0.0-20190830201351-c6da95954960 // indirect golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 golang.org/x/sys v0.0.0-20190830142957-1e83adbbebd0 golang.org/x/tools v0.0.0-20190830223141-573d9926052a google.golang.org/api v0.9.0 - google.golang.org/appengine v1.6.2 // indirect - google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 // indirect google.golang.org/grpc v1.23.0 - gopkg.in/jcmturner/goidentity.v3 v3.0.0 // indirect - gopkg.in/jcmturner/gokrb5.v7 v7.3.0 // indirect - gopkg.in/karlseguin/expect.v1 v1.0.1 // indirect - honnef.co/go/tools v0.0.1-2019.2.2 // indirect - pack.ag/amqp v0.12.1 // indirect ) replace github.com/satori/go.uuid v1.2.0 => github.com/satori/go.uuid v0.0.0-20181028125025-b2ce2384e17b diff --git a/go.sum b/go.sum index 2dad6d716..55a2365d5 100644 --- a/go.sum +++ b/go.sum @@ -98,6 +98,8 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/chrislusf/raft v0.0.0-20190225081310-10d6e2182d92 h1:lM9SFsh0EPXkyJyrTJqLZPAIJBtNFP6LNkYXu2MnSZI= github.com/chrislusf/raft v0.0.0-20190225081310-10d6e2182d92/go.mod h1:4jyiUCD5y548+yKW+oiHtccBiMaLCCbFBpK2t7X4eUo= +github.com/chrislusf/seaweedfs v0.0.0-20190912032620-ae53f636804e h1:PmqW1XGq0V6KnwOFa3hOSqsqa/bH66zxWzCVMOo5Yi4= +github.com/chrislusf/seaweedfs v0.0.0-20190912032620-ae53f636804e/go.mod h1:e5Pz27e2DxLCFt6GbCBP5/qJygD4TkOL5xqSFYFq+2U= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s= @@ -262,6 +264,7 @@ github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/U github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/joeslay/seaweedfs v0.0.0-20190912104409-d8c34b032fb6/go.mod h1:ljVry+CyFSNBLlKiell2UlxOKCvXXHjyBhiGDzXa+0c= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= diff --git a/unmaintained/change_superblock/change_superblock.go b/unmaintained/change_superblock/change_superblock.go index 9326b32e2..07d9b94e4 100644 --- a/unmaintained/change_superblock/change_superblock.go +++ b/unmaintained/change_superblock/change_superblock.go @@ -7,9 +7,9 @@ import ( "path" "strconv" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/storage" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) var ( diff --git a/unmaintained/fix_dat/fix_dat.go b/unmaintained/fix_dat/fix_dat.go index 0d49f2fa7..a72a78eed 100644 --- a/unmaintained/fix_dat/fix_dat.go +++ b/unmaintained/fix_dat/fix_dat.go @@ -8,11 +8,11 @@ import ( "path" "strconv" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/storage" - "github.com/joeslay/seaweedfs/weed/storage/needle" - "github.com/joeslay/seaweedfs/weed/storage/types" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/util" ) var ( diff --git a/unmaintained/repeated_vacuum/repeated_vacuum.go b/unmaintained/repeated_vacuum/repeated_vacuum.go index d613f7516..28bcabb9b 100644 --- a/unmaintained/repeated_vacuum/repeated_vacuum.go +++ b/unmaintained/repeated_vacuum/repeated_vacuum.go @@ -7,11 +7,11 @@ import ( "log" "math/rand" - "github.com/joeslay/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/security" "github.com/spf13/viper" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/util" ) var ( diff --git a/unmaintained/see_dat/see_dat.go b/unmaintained/see_dat/see_dat.go index ed6bf930e..e8e54fd4f 100644 --- a/unmaintained/see_dat/see_dat.go +++ b/unmaintained/see_dat/see_dat.go @@ -3,9 +3,9 @@ package main import ( "flag" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/storage" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/storage/needle" "time" ) diff --git a/unmaintained/see_idx/see_idx.go b/unmaintained/see_idx/see_idx.go index 7c8c40a8d..777af1821 100644 --- a/unmaintained/see_idx/see_idx.go +++ b/unmaintained/see_idx/see_idx.go @@ -7,9 +7,9 @@ import ( "path" "strconv" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/storage/idx" - "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage/idx" + "github.com/chrislusf/seaweedfs/weed/storage/types" ) var ( diff --git a/unmaintained/see_meta/see_meta.go b/unmaintained/see_meta/see_meta.go index 856fa40bf..0d2ac8de1 100644 --- a/unmaintained/see_meta/see_meta.go +++ b/unmaintained/see_meta/see_meta.go @@ -7,9 +7,9 @@ import ( "log" "os" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/golang/protobuf/proto" ) diff --git a/unmaintained/volume_tailer/volume_tailer.go b/unmaintained/volume_tailer/volume_tailer.go index 9ae0a6e62..f0ef51c09 100644 --- a/unmaintained/volume_tailer/volume_tailer.go +++ b/unmaintained/volume_tailer/volume_tailer.go @@ -5,10 +5,10 @@ import ( "log" "time" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/security" - "github.com/joeslay/seaweedfs/weed/storage/needle" - util2 "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + util2 "github.com/chrislusf/seaweedfs/weed/util" "github.com/spf13/viper" "golang.org/x/tools/godoc/util" ) diff --git a/weed/command/backup.go b/weed/command/backup.go index 9849f566e..505de4ae6 100644 --- a/weed/command/backup.go +++ b/weed/command/backup.go @@ -3,13 +3,13 @@ package command import ( "fmt" - "github.com/joeslay/seaweedfs/weed/security" - "github.com/joeslay/seaweedfs/weed/storage/needle" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/spf13/viper" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/storage" ) var ( diff --git a/weed/command/benchmark.go b/weed/command/benchmark.go index bf655caa0..dd0fdb88e 100644 --- a/weed/command/benchmark.go +++ b/weed/command/benchmark.go @@ -18,11 +18,11 @@ import ( "github.com/spf13/viper" "google.golang.org/grpc" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/security" - "github.com/joeslay/seaweedfs/weed/util" - "github.com/joeslay/seaweedfs/weed/wdclient" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/wdclient" ) type BenchmarkOptions struct { diff --git a/weed/command/compact.go b/weed/command/compact.go index 03f1a14db..4a54f5670 100644 --- a/weed/command/compact.go +++ b/weed/command/compact.go @@ -1,9 +1,9 @@ package command import ( - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/storage" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) func init() { diff --git a/weed/command/download.go b/weed/command/download.go index c57517d00..b3e33defd 100644 --- a/weed/command/download.go +++ b/weed/command/download.go @@ -8,8 +8,8 @@ import ( "path" "strings" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/util" ) var ( diff --git a/weed/command/export.go b/weed/command/export.go index 43aa38872..7e94ec11c 100644 --- a/weed/command/export.go +++ b/weed/command/export.go @@ -14,10 +14,10 @@ import ( "io" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/storage" - "github.com/joeslay/seaweedfs/weed/storage/needle" - "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/storage/types" ) const ( diff --git a/weed/command/filer.go b/weed/command/filer.go index ddd60d375..b1ceb46f5 100644 --- a/weed/command/filer.go +++ b/weed/command/filer.go @@ -6,13 +6,13 @@ import ( "strings" "time" - "github.com/joeslay/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/security" "github.com/spf13/viper" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/server" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/server" + "github.com/chrislusf/seaweedfs/weed/util" "google.golang.org/grpc/reflection" ) diff --git a/weed/command/filer_copy.go b/weed/command/filer_copy.go index 3aa845eba..19aceb211 100644 --- a/weed/command/filer_copy.go +++ b/weed/command/filer_copy.go @@ -14,11 +14,11 @@ import ( "sync" "time" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/security" - "github.com/joeslay/seaweedfs/weed/util" - "github.com/joeslay/seaweedfs/weed/wdclient" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/wdclient" "github.com/spf13/viper" "google.golang.org/grpc" ) diff --git a/weed/command/filer_replication.go b/weed/command/filer_replication.go index 1040e2174..c6e7f5dba 100644 --- a/weed/command/filer_replication.go +++ b/weed/command/filer_replication.go @@ -4,16 +4,16 @@ import ( "context" "strings" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/replication" - "github.com/joeslay/seaweedfs/weed/replication/sink" - _ "github.com/joeslay/seaweedfs/weed/replication/sink/azuresink" - _ "github.com/joeslay/seaweedfs/weed/replication/sink/b2sink" - _ "github.com/joeslay/seaweedfs/weed/replication/sink/filersink" - _ "github.com/joeslay/seaweedfs/weed/replication/sink/gcssink" - _ "github.com/joeslay/seaweedfs/weed/replication/sink/s3sink" - "github.com/joeslay/seaweedfs/weed/replication/sub" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/replication" + "github.com/chrislusf/seaweedfs/weed/replication/sink" + _ "github.com/chrislusf/seaweedfs/weed/replication/sink/azuresink" + _ "github.com/chrislusf/seaweedfs/weed/replication/sink/b2sink" + _ "github.com/chrislusf/seaweedfs/weed/replication/sink/filersink" + _ "github.com/chrislusf/seaweedfs/weed/replication/sink/gcssink" + _ "github.com/chrislusf/seaweedfs/weed/replication/sink/s3sink" + "github.com/chrislusf/seaweedfs/weed/replication/sub" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/spf13/viper" ) diff --git a/weed/command/fix.go b/weed/command/fix.go index c6d017d07..bf33490cc 100644 --- a/weed/command/fix.go +++ b/weed/command/fix.go @@ -5,10 +5,10 @@ import ( "path" "strconv" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/storage" - "github.com/joeslay/seaweedfs/weed/storage/needle" - "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/storage/types" ) func init() { diff --git a/weed/command/master.go b/weed/command/master.go index 3e4fc15e8..3d33f4f7a 100644 --- a/weed/command/master.go +++ b/weed/command/master.go @@ -8,11 +8,11 @@ import ( "strings" "github.com/chrislusf/raft/protobuf" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/security" - "github.com/joeslay/seaweedfs/weed/server" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/server" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/gorilla/mux" "github.com/spf13/viper" "google.golang.org/grpc/reflection" diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go index 4dc21d334..0519ae7b8 100644 --- a/weed/command/mount_std.go +++ b/weed/command/mount_std.go @@ -12,13 +12,13 @@ import ( "strings" "time" - "github.com/joeslay/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/security" "github.com/jacobsa/daemonize" "github.com/spf13/viper" - "github.com/joeslay/seaweedfs/weed/filesys" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filesys" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/seaweedfs/fuse" "github.com/seaweedfs/fuse/fs" ) diff --git a/weed/command/s3.go b/weed/command/s3.go index c3f2d61d4..e004bb066 100644 --- a/weed/command/s3.go +++ b/weed/command/s3.go @@ -4,14 +4,14 @@ import ( "net/http" "time" - "github.com/joeslay/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/security" "github.com/spf13/viper" "fmt" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/s3api" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/s3api" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/gorilla/mux" ) diff --git a/weed/command/server.go b/weed/command/server.go index dea5c49c4..87f404ed3 100644 --- a/weed/command/server.go +++ b/weed/command/server.go @@ -8,8 +8,8 @@ import ( "strings" "time" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/util" ) type ServerOptions struct { diff --git a/weed/command/shell.go b/weed/command/shell.go index 2adac4d0e..79f8b8bf9 100644 --- a/weed/command/shell.go +++ b/weed/command/shell.go @@ -1,9 +1,9 @@ package command import ( - "github.com/joeslay/seaweedfs/weed/security" - "github.com/joeslay/seaweedfs/weed/shell" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/shell" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/spf13/viper" ) diff --git a/weed/command/upload.go b/weed/command/upload.go index 861f6261d..25e938d9b 100644 --- a/weed/command/upload.go +++ b/weed/command/upload.go @@ -6,11 +6,11 @@ import ( "os" "path/filepath" - "github.com/joeslay/seaweedfs/weed/security" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/spf13/viper" - "github.com/joeslay/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/operation" ) var ( diff --git a/weed/command/version.go b/weed/command/version.go index e8b417d1c..8fdd68ec8 100644 --- a/weed/command/version.go +++ b/weed/command/version.go @@ -4,7 +4,7 @@ import ( "fmt" "runtime" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/util" ) var cmdVersion = &Command{ diff --git a/weed/command/volume.go b/weed/command/volume.go index 0a0e16ac4..3c1aa2b50 100644 --- a/weed/command/volume.go +++ b/weed/command/volume.go @@ -9,14 +9,14 @@ import ( "strings" "time" - "github.com/joeslay/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/security" "github.com/spf13/viper" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/server" - "github.com/joeslay/seaweedfs/weed/storage" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/server" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/util" "google.golang.org/grpc/reflection" ) diff --git a/weed/command/volume_test.go b/weed/command/volume_test.go index 65b96a7c2..7399f1248 100644 --- a/weed/command/volume_test.go +++ b/weed/command/volume_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/joeslay/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) func TestXYZ(t *testing.T) { diff --git a/weed/command/webdav.go b/weed/command/webdav.go index 313aa1382..371c4a9ad 100644 --- a/weed/command/webdav.go +++ b/weed/command/webdav.go @@ -7,10 +7,10 @@ import ( "strconv" "time" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/security" - "github.com/joeslay/seaweedfs/weed/server" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/server" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/spf13/viper" ) diff --git a/weed/filer2/abstract_sql/abstract_sql_store.go b/weed/filer2/abstract_sql/abstract_sql_store.go index 9519d4cd8..3e8554957 100644 --- a/weed/filer2/abstract_sql/abstract_sql_store.go +++ b/weed/filer2/abstract_sql/abstract_sql_store.go @@ -5,8 +5,8 @@ import ( "database/sql" "fmt" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" ) type AbstractSqlStore struct { diff --git a/weed/filer2/cassandra/cassandra_store.go b/weed/filer2/cassandra/cassandra_store.go index 9a31d8030..466be5bf3 100644 --- a/weed/filer2/cassandra/cassandra_store.go +++ b/weed/filer2/cassandra/cassandra_store.go @@ -3,9 +3,9 @@ package cassandra import ( "context" "fmt" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/gocql/gocql" ) diff --git a/weed/filer2/configuration.go b/weed/filer2/configuration.go index c4712a48a..7b05b53dc 100644 --- a/weed/filer2/configuration.go +++ b/weed/filer2/configuration.go @@ -3,7 +3,7 @@ package filer2 import ( "os" - "github.com/joeslay/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/glog" "github.com/spf13/viper" ) diff --git a/weed/filer2/entry.go b/weed/filer2/entry.go index 480ad631e..3f8a19114 100644 --- a/weed/filer2/entry.go +++ b/weed/filer2/entry.go @@ -4,7 +4,7 @@ import ( "os" "time" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" ) type Attr struct { diff --git a/weed/filer2/entry_codec.go b/weed/filer2/entry_codec.go index 1b0f4f64b..cf4627b74 100644 --- a/weed/filer2/entry_codec.go +++ b/weed/filer2/entry_codec.go @@ -5,7 +5,7 @@ import ( "time" "fmt" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/golang/protobuf/proto" ) diff --git a/weed/filer2/etcd/etcd_store.go b/weed/filer2/etcd/etcd_store.go index 42987c130..1b0f928d0 100644 --- a/weed/filer2/etcd/etcd_store.go +++ b/weed/filer2/etcd/etcd_store.go @@ -6,9 +6,9 @@ import ( "strings" "time" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" - weed_util "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" + weed_util "github.com/chrislusf/seaweedfs/weed/util" "go.etcd.io/etcd/clientv3" ) diff --git a/weed/filer2/filechunks.go b/weed/filer2/filechunks.go index 130d4ead5..b5876df82 100644 --- a/weed/filer2/filechunks.go +++ b/weed/filer2/filechunks.go @@ -6,7 +6,7 @@ import ( "sort" "sync" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" ) func TotalSize(chunks []*filer_pb.FileChunk) (size uint64) { diff --git a/weed/filer2/filechunks_test.go b/weed/filer2/filechunks_test.go index c0c20fbf1..e75e60753 100644 --- a/weed/filer2/filechunks_test.go +++ b/weed/filer2/filechunks_test.go @@ -5,7 +5,7 @@ import ( "testing" "fmt" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" ) func TestCompactFileChunks(t *testing.T) { diff --git a/weed/filer2/filer.go b/weed/filer2/filer.go index 55b78567b..672295dea 100644 --- a/weed/filer2/filer.go +++ b/weed/filer2/filer.go @@ -10,8 +10,8 @@ import ( "strings" "time" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/wdclient" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/wdclient" "github.com/karlseguin/ccache" ) diff --git a/weed/filer2/filer_client_util.go b/weed/filer2/filer_client_util.go index 49bf39e51..7e093eea2 100644 --- a/weed/filer2/filer_client_util.go +++ b/weed/filer2/filer_client_util.go @@ -6,9 +6,9 @@ import ( "strings" "sync" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" ) func VolumeId(fileId string) string { diff --git a/weed/filer2/filer_deletion.go b/weed/filer2/filer_deletion.go index bb1cbcefe..25e27e504 100644 --- a/weed/filer2/filer_deletion.go +++ b/weed/filer2/filer_deletion.go @@ -3,9 +3,9 @@ package filer2 import ( "time" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" ) func (f *Filer) loopProcessingDeletion() { diff --git a/weed/filer2/filer_notify.go b/weed/filer2/filer_notify.go index 82aae9da3..c37381116 100644 --- a/weed/filer2/filer_notify.go +++ b/weed/filer2/filer_notify.go @@ -1,9 +1,9 @@ package filer2 import ( - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/notification" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/notification" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" ) func (f *Filer) NotifyUpdateEvent(oldEntry, newEntry *Entry, deleteChunks bool) { diff --git a/weed/filer2/filer_notify_test.go b/weed/filer2/filer_notify_test.go index d8319463f..b74e2ad35 100644 --- a/weed/filer2/filer_notify_test.go +++ b/weed/filer2/filer_notify_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/golang/protobuf/proto" ) diff --git a/weed/filer2/filerstore.go b/weed/filer2/filerstore.go index dd61f25bd..8caa44ee2 100644 --- a/weed/filer2/filerstore.go +++ b/weed/filer2/filerstore.go @@ -5,9 +5,9 @@ import ( "errors" "time" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/stats" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/util" ) type FilerStore interface { diff --git a/weed/filer2/leveldb/leveldb_store.go b/weed/filer2/leveldb/leveldb_store.go index 3607f0d06..d00eba859 100644 --- a/weed/filer2/leveldb/leveldb_store.go +++ b/weed/filer2/leveldb/leveldb_store.go @@ -5,9 +5,9 @@ import ( "context" "fmt" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" - weed_util "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" + weed_util "github.com/chrislusf/seaweedfs/weed/util" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/opt" leveldb_util "github.com/syndtr/goleveldb/leveldb/util" diff --git a/weed/filer2/leveldb/leveldb_store_test.go b/weed/filer2/leveldb/leveldb_store_test.go index 7ac9c888f..904de8c97 100644 --- a/weed/filer2/leveldb/leveldb_store_test.go +++ b/weed/filer2/leveldb/leveldb_store_test.go @@ -2,7 +2,7 @@ package leveldb import ( "context" - "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/filer2" "io/ioutil" "os" "testing" diff --git a/weed/filer2/leveldb2/leveldb2_store.go b/weed/filer2/leveldb2/leveldb2_store.go index e70a9e223..4b47d2eb3 100644 --- a/weed/filer2/leveldb2/leveldb2_store.go +++ b/weed/filer2/leveldb2/leveldb2_store.go @@ -8,9 +8,9 @@ import ( "io" "os" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" - weed_util "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" + weed_util "github.com/chrislusf/seaweedfs/weed/util" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/opt" leveldb_util "github.com/syndtr/goleveldb/leveldb/util" diff --git a/weed/filer2/leveldb2/leveldb2_store_test.go b/weed/filer2/leveldb2/leveldb2_store_test.go index 39886c7ce..e28ef7dac 100644 --- a/weed/filer2/leveldb2/leveldb2_store_test.go +++ b/weed/filer2/leveldb2/leveldb2_store_test.go @@ -2,7 +2,7 @@ package leveldb import ( "context" - "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/filer2" "io/ioutil" "os" "testing" diff --git a/weed/filer2/memdb/memdb_store.go b/weed/filer2/memdb/memdb_store.go index 673599a6b..9c10a5472 100644 --- a/weed/filer2/memdb/memdb_store.go +++ b/weed/filer2/memdb/memdb_store.go @@ -3,8 +3,8 @@ package memdb import ( "context" "fmt" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/google/btree" "strings" "sync" diff --git a/weed/filer2/memdb/memdb_store_test.go b/weed/filer2/memdb/memdb_store_test.go index dfaa8555b..3fd806aeb 100644 --- a/weed/filer2/memdb/memdb_store_test.go +++ b/weed/filer2/memdb/memdb_store_test.go @@ -2,7 +2,7 @@ package memdb import ( "context" - "github.com/joeslay/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/filer2" "testing" ) diff --git a/weed/filer2/mysql/mysql_store.go b/weed/filer2/mysql/mysql_store.go index 985ea64bf..e18299bd2 100644 --- a/weed/filer2/mysql/mysql_store.go +++ b/weed/filer2/mysql/mysql_store.go @@ -4,9 +4,9 @@ import ( "database/sql" "fmt" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/filer2/abstract_sql" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/filer2/abstract_sql" + "github.com/chrislusf/seaweedfs/weed/util" _ "github.com/go-sql-driver/mysql" ) diff --git a/weed/filer2/postgres/postgres_store.go b/weed/filer2/postgres/postgres_store.go index 63d4f0cb2..ffd3d1e01 100644 --- a/weed/filer2/postgres/postgres_store.go +++ b/weed/filer2/postgres/postgres_store.go @@ -4,9 +4,9 @@ import ( "database/sql" "fmt" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/filer2/abstract_sql" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/filer2/abstract_sql" + "github.com/chrislusf/seaweedfs/weed/util" _ "github.com/lib/pq" ) diff --git a/weed/filer2/redis/redis_cluster_store.go b/weed/filer2/redis/redis_cluster_store.go index a8bbf3a32..11c315391 100644 --- a/weed/filer2/redis/redis_cluster_store.go +++ b/weed/filer2/redis/redis_cluster_store.go @@ -1,8 +1,8 @@ package redis import ( - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/go-redis/redis" ) diff --git a/weed/filer2/redis/redis_store.go b/weed/filer2/redis/redis_store.go index 3614f3226..c56fa014c 100644 --- a/weed/filer2/redis/redis_store.go +++ b/weed/filer2/redis/redis_store.go @@ -1,8 +1,8 @@ package redis import ( - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/go-redis/redis" ) diff --git a/weed/filer2/redis/universal_redis_store.go b/weed/filer2/redis/universal_redis_store.go index bd7a42da1..ce41d4d70 100644 --- a/weed/filer2/redis/universal_redis_store.go +++ b/weed/filer2/redis/universal_redis_store.go @@ -3,8 +3,8 @@ package redis import ( "context" "fmt" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" "github.com/go-redis/redis" "sort" "strings" diff --git a/weed/filer2/stream.go b/weed/filer2/stream.go index fc04c9a0e..01b87cad1 100644 --- a/weed/filer2/stream.go +++ b/weed/filer2/stream.go @@ -3,10 +3,10 @@ package filer2 import ( "io" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/util" - "github.com/joeslay/seaweedfs/weed/wdclient" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/wdclient" ) func StreamContent(masterClient *wdclient.MasterClient, w io.Writer, chunks []*filer_pb.FileChunk, offset int64, size int) error { diff --git a/weed/filesys/dir.go b/weed/filesys/dir.go index 48c75d809..79cf45385 100644 --- a/weed/filesys/dir.go +++ b/weed/filesys/dir.go @@ -6,9 +6,9 @@ import ( "path" "time" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/seaweedfs/fuse" "github.com/seaweedfs/fuse/fs" ) diff --git a/weed/filesys/dir_link.go b/weed/filesys/dir_link.go index ded6138c4..94e443649 100644 --- a/weed/filesys/dir_link.go +++ b/weed/filesys/dir_link.go @@ -6,8 +6,8 @@ import ( "syscall" "time" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/seaweedfs/fuse" "github.com/seaweedfs/fuse/fs" ) diff --git a/weed/filesys/dir_rename.go b/weed/filesys/dir_rename.go index 24bff770b..e72a15758 100644 --- a/weed/filesys/dir_rename.go +++ b/weed/filesys/dir_rename.go @@ -3,7 +3,7 @@ package filesys import ( "context" "fmt" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/seaweedfs/fuse" "github.com/seaweedfs/fuse/fs" ) diff --git a/weed/filesys/dirty_page.go b/weed/filesys/dirty_page.go index f9718c93f..baee412b2 100644 --- a/weed/filesys/dirty_page.go +++ b/weed/filesys/dirty_page.go @@ -8,10 +8,10 @@ import ( "sync/atomic" "time" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/security" ) type ContinuousDirtyPages struct { diff --git a/weed/filesys/file.go b/weed/filesys/file.go index a0dac36dd..1b359ebbe 100644 --- a/weed/filesys/file.go +++ b/weed/filesys/file.go @@ -7,9 +7,9 @@ import ( "sort" "time" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/seaweedfs/fuse" "github.com/seaweedfs/fuse/fs" ) diff --git a/weed/filesys/filehandle.go b/weed/filesys/filehandle.go index 59e1705ae..1f4754dd1 100644 --- a/weed/filesys/filehandle.go +++ b/weed/filesys/filehandle.go @@ -7,9 +7,9 @@ import ( "path" "time" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/gabriel-vasile/mimetype" "github.com/seaweedfs/fuse" "github.com/seaweedfs/fuse/fs" diff --git a/weed/filesys/wfs.go b/weed/filesys/wfs.go index 215201040..1bd9b5cc9 100644 --- a/weed/filesys/wfs.go +++ b/weed/filesys/wfs.go @@ -8,9 +8,9 @@ import ( "sync" "time" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/karlseguin/ccache" "github.com/seaweedfs/fuse" "github.com/seaweedfs/fuse/fs" diff --git a/weed/filesys/wfs_deletion.go b/weed/filesys/wfs_deletion.go index b1bd53e7b..6e586b7df 100644 --- a/weed/filesys/wfs_deletion.go +++ b/weed/filesys/wfs_deletion.go @@ -3,10 +3,10 @@ package filesys import ( "context" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "google.golang.org/grpc" ) diff --git a/weed/images/resizing.go b/weed/images/resizing.go index 81d9e20c8..ff0eff5e1 100644 --- a/weed/images/resizing.go +++ b/weed/images/resizing.go @@ -7,7 +7,7 @@ import ( "image/jpeg" "image/png" - "github.com/joeslay/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/glog" "github.com/disintegration/imaging" "io" ) diff --git a/weed/notification/aws_sqs/aws_sqs_pub.go b/weed/notification/aws_sqs/aws_sqs_pub.go index 1ddd51af5..c1af7f27a 100644 --- a/weed/notification/aws_sqs/aws_sqs_pub.go +++ b/weed/notification/aws_sqs/aws_sqs_pub.go @@ -8,9 +8,9 @@ import ( "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/sqs" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/notification" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/notification" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/golang/protobuf/proto" ) diff --git a/weed/notification/configuration.go b/weed/notification/configuration.go index a8f992660..7f8765cc3 100644 --- a/weed/notification/configuration.go +++ b/weed/notification/configuration.go @@ -1,8 +1,8 @@ package notification import ( - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/golang/protobuf/proto" "github.com/spf13/viper" ) diff --git a/weed/notification/gocdk_pub_sub/gocdk_pub_sub.go b/weed/notification/gocdk_pub_sub/gocdk_pub_sub.go index 5a8fac51f..ebf44ea6f 100644 --- a/weed/notification/gocdk_pub_sub/gocdk_pub_sub.go +++ b/weed/notification/gocdk_pub_sub/gocdk_pub_sub.go @@ -18,9 +18,9 @@ import ( "context" "fmt" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/notification" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/notification" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/golang/protobuf/proto" "gocloud.dev/pubsub" _ "gocloud.dev/pubsub/awssnssqs" diff --git a/weed/notification/google_pub_sub/google_pub_sub.go b/weed/notification/google_pub_sub/google_pub_sub.go index fe4399120..7b26bfe38 100644 --- a/weed/notification/google_pub_sub/google_pub_sub.go +++ b/weed/notification/google_pub_sub/google_pub_sub.go @@ -6,9 +6,9 @@ import ( "os" "cloud.google.com/go/pubsub" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/notification" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/notification" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/golang/protobuf/proto" "google.golang.org/api/option" ) diff --git a/weed/notification/kafka/kafka_queue.go b/weed/notification/kafka/kafka_queue.go index eba5260c9..830709a51 100644 --- a/weed/notification/kafka/kafka_queue.go +++ b/weed/notification/kafka/kafka_queue.go @@ -2,9 +2,9 @@ package kafka import ( "github.com/Shopify/sarama" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/notification" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/notification" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/golang/protobuf/proto" ) diff --git a/weed/notification/log/log_queue.go b/weed/notification/log/log_queue.go index ca15fa4af..dcc038dfc 100644 --- a/weed/notification/log/log_queue.go +++ b/weed/notification/log/log_queue.go @@ -1,9 +1,9 @@ package kafka import ( - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/notification" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/notification" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/golang/protobuf/proto" ) diff --git a/weed/operation/assign_file_id.go b/weed/operation/assign_file_id.go index dbc2b3986..4c50eaa26 100644 --- a/weed/operation/assign_file_id.go +++ b/weed/operation/assign_file_id.go @@ -3,9 +3,9 @@ package operation import ( "context" "fmt" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/security" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/util" "google.golang.org/grpc" "strings" ) diff --git a/weed/operation/chunked_file.go b/weed/operation/chunked_file.go index 6c0442693..295204dd8 100644 --- a/weed/operation/chunked_file.go +++ b/weed/operation/chunked_file.go @@ -13,8 +13,8 @@ import ( "sync" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/util" ) var ( diff --git a/weed/operation/delete_content.go b/weed/operation/delete_content.go index fbacdac4d..6d84be76f 100644 --- a/weed/operation/delete_content.go +++ b/weed/operation/delete_content.go @@ -4,8 +4,8 @@ import ( "context" "errors" "fmt" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" "google.golang.org/grpc" "net/http" "strings" diff --git a/weed/operation/grpc_client.go b/weed/operation/grpc_client.go index 1eb493115..f6b2b69e9 100644 --- a/weed/operation/grpc_client.go +++ b/weed/operation/grpc_client.go @@ -3,10 +3,10 @@ package operation import ( "context" "fmt" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/util" "google.golang.org/grpc" "strconv" "strings" diff --git a/weed/operation/lookup.go b/weed/operation/lookup.go index 7a876d543..d0773e7fd 100644 --- a/weed/operation/lookup.go +++ b/weed/operation/lookup.go @@ -11,8 +11,8 @@ import ( "strings" "time" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/util" ) type Location struct { diff --git a/weed/operation/lookup_vid_cache.go b/weed/operation/lookup_vid_cache.go index 181d2d1bf..ccc1f2beb 100644 --- a/weed/operation/lookup_vid_cache.go +++ b/weed/operation/lookup_vid_cache.go @@ -6,7 +6,7 @@ import ( "sync" "time" - "github.com/joeslay/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) var ErrorNotFound = errors.New("not found") diff --git a/weed/operation/stats.go b/weed/operation/stats.go index 432c95376..b69a33750 100644 --- a/weed/operation/stats.go +++ b/weed/operation/stats.go @@ -4,7 +4,7 @@ import ( "context" "google.golang.org/grpc" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" ) func Statistics(server string, grpcDialOption grpc.DialOption, req *master_pb.StatisticsRequest) (resp *master_pb.StatisticsResponse, err error) { diff --git a/weed/operation/submit.go b/weed/operation/submit.go index 12be0262d..bdf59d966 100644 --- a/weed/operation/submit.go +++ b/weed/operation/submit.go @@ -11,8 +11,8 @@ import ( "strconv" "strings" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/security" ) type FilePart struct { diff --git a/weed/operation/sync_volume.go b/weed/operation/sync_volume.go index 79436440c..5562f12ab 100644 --- a/weed/operation/sync_volume.go +++ b/weed/operation/sync_volume.go @@ -2,7 +2,7 @@ package operation import ( "context" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" "google.golang.org/grpc" ) diff --git a/weed/operation/tail_volume.go b/weed/operation/tail_volume.go index 5298233bc..b53f18ce1 100644 --- a/weed/operation/tail_volume.go +++ b/weed/operation/tail_volume.go @@ -5,8 +5,8 @@ import ( "fmt" "io" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/storage/needle" "google.golang.org/grpc" ) diff --git a/weed/operation/upload_content.go b/weed/operation/upload_content.go index 68d6d7a75..c387d0230 100644 --- a/weed/operation/upload_content.go +++ b/weed/operation/upload_content.go @@ -16,9 +16,9 @@ import ( "path/filepath" "strings" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/security" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/util" ) type UploadResult struct { diff --git a/weed/pb/filer_pb/filer_pb_helper.go b/weed/pb/filer_pb/filer_pb_helper.go index 86e9f719e..5c40332e6 100644 --- a/weed/pb/filer_pb/filer_pb_helper.go +++ b/weed/pb/filer_pb/filer_pb_helper.go @@ -1,7 +1,7 @@ package filer_pb import ( - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) func toFileIdObject(fileIdStr string) (*FileId, error) { diff --git a/weed/replication/replicator.go b/weed/replication/replicator.go index 1b868defc..7353cdc91 100644 --- a/weed/replication/replicator.go +++ b/weed/replication/replicator.go @@ -6,11 +6,11 @@ import ( "path/filepath" "strings" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/replication/sink" - "github.com/joeslay/seaweedfs/weed/replication/source" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "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" ) type Replicator struct { diff --git a/weed/replication/sink/azuresink/azure_sink.go b/weed/replication/sink/azuresink/azure_sink.go index c64d3c4f1..6381908a1 100644 --- a/weed/replication/sink/azuresink/azure_sink.go +++ b/weed/replication/sink/azuresink/azure_sink.go @@ -8,12 +8,12 @@ import ( "strings" "github.com/Azure/azure-storage-blob-go/azblob" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/replication/sink" - "github.com/joeslay/seaweedfs/weed/replication/source" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" + "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" ) type AzureSink struct { diff --git a/weed/replication/sink/b2sink/b2_sink.go b/weed/replication/sink/b2sink/b2_sink.go index 14cc0b12f..35c2230fa 100644 --- a/weed/replication/sink/b2sink/b2_sink.go +++ b/weed/replication/sink/b2sink/b2_sink.go @@ -4,11 +4,11 @@ import ( "context" "strings" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/replication/sink" - "github.com/joeslay/seaweedfs/weed/replication/source" - "github.com/joeslay/seaweedfs/weed/util" + "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/kurin/blazer/b2" ) diff --git a/weed/replication/sink/filersink/fetch_write.go b/weed/replication/sink/filersink/fetch_write.go index c167707c0..97e9671a3 100644 --- a/weed/replication/sink/filersink/fetch_write.go +++ b/weed/replication/sink/filersink/fetch_write.go @@ -7,11 +7,11 @@ import ( "strings" "sync" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/security" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/util" ) func (fs *FilerSink) replicateChunks(ctx context.Context, sourceChunks []*filer_pb.FileChunk) (replicatedChunks []*filer_pb.FileChunk, err error) { diff --git a/weed/replication/sink/filersink/filer_sink.go b/weed/replication/sink/filersink/filer_sink.go index ce88ba63a..f99c7fdf6 100644 --- a/weed/replication/sink/filersink/filer_sink.go +++ b/weed/replication/sink/filersink/filer_sink.go @@ -3,16 +3,16 @@ package filersink import ( "context" "fmt" - "github.com/joeslay/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/security" "github.com/spf13/viper" "google.golang.org/grpc" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/replication/sink" - "github.com/joeslay/seaweedfs/weed/replication/source" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" + "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" ) type FilerSink struct { diff --git a/weed/replication/sink/gcssink/gcs_sink.go b/weed/replication/sink/gcssink/gcs_sink.go index 48bdea3a9..abd7c49b9 100644 --- a/weed/replication/sink/gcssink/gcs_sink.go +++ b/weed/replication/sink/gcssink/gcs_sink.go @@ -6,12 +6,12 @@ import ( "os" "cloud.google.com/go/storage" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/replication/sink" - "github.com/joeslay/seaweedfs/weed/replication/source" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" + "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" "google.golang.org/api/option" ) diff --git a/weed/replication/sink/replication_sink.go b/weed/replication/sink/replication_sink.go index fcf604c79..dd54f0005 100644 --- a/weed/replication/sink/replication_sink.go +++ b/weed/replication/sink/replication_sink.go @@ -2,9 +2,9 @@ package sink import ( "context" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/replication/source" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/replication/source" + "github.com/chrislusf/seaweedfs/weed/util" ) type ReplicationSink interface { diff --git a/weed/replication/sink/s3sink/s3_sink.go b/weed/replication/sink/s3sink/s3_sink.go index 80a898239..d5cad3541 100644 --- a/weed/replication/sink/s3sink/s3_sink.go +++ b/weed/replication/sink/s3sink/s3_sink.go @@ -11,12 +11,12 @@ import ( "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3" "github.com/aws/aws-sdk-go/service/s3/s3iface" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/replication/sink" - "github.com/joeslay/seaweedfs/weed/replication/source" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" + "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" ) type S3Sink struct { diff --git a/weed/replication/sink/s3sink/s3_write.go b/weed/replication/sink/s3sink/s3_write.go index 80a54d1e8..0a190b27d 100644 --- a/weed/replication/sink/s3sink/s3_write.go +++ b/weed/replication/sink/s3sink/s3_write.go @@ -9,10 +9,10 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/s3" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" ) func (s3sink *S3Sink) deleteObject(key string) error { diff --git a/weed/replication/source/filer_source.go b/weed/replication/source/filer_source.go index 27729acaf..d7b5ebc4d 100644 --- a/weed/replication/source/filer_source.go +++ b/weed/replication/source/filer_source.go @@ -3,16 +3,16 @@ package source import ( "context" "fmt" - "github.com/joeslay/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/security" "github.com/spf13/viper" "google.golang.org/grpc" "io" "net/http" "strings" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" ) type ReplicationSource interface { diff --git a/weed/replication/sub/notification_aws_sqs.go b/weed/replication/sub/notification_aws_sqs.go index 5f5d79de9..f0100f4de 100644 --- a/weed/replication/sub/notification_aws_sqs.go +++ b/weed/replication/sub/notification_aws_sqs.go @@ -8,9 +8,9 @@ import ( "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/sqs" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/golang/protobuf/proto" ) diff --git a/weed/replication/sub/notification_gocdk_pub_sub.go b/weed/replication/sub/notification_gocdk_pub_sub.go index 96516ea71..eddba9ff8 100644 --- a/weed/replication/sub/notification_gocdk_pub_sub.go +++ b/weed/replication/sub/notification_gocdk_pub_sub.go @@ -3,9 +3,9 @@ package sub import ( "context" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/golang/protobuf/proto" "gocloud.dev/pubsub" _ "gocloud.dev/pubsub/awssnssqs" diff --git a/weed/replication/sub/notification_google_pub_sub.go b/weed/replication/sub/notification_google_pub_sub.go index a3d9f43f0..ad6b42a2e 100644 --- a/weed/replication/sub/notification_google_pub_sub.go +++ b/weed/replication/sub/notification_google_pub_sub.go @@ -6,9 +6,9 @@ import ( "os" "cloud.google.com/go/pubsub" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/golang/protobuf/proto" "google.golang.org/api/option" ) diff --git a/weed/replication/sub/notification_kafka.go b/weed/replication/sub/notification_kafka.go index dbf1fd130..1a86a8307 100644 --- a/weed/replication/sub/notification_kafka.go +++ b/weed/replication/sub/notification_kafka.go @@ -8,9 +8,9 @@ import ( "time" "github.com/Shopify/sarama" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/golang/protobuf/proto" ) diff --git a/weed/replication/sub/notifications.go b/weed/replication/sub/notifications.go index 106812b37..66fbef824 100644 --- a/weed/replication/sub/notifications.go +++ b/weed/replication/sub/notifications.go @@ -1,8 +1,8 @@ package sub import ( - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" ) type NotificationInput interface { diff --git a/weed/s3api/filer_multipart.go b/weed/s3api/filer_multipart.go index af665e9c5..c8fe05645 100644 --- a/weed/s3api/filer_multipart.go +++ b/weed/s3api/filer_multipart.go @@ -11,9 +11,9 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/s3" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/satori/go.uuid" ) diff --git a/weed/s3api/filer_util.go b/weed/s3api/filer_util.go index 3178d37cc..1c3814fce 100644 --- a/weed/s3api/filer_util.go +++ b/weed/s3api/filer_util.go @@ -7,8 +7,8 @@ import ( "strings" "time" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" ) func (s3a *S3ApiServer) mkdir(ctx context.Context, parentDirectoryPath string, dirName string, fn func(entry *filer_pb.Entry)) error { diff --git a/weed/s3api/s3api_bucket_handlers.go b/weed/s3api/s3api_bucket_handlers.go index 6951a41dc..492d94616 100644 --- a/weed/s3api/s3api_bucket_handlers.go +++ b/weed/s3api/s3api_bucket_handlers.go @@ -11,8 +11,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/s3" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/gorilla/mux" ) diff --git a/weed/s3api/s3api_handlers.go b/weed/s3api/s3api_handlers.go index 470022711..127be07e3 100644 --- a/weed/s3api/s3api_handlers.go +++ b/weed/s3api/s3api_handlers.go @@ -6,9 +6,9 @@ import ( "encoding/base64" "encoding/xml" "fmt" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" "google.golang.org/grpc" "net/http" "net/url" diff --git a/weed/s3api/s3api_object_handlers.go b/weed/s3api/s3api_object_handlers.go index bd780da31..44e93d297 100644 --- a/weed/s3api/s3api_object_handlers.go +++ b/weed/s3api/s3api_object_handlers.go @@ -9,8 +9,8 @@ import ( "net/http" "strings" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/server" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/server" "github.com/gorilla/mux" ) diff --git a/weed/s3api/s3api_objects_list_handlers.go b/weed/s3api/s3api_objects_list_handlers.go index 156968194..4053913fb 100644 --- a/weed/s3api/s3api_objects_list_handlers.go +++ b/weed/s3api/s3api_objects_list_handlers.go @@ -10,9 +10,9 @@ import ( "strings" "time" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/gorilla/mux" ) diff --git a/weed/s3api/s3api_server.go b/weed/s3api/s3api_server.go index 69d3ae2c2..24458592d 100644 --- a/weed/s3api/s3api_server.go +++ b/weed/s3api/s3api_server.go @@ -1,12 +1,12 @@ package s3api import ( - _ "github.com/joeslay/seaweedfs/weed/filer2/cassandra" - _ "github.com/joeslay/seaweedfs/weed/filer2/leveldb" - _ "github.com/joeslay/seaweedfs/weed/filer2/memdb" - _ "github.com/joeslay/seaweedfs/weed/filer2/mysql" - _ "github.com/joeslay/seaweedfs/weed/filer2/postgres" - _ "github.com/joeslay/seaweedfs/weed/filer2/redis" + _ "github.com/chrislusf/seaweedfs/weed/filer2/cassandra" + _ "github.com/chrislusf/seaweedfs/weed/filer2/leveldb" + _ "github.com/chrislusf/seaweedfs/weed/filer2/memdb" + _ "github.com/chrislusf/seaweedfs/weed/filer2/mysql" + _ "github.com/chrislusf/seaweedfs/weed/filer2/postgres" + _ "github.com/chrislusf/seaweedfs/weed/filer2/redis" "github.com/gorilla/mux" "google.golang.org/grpc" "net/http" diff --git a/weed/security/guard.go b/weed/security/guard.go index c53b5648e..17fe2ea9e 100644 --- a/weed/security/guard.go +++ b/weed/security/guard.go @@ -7,7 +7,7 @@ import ( "net/http" "strings" - "github.com/joeslay/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) var ( diff --git a/weed/security/jwt.go b/weed/security/jwt.go index b8933a08c..0bd7fa974 100644 --- a/weed/security/jwt.go +++ b/weed/security/jwt.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/joeslay/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/glog" jwt "github.com/dgrijalva/jwt-go" ) diff --git a/weed/security/tls.go b/weed/security/tls.go index 4c26d1b85..e81ba4831 100644 --- a/weed/security/tls.go +++ b/weed/security/tls.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/viper" "io/ioutil" - "github.com/joeslay/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/glog" "google.golang.org/grpc" "google.golang.org/grpc/credentials" ) diff --git a/weed/server/common.go b/weed/server/common.go index d0da54bac..d50c283f2 100644 --- a/weed/server/common.go +++ b/weed/server/common.go @@ -11,15 +11,15 @@ import ( "strings" "time" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/storage/needle" "google.golang.org/grpc" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/stats" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/util" - _ "github.com/joeslay/seaweedfs/weed/statik" + _ "github.com/chrislusf/seaweedfs/weed/statik" "github.com/gorilla/mux" statik "github.com/rakyll/statik/fs" ) diff --git a/weed/server/filer_grpc_server.go b/weed/server/filer_grpc_server.go index 84f6855aa..9c35e8846 100644 --- a/weed/server/filer_grpc_server.go +++ b/weed/server/filer_grpc_server.go @@ -9,11 +9,11 @@ import ( "strings" "time" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" ) func (fs *FilerServer) LookupDirectoryEntry(ctx context.Context, req *filer_pb.LookupDirectoryEntryRequest) (*filer_pb.LookupDirectoryEntryResponse, error) { diff --git a/weed/server/filer_grpc_server_rename.go b/weed/server/filer_grpc_server_rename.go index 6bf1baf28..dfa59e7fe 100644 --- a/weed/server/filer_grpc_server_rename.go +++ b/weed/server/filer_grpc_server_rename.go @@ -3,9 +3,9 @@ package weed_server import ( "context" "fmt" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "path/filepath" ) diff --git a/weed/server/filer_server.go b/weed/server/filer_server.go index 2cce03cee..f2dec9346 100644 --- a/weed/server/filer_server.go +++ b/weed/server/filer_server.go @@ -7,29 +7,29 @@ import ( "os" "time" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/stats" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/util" "google.golang.org/grpc" - "github.com/joeslay/seaweedfs/weed/filer2" - _ "github.com/joeslay/seaweedfs/weed/filer2/cassandra" - _ "github.com/joeslay/seaweedfs/weed/filer2/etcd" - _ "github.com/joeslay/seaweedfs/weed/filer2/leveldb" - _ "github.com/joeslay/seaweedfs/weed/filer2/leveldb2" - _ "github.com/joeslay/seaweedfs/weed/filer2/memdb" - _ "github.com/joeslay/seaweedfs/weed/filer2/mysql" - _ "github.com/joeslay/seaweedfs/weed/filer2/postgres" - _ "github.com/joeslay/seaweedfs/weed/filer2/redis" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/notification" - _ "github.com/joeslay/seaweedfs/weed/notification/aws_sqs" - _ "github.com/joeslay/seaweedfs/weed/notification/gocdk_pub_sub" - _ "github.com/joeslay/seaweedfs/weed/notification/google_pub_sub" - _ "github.com/joeslay/seaweedfs/weed/notification/kafka" - _ "github.com/joeslay/seaweedfs/weed/notification/log" - "github.com/joeslay/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/filer2" + _ "github.com/chrislusf/seaweedfs/weed/filer2/cassandra" + _ "github.com/chrislusf/seaweedfs/weed/filer2/etcd" + _ "github.com/chrislusf/seaweedfs/weed/filer2/leveldb" + _ "github.com/chrislusf/seaweedfs/weed/filer2/leveldb2" + _ "github.com/chrislusf/seaweedfs/weed/filer2/memdb" + _ "github.com/chrislusf/seaweedfs/weed/filer2/mysql" + _ "github.com/chrislusf/seaweedfs/weed/filer2/postgres" + _ "github.com/chrislusf/seaweedfs/weed/filer2/redis" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/notification" + _ "github.com/chrislusf/seaweedfs/weed/notification/aws_sqs" + _ "github.com/chrislusf/seaweedfs/weed/notification/gocdk_pub_sub" + _ "github.com/chrislusf/seaweedfs/weed/notification/google_pub_sub" + _ "github.com/chrislusf/seaweedfs/weed/notification/kafka" + _ "github.com/chrislusf/seaweedfs/weed/notification/log" + "github.com/chrislusf/seaweedfs/weed/security" "github.com/spf13/viper" ) diff --git a/weed/server/filer_server_handlers.go b/weed/server/filer_server_handlers.go index 1b3547109..b6bfc3b04 100644 --- a/weed/server/filer_server_handlers.go +++ b/weed/server/filer_server_handlers.go @@ -4,7 +4,7 @@ import ( "net/http" "time" - "github.com/joeslay/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/stats" ) func (fs *FilerServer) filerHandler(w http.ResponseWriter, r *http.Request) { diff --git a/weed/server/filer_server_handlers_read.go b/weed/server/filer_server_handlers_read.go index 6e221575f..0edf501a8 100644 --- a/weed/server/filer_server_handlers_read.go +++ b/weed/server/filer_server_handlers_read.go @@ -12,10 +12,10 @@ import ( "strconv" "strings" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/stats" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/util" ) func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request, isGetMethod bool) { diff --git a/weed/server/filer_server_handlers_read_dir.go b/weed/server/filer_server_handlers_read_dir.go index a1a934a57..87e864559 100644 --- a/weed/server/filer_server_handlers_read_dir.go +++ b/weed/server/filer_server_handlers_read_dir.go @@ -6,10 +6,10 @@ import ( "strconv" "strings" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" - ui "github.com/joeslay/seaweedfs/weed/server/filer_ui" - "github.com/joeslay/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" + ui "github.com/chrislusf/seaweedfs/weed/server/filer_ui" + "github.com/chrislusf/seaweedfs/weed/stats" ) // listDirectoryHandler lists directories and folers under a directory diff --git a/weed/server/filer_server_handlers_write.go b/weed/server/filer_server_handlers_write.go index d1032382b..b419c51af 100644 --- a/weed/server/filer_server_handlers_write.go +++ b/weed/server/filer_server_handlers_write.go @@ -16,13 +16,13 @@ import ( "strings" "time" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/security" - "github.com/joeslay/seaweedfs/weed/stats" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/util" ) var ( diff --git a/weed/server/filer_server_handlers_write_autochunk.go b/weed/server/filer_server_handlers_write_autochunk.go index d89716f0e..492b55943 100644 --- a/weed/server/filer_server_handlers_write_autochunk.go +++ b/weed/server/filer_server_handlers_write_autochunk.go @@ -11,13 +11,13 @@ import ( "strings" "time" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/security" - "github.com/joeslay/seaweedfs/weed/stats" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/util" ) func (fs *FilerServer) autoChunk(ctx context.Context, w http.ResponseWriter, r *http.Request, diff --git a/weed/server/master_grpc_server.go b/weed/server/master_grpc_server.go index 899d6d5f3..6fa509e77 100644 --- a/weed/server/master_grpc_server.go +++ b/weed/server/master_grpc_server.go @@ -7,10 +7,10 @@ import ( "time" "github.com/chrislusf/raft" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/storage/needle" - "github.com/joeslay/seaweedfs/weed/topology" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/topology" "google.golang.org/grpc/peer" ) diff --git a/weed/server/master_grpc_server_collection.go b/weed/server/master_grpc_server_collection.go index 278acfe59..a50cfa192 100644 --- a/weed/server/master_grpc_server_collection.go +++ b/weed/server/master_grpc_server_collection.go @@ -4,9 +4,9 @@ import ( "context" "github.com/chrislusf/raft" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" ) func (ms *MasterServer) CollectionList(ctx context.Context, req *master_pb.CollectionListRequest) (*master_pb.CollectionListResponse, error) { diff --git a/weed/server/master_grpc_server_volume.go b/weed/server/master_grpc_server_volume.go index b94895798..16ce5356a 100644 --- a/weed/server/master_grpc_server_volume.go +++ b/weed/server/master_grpc_server_volume.go @@ -5,11 +5,11 @@ import ( "fmt" "github.com/chrislusf/raft" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/security" - "github.com/joeslay/seaweedfs/weed/storage" - "github.com/joeslay/seaweedfs/weed/storage/needle" - "github.com/joeslay/seaweedfs/weed/topology" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/topology" ) func (ms *MasterServer) LookupVolume(ctx context.Context, req *master_pb.LookupVolumeRequest) (*master_pb.LookupVolumeResponse, error) { diff --git a/weed/server/master_server.go b/weed/server/master_server.go index c928a5357..e9eb32cca 100644 --- a/weed/server/master_server.go +++ b/weed/server/master_server.go @@ -3,8 +3,8 @@ package weed_server import ( "context" "fmt" - "github.com/joeslay/seaweedfs/weed/shell" - "github.com/joeslay/seaweedfs/weed/wdclient" + "github.com/chrislusf/seaweedfs/weed/shell" + "github.com/chrislusf/seaweedfs/weed/wdclient" "google.golang.org/grpc" "net/http" "net/http/httputil" @@ -17,12 +17,12 @@ import ( "time" "github.com/chrislusf/raft" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/security" - "github.com/joeslay/seaweedfs/weed/sequence" - "github.com/joeslay/seaweedfs/weed/topology" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/sequence" + "github.com/chrislusf/seaweedfs/weed/topology" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/gorilla/mux" "github.com/spf13/viper" ) diff --git a/weed/server/master_server_handlers.go b/weed/server/master_server_handlers.go index fd60e9615..93f983375 100644 --- a/weed/server/master_server_handlers.go +++ b/weed/server/master_server_handlers.go @@ -6,10 +6,10 @@ import ( "strconv" "strings" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/security" - "github.com/joeslay/seaweedfs/weed/stats" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) func (ms *MasterServer) lookupVolumeId(vids []string, collection string) (volumeLocations map[string]operation.LookupResult) { diff --git a/weed/server/master_server_handlers_admin.go b/weed/server/master_server_handlers_admin.go index 553bfd181..2acde740e 100644 --- a/weed/server/master_server_handlers_admin.go +++ b/weed/server/master_server_handlers_admin.go @@ -8,13 +8,13 @@ import ( "net/http" "strconv" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/storage" - "github.com/joeslay/seaweedfs/weed/storage/needle" - "github.com/joeslay/seaweedfs/weed/topology" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/topology" + "github.com/chrislusf/seaweedfs/weed/util" ) func (ms *MasterServer) collectionDeleteHandler(w http.ResponseWriter, r *http.Request) { diff --git a/weed/server/master_server_handlers_ui.go b/weed/server/master_server_handlers_ui.go index 0c40f6e14..f241df87f 100644 --- a/weed/server/master_server_handlers_ui.go +++ b/weed/server/master_server_handlers_ui.go @@ -4,9 +4,9 @@ import ( "net/http" "github.com/chrislusf/raft" - ui "github.com/joeslay/seaweedfs/weed/server/master_ui" - "github.com/joeslay/seaweedfs/weed/stats" - "github.com/joeslay/seaweedfs/weed/util" + ui "github.com/chrislusf/seaweedfs/weed/server/master_ui" + "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/util" ) func (ms *MasterServer) uiStatusHandler(w http.ResponseWriter, r *http.Request) { diff --git a/weed/server/raft_server.go b/weed/server/raft_server.go index 0f10fcc55..88320ed98 100644 --- a/weed/server/raft_server.go +++ b/weed/server/raft_server.go @@ -2,7 +2,7 @@ package weed_server import ( "encoding/json" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/util" "google.golang.org/grpc" "io/ioutil" "os" @@ -12,8 +12,8 @@ import ( "time" "github.com/chrislusf/raft" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/topology" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/topology" ) type RaftServer struct { diff --git a/weed/server/volume_grpc_admin.go b/weed/server/volume_grpc_admin.go index 4118437b6..ad7920161 100644 --- a/weed/server/volume_grpc_admin.go +++ b/weed/server/volume_grpc_admin.go @@ -3,9 +3,9 @@ package weed_server import ( "context" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) func (vs *VolumeServer) DeleteCollection(ctx context.Context, req *volume_server_pb.DeleteCollectionRequest) (*volume_server_pb.DeleteCollectionResponse, error) { diff --git a/weed/server/volume_grpc_batch_delete.go b/weed/server/volume_grpc_batch_delete.go index 35c7dd9d6..fdb7937d2 100644 --- a/weed/server/volume_grpc_batch_delete.go +++ b/weed/server/volume_grpc_batch_delete.go @@ -5,9 +5,9 @@ import ( "net/http" "time" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) func (vs *VolumeServer) BatchDelete(ctx context.Context, req *volume_server_pb.BatchDeleteRequest) (*volume_server_pb.BatchDeleteResponse, error) { diff --git a/weed/server/volume_grpc_client_to_master.go b/weed/server/volume_grpc_client_to_master.go index 1f25502cd..731675b48 100644 --- a/weed/server/volume_grpc_client_to_master.go +++ b/weed/server/volume_grpc_client_to_master.go @@ -5,14 +5,14 @@ import ( "net" "time" - "github.com/joeslay/seaweedfs/weed/security" - "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" "github.com/spf13/viper" "google.golang.org/grpc" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/util" "golang.org/x/net/context" ) diff --git a/weed/server/volume_grpc_copy.go b/weed/server/volume_grpc_copy.go index c836b05f0..8b39146ee 100644 --- a/weed/server/volume_grpc_copy.go +++ b/weed/server/volume_grpc_copy.go @@ -9,13 +9,13 @@ import ( "path" "time" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/storage" - "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" - "github.com/joeslay/seaweedfs/weed/storage/needle" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/util" ) const BufferSizeLimit = 1024 * 1024 * 2 diff --git a/weed/server/volume_grpc_copy_incremental.go b/weed/server/volume_grpc_copy_incremental.go index eb3398322..f56fbeef4 100644 --- a/weed/server/volume_grpc_copy_incremental.go +++ b/weed/server/volume_grpc_copy_incremental.go @@ -6,8 +6,8 @@ import ( "io" "os" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) func (vs *VolumeServer) VolumeIncrementalCopy(req *volume_server_pb.VolumeIncrementalCopyRequest, stream volume_server_pb.VolumeServer_VolumeIncrementalCopyServer) error { diff --git a/weed/server/volume_grpc_erasure_coding.go b/weed/server/volume_grpc_erasure_coding.go index 65e59c683..8140a06f6 100644 --- a/weed/server/volume_grpc_erasure_coding.go +++ b/weed/server/volume_grpc_erasure_coding.go @@ -10,14 +10,14 @@ import ( "path" "strings" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/storage" - "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" - "github.com/joeslay/seaweedfs/weed/storage/needle" - "github.com/joeslay/seaweedfs/weed/storage/types" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/util" ) /* diff --git a/weed/server/volume_grpc_tail.go b/weed/server/volume_grpc_tail.go index 6803d5444..34c55a599 100644 --- a/weed/server/volume_grpc_tail.go +++ b/weed/server/volume_grpc_tail.go @@ -5,11 +5,11 @@ import ( "fmt" "time" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/storage" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) func (vs *VolumeServer) VolumeTailSender(req *volume_server_pb.VolumeTailSenderRequest, stream volume_server_pb.VolumeServer_VolumeTailSenderServer) error { diff --git a/weed/server/volume_grpc_vacuum.go b/weed/server/volume_grpc_vacuum.go index 205843496..24f982241 100644 --- a/weed/server/volume_grpc_vacuum.go +++ b/weed/server/volume_grpc_vacuum.go @@ -3,9 +3,9 @@ package weed_server import ( "context" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) func (vs *VolumeServer) VacuumVolumeCheck(ctx context.Context, req *volume_server_pb.VacuumVolumeCheckRequest) (*volume_server_pb.VacuumVolumeCheckResponse, error) { diff --git a/weed/server/volume_server.go b/weed/server/volume_server.go index 144fba8ac..6cf654738 100644 --- a/weed/server/volume_server.go +++ b/weed/server/volume_server.go @@ -4,12 +4,12 @@ import ( "fmt" "net/http" - "github.com/joeslay/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/stats" "google.golang.org/grpc" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/security" - "github.com/joeslay/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/storage" "github.com/spf13/viper" ) diff --git a/weed/server/volume_server_handlers.go b/weed/server/volume_server_handlers.go index a3eb910eb..14ad27d42 100644 --- a/weed/server/volume_server_handlers.go +++ b/weed/server/volume_server_handlers.go @@ -4,9 +4,9 @@ import ( "net/http" "strings" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/security" - "github.com/joeslay/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/stats" ) /* diff --git a/weed/server/volume_server_handlers_admin.go b/weed/server/volume_server_handlers_admin.go index 221bb1527..25b6582f7 100644 --- a/weed/server/volume_server_handlers_admin.go +++ b/weed/server/volume_server_handlers_admin.go @@ -4,9 +4,9 @@ import ( "net/http" "path/filepath" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/stats" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/util" ) func (vs *VolumeServer) statusHandler(w http.ResponseWriter, r *http.Request) { diff --git a/weed/server/volume_server_handlers_read.go b/weed/server/volume_server_handlers_read.go index 89f9bd9d3..f30ffefaf 100644 --- a/weed/server/volume_server_handlers_read.go +++ b/weed/server/volume_server_handlers_read.go @@ -16,12 +16,12 @@ import ( "encoding/json" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/images" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/stats" - "github.com/joeslay/seaweedfs/weed/storage/needle" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/images" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/util" ) var fileNameEscaper = strings.NewReplacer("\\", "\\\\", "\"", "\\\"") diff --git a/weed/server/volume_server_handlers_ui.go b/weed/server/volume_server_handlers_ui.go index 7fc70d8af..852f0b751 100644 --- a/weed/server/volume_server_handlers_ui.go +++ b/weed/server/volume_server_handlers_ui.go @@ -5,10 +5,10 @@ import ( "path/filepath" "time" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - ui "github.com/joeslay/seaweedfs/weed/server/volume_server_ui" - "github.com/joeslay/seaweedfs/weed/stats" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + ui "github.com/chrislusf/seaweedfs/weed/server/volume_server_ui" + "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/util" ) func (vs *VolumeServer) uiStatusHandler(w http.ResponseWriter, r *http.Request) { diff --git a/weed/server/volume_server_handlers_write.go b/weed/server/volume_server_handlers_write.go index d0b177c72..db8fcb555 100644 --- a/weed/server/volume_server_handlers_write.go +++ b/weed/server/volume_server_handlers_write.go @@ -9,11 +9,11 @@ import ( "strings" "time" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/stats" - "github.com/joeslay/seaweedfs/weed/storage/needle" - "github.com/joeslay/seaweedfs/weed/topology" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/topology" ) func (vs *VolumeServer) PostHandler(w http.ResponseWriter, r *http.Request) { diff --git a/weed/server/webdav_server.go b/weed/server/webdav_server.go index 7eed37485..151b48a78 100644 --- a/weed/server/webdav_server.go +++ b/weed/server/webdav_server.go @@ -10,15 +10,15 @@ import ( "strings" "time" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" "golang.org/x/net/webdav" "google.golang.org/grpc" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/security" "github.com/spf13/viper" ) diff --git a/weed/shell/command_collection_delete.go b/weed/shell/command_collection_delete.go index d18161376..fbaddcd51 100644 --- a/weed/shell/command_collection_delete.go +++ b/weed/shell/command_collection_delete.go @@ -3,7 +3,7 @@ package shell import ( "context" "fmt" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" "io" ) diff --git a/weed/shell/command_collection_list.go b/weed/shell/command_collection_list.go index 9607c9999..c4325c66f 100644 --- a/weed/shell/command_collection_list.go +++ b/weed/shell/command_collection_list.go @@ -3,7 +3,7 @@ package shell import ( "context" "fmt" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" "io" ) diff --git a/weed/shell/command_ec_balance.go b/weed/shell/command_ec_balance.go index 0ff2e3963..47ae7bad3 100644 --- a/weed/shell/command_ec_balance.go +++ b/weed/shell/command_ec_balance.go @@ -7,8 +7,8 @@ import ( "io" "sort" - "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) func init() { diff --git a/weed/shell/command_ec_common.go b/weed/shell/command_ec_common.go index c75e14feb..d0fe16a68 100644 --- a/weed/shell/command_ec_common.go +++ b/weed/shell/command_ec_common.go @@ -6,12 +6,12 @@ import ( "math" "sort" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" + "github.com/chrislusf/seaweedfs/weed/storage/needle" "google.golang.org/grpc" ) diff --git a/weed/shell/command_ec_encode.go b/weed/shell/command_ec_encode.go index 0dd3e0ea2..f07cb93f9 100644 --- a/weed/shell/command_ec_encode.go +++ b/weed/shell/command_ec_encode.go @@ -8,12 +8,12 @@ import ( "sync" "time" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" - "github.com/joeslay/seaweedfs/weed/storage/needle" - "github.com/joeslay/seaweedfs/weed/wdclient" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/wdclient" "google.golang.org/grpc" ) diff --git a/weed/shell/command_ec_rebuild.go b/weed/shell/command_ec_rebuild.go index 56bcd77bb..63b7c4088 100644 --- a/weed/shell/command_ec_rebuild.go +++ b/weed/shell/command_ec_rebuild.go @@ -6,10 +6,10 @@ import ( "fmt" "io" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" + "github.com/chrislusf/seaweedfs/weed/storage/needle" "google.golang.org/grpc" ) diff --git a/weed/shell/command_ec_test.go b/weed/shell/command_ec_test.go index d1a784821..9e578ed28 100644 --- a/weed/shell/command_ec_test.go +++ b/weed/shell/command_ec_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) func TestCommandEcBalanceSmall(t *testing.T) { diff --git a/weed/shell/command_fs_cat.go b/weed/shell/command_fs_cat.go index fdeda17de..66ced46c5 100644 --- a/weed/shell/command_fs_cat.go +++ b/weed/shell/command_fs_cat.go @@ -6,8 +6,8 @@ import ( "io" "math" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" ) func init() { diff --git a/weed/shell/command_fs_du.go b/weed/shell/command_fs_du.go index 678e05eeb..5e634c82a 100644 --- a/weed/shell/command_fs_du.go +++ b/weed/shell/command_fs_du.go @@ -3,9 +3,9 @@ package shell import ( "context" "fmt" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" "google.golang.org/grpc" "io" ) diff --git a/weed/shell/command_fs_ls.go b/weed/shell/command_fs_ls.go index 678f0b7a1..6979635e1 100644 --- a/weed/shell/command_fs_ls.go +++ b/weed/shell/command_fs_ls.go @@ -3,8 +3,8 @@ package shell import ( "context" "fmt" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "io" "os" "os/user" diff --git a/weed/shell/command_fs_meta_load.go b/weed/shell/command_fs_meta_load.go index 2146755fc..5ea8de9f5 100644 --- a/weed/shell/command_fs_meta_load.go +++ b/weed/shell/command_fs_meta_load.go @@ -6,9 +6,9 @@ import ( "io" "os" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/golang/protobuf/proto" ) diff --git a/weed/shell/command_fs_meta_notify.go b/weed/shell/command_fs_meta_notify.go index 5064b0033..13b272fbf 100644 --- a/weed/shell/command_fs_meta_notify.go +++ b/weed/shell/command_fs_meta_notify.go @@ -5,10 +5,10 @@ import ( "fmt" "io" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/notification" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/notification" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/spf13/viper" ) diff --git a/weed/shell/command_fs_meta_save.go b/weed/shell/command_fs_meta_save.go index e0d24e672..e710fe297 100644 --- a/weed/shell/command_fs_meta_save.go +++ b/weed/shell/command_fs_meta_save.go @@ -8,9 +8,9 @@ import ( "os" "time" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/golang/protobuf/proto" ) diff --git a/weed/shell/command_fs_mv.go b/weed/shell/command_fs_mv.go index d1f04a851..67606ab53 100644 --- a/weed/shell/command_fs_mv.go +++ b/weed/shell/command_fs_mv.go @@ -6,8 +6,8 @@ import ( "io" "path/filepath" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" ) func init() { diff --git a/weed/shell/command_fs_tree.go b/weed/shell/command_fs_tree.go index c75c7d11f..8474e43ea 100644 --- a/weed/shell/command_fs_tree.go +++ b/weed/shell/command_fs_tree.go @@ -3,8 +3,8 @@ package shell import ( "context" "fmt" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "io" "strings" ) diff --git a/weed/shell/command_volume_balance.go b/weed/shell/command_volume_balance.go index b24fa43b6..d7ef0d005 100644 --- a/weed/shell/command_volume_balance.go +++ b/weed/shell/command_volume_balance.go @@ -9,8 +9,8 @@ import ( "sort" "time" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) func init() { diff --git a/weed/shell/command_volume_copy.go b/weed/shell/command_volume_copy.go index e44976f88..1c83ba655 100644 --- a/weed/shell/command_volume_copy.go +++ b/weed/shell/command_volume_copy.go @@ -5,7 +5,7 @@ import ( "fmt" "io" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) func init() { diff --git a/weed/shell/command_volume_delete.go b/weed/shell/command_volume_delete.go index 604b7d9c1..17d27ea3a 100644 --- a/weed/shell/command_volume_delete.go +++ b/weed/shell/command_volume_delete.go @@ -5,7 +5,7 @@ import ( "fmt" "io" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) func init() { diff --git a/weed/shell/command_volume_fix_replication.go b/weed/shell/command_volume_fix_replication.go index ced0b51f6..4c7a794c0 100644 --- a/weed/shell/command_volume_fix_replication.go +++ b/weed/shell/command_volume_fix_replication.go @@ -3,10 +3,10 @@ package shell import ( "context" "fmt" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/storage" "io" "math/rand" "sort" diff --git a/weed/shell/command_volume_list.go b/weed/shell/command_volume_list.go index 7a1aa0d87..134580ffe 100644 --- a/weed/shell/command_volume_list.go +++ b/weed/shell/command_volume_list.go @@ -3,8 +3,8 @@ package shell import ( "context" "fmt" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" "io" "sort" diff --git a/weed/shell/command_volume_mount.go b/weed/shell/command_volume_mount.go index 78d3878bc..50a307492 100644 --- a/weed/shell/command_volume_mount.go +++ b/weed/shell/command_volume_mount.go @@ -5,9 +5,9 @@ import ( "fmt" "io" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/storage/needle" "google.golang.org/grpc" ) diff --git a/weed/shell/command_volume_move.go b/weed/shell/command_volume_move.go index bca3cebbb..08d87c988 100644 --- a/weed/shell/command_volume_move.go +++ b/weed/shell/command_volume_move.go @@ -7,9 +7,9 @@ import ( "log" "time" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/storage/needle" "google.golang.org/grpc" ) diff --git a/weed/shell/command_volume_unmount.go b/weed/shell/command_volume_unmount.go index f6e2efdcc..8096f34d8 100644 --- a/weed/shell/command_volume_unmount.go +++ b/weed/shell/command_volume_unmount.go @@ -5,9 +5,9 @@ import ( "fmt" "io" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/storage/needle" "google.golang.org/grpc" ) diff --git a/weed/shell/commands.go b/weed/shell/commands.go index e361ae586..b642ec253 100644 --- a/weed/shell/commands.go +++ b/weed/shell/commands.go @@ -9,9 +9,9 @@ import ( "strconv" "strings" - "github.com/joeslay/seaweedfs/weed/filer2" - "github.com/joeslay/seaweedfs/weed/pb/filer_pb" - "github.com/joeslay/seaweedfs/weed/wdclient" + "github.com/chrislusf/seaweedfs/weed/filer2" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/wdclient" "google.golang.org/grpc" ) diff --git a/weed/stats/disk.go b/weed/stats/disk.go index 22e306312..e9d8baedd 100644 --- a/weed/stats/disk.go +++ b/weed/stats/disk.go @@ -1,6 +1,6 @@ package stats -import "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" +import "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" func NewDiskStatus(path string) (disk *volume_server_pb.DiskStatus) { disk = &volume_server_pb.DiskStatus{Dir: path} diff --git a/weed/stats/disk_notsupported.go b/weed/stats/disk_notsupported.go index b2a9ce8c9..ace662f6a 100644 --- a/weed/stats/disk_notsupported.go +++ b/weed/stats/disk_notsupported.go @@ -2,7 +2,7 @@ package stats -import "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" +import "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" func fillInDiskStatus(status *volume_server_pb.DiskStatus) { return diff --git a/weed/stats/disk_supported.go b/weed/stats/disk_supported.go index 549b2275a..0537828b0 100644 --- a/weed/stats/disk_supported.go +++ b/weed/stats/disk_supported.go @@ -5,7 +5,7 @@ package stats import ( "syscall" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" ) func fillInDiskStatus(disk *volume_server_pb.DiskStatus) { diff --git a/weed/stats/memory.go b/weed/stats/memory.go index 04531604e..c671efc4d 100644 --- a/weed/stats/memory.go +++ b/weed/stats/memory.go @@ -3,7 +3,7 @@ package stats import ( "runtime" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" ) func MemStat() *volume_server_pb.MemStatus { diff --git a/weed/stats/memory_notsupported.go b/weed/stats/memory_notsupported.go index 865b43521..2bed95266 100644 --- a/weed/stats/memory_notsupported.go +++ b/weed/stats/memory_notsupported.go @@ -2,7 +2,7 @@ package stats -import "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" +import "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" func fillInMemStatus(status *volume_server_pb.MemStatus) { return diff --git a/weed/stats/memory_supported.go b/weed/stats/memory_supported.go index 71ee28c12..91fdd005b 100644 --- a/weed/stats/memory_supported.go +++ b/weed/stats/memory_supported.go @@ -5,7 +5,7 @@ package stats import ( "syscall" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" ) func fillInMemStatus(mem *volume_server_pb.MemStatus) { diff --git a/weed/stats/metrics.go b/weed/stats/metrics.go index e079614e5..a9624cd86 100644 --- a/weed/stats/metrics.go +++ b/weed/stats/metrics.go @@ -5,7 +5,7 @@ import ( "os" "time" - "github.com/joeslay/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/glog" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/push" ) diff --git a/weed/storage/disk_location.go b/weed/storage/disk_location.go index a8f3ec11e..c7faa57a6 100644 --- a/weed/storage/disk_location.go +++ b/weed/storage/disk_location.go @@ -8,9 +8,9 @@ import ( "fmt" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) type DiskLocation struct { diff --git a/weed/storage/disk_location_ec.go b/weed/storage/disk_location_ec.go index 4e7eeedfa..ba0824c6d 100644 --- a/weed/storage/disk_location_ec.go +++ b/weed/storage/disk_location_ec.go @@ -8,8 +8,8 @@ import ( "sort" "strconv" - "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) var ( diff --git a/weed/storage/erasure_coding/ec_encoder.go b/weed/storage/erasure_coding/ec_encoder.go index 7a979ecad..97010a1ed 100644 --- a/weed/storage/erasure_coding/ec_encoder.go +++ b/weed/storage/erasure_coding/ec_encoder.go @@ -5,11 +5,11 @@ import ( "io" "os" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/storage/idx" - "github.com/joeslay/seaweedfs/weed/storage/needle_map" - "github.com/joeslay/seaweedfs/weed/storage/types" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage/idx" + "github.com/chrislusf/seaweedfs/weed/storage/needle_map" + "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/klauspost/reedsolomon" ) diff --git a/weed/storage/erasure_coding/ec_shard.go b/weed/storage/erasure_coding/ec_shard.go index 60c0a5794..47e6d3d1e 100644 --- a/weed/storage/erasure_coding/ec_shard.go +++ b/weed/storage/erasure_coding/ec_shard.go @@ -6,8 +6,8 @@ import ( "path" "strconv" - "github.com/joeslay/seaweedfs/weed/stats" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) type ShardId uint8 diff --git a/weed/storage/erasure_coding/ec_test.go b/weed/storage/erasure_coding/ec_test.go index ba0a4306c..57df09525 100644 --- a/weed/storage/erasure_coding/ec_test.go +++ b/weed/storage/erasure_coding/ec_test.go @@ -7,8 +7,8 @@ import ( "os" "testing" - "github.com/joeslay/seaweedfs/weed/storage/needle_map" - "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/storage/needle_map" + "github.com/chrislusf/seaweedfs/weed/storage/types" "github.com/klauspost/reedsolomon" ) diff --git a/weed/storage/erasure_coding/ec_volume.go b/weed/storage/erasure_coding/ec_volume.go index 00cd18e29..bcae164ca 100644 --- a/weed/storage/erasure_coding/ec_volume.go +++ b/weed/storage/erasure_coding/ec_volume.go @@ -9,10 +9,10 @@ import ( "sync" "time" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/storage/idx" - "github.com/joeslay/seaweedfs/weed/storage/needle" - "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/storage/idx" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/storage/types" ) var ( diff --git a/weed/storage/erasure_coding/ec_volume_delete.go b/weed/storage/erasure_coding/ec_volume_delete.go index 71c00a44c..04102ec9e 100644 --- a/weed/storage/erasure_coding/ec_volume_delete.go +++ b/weed/storage/erasure_coding/ec_volume_delete.go @@ -5,8 +5,8 @@ import ( "io" "os" - "github.com/joeslay/seaweedfs/weed/storage/types" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/util" ) var ( diff --git a/weed/storage/erasure_coding/ec_volume_info.go b/weed/storage/erasure_coding/ec_volume_info.go index b09b8ce92..c9e85c662 100644 --- a/weed/storage/erasure_coding/ec_volume_info.go +++ b/weed/storage/erasure_coding/ec_volume_info.go @@ -1,8 +1,8 @@ package erasure_coding import ( - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) // data structure used in master diff --git a/weed/storage/idx/walk.go b/weed/storage/idx/walk.go index 5677d5622..90efb75e6 100644 --- a/weed/storage/idx/walk.go +++ b/weed/storage/idx/walk.go @@ -4,9 +4,9 @@ import ( "io" "os" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/storage/types" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/util" ) // walks through the index file, calls fn function with each key, offset, size diff --git a/weed/storage/needle/crc.go b/weed/storage/needle/crc.go index 9d3d31963..00ea1db69 100644 --- a/weed/storage/needle/crc.go +++ b/weed/storage/needle/crc.go @@ -4,7 +4,7 @@ import ( "crypto/md5" "fmt" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/klauspost/crc32" ) diff --git a/weed/storage/needle/file_id.go b/weed/storage/needle/file_id.go index 3aaba7fbf..5dabb0f25 100644 --- a/weed/storage/needle/file_id.go +++ b/weed/storage/needle/file_id.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - . "github.com/joeslay/seaweedfs/weed/storage/types" + . "github.com/chrislusf/seaweedfs/weed/storage/types" ) type FileId struct { diff --git a/weed/storage/needle/file_id_test.go b/weed/storage/needle/file_id_test.go index f21bc5c28..a1a2c61fc 100644 --- a/weed/storage/needle/file_id_test.go +++ b/weed/storage/needle/file_id_test.go @@ -1,7 +1,7 @@ package needle import ( - "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/storage/types" "testing" ) diff --git a/weed/storage/needle/needle.go b/weed/storage/needle/needle.go index 7c841d037..2f03ba87b 100644 --- a/weed/storage/needle/needle.go +++ b/weed/storage/needle/needle.go @@ -10,8 +10,8 @@ import ( "io/ioutil" - "github.com/joeslay/seaweedfs/weed/images" - . "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/images" + . "github.com/chrislusf/seaweedfs/weed/storage/types" ) const ( diff --git a/weed/storage/needle/needle_parse_multipart.go b/weed/storage/needle/needle_parse_multipart.go index 993ae7178..8be1a1da4 100644 --- a/weed/storage/needle/needle_parse_multipart.go +++ b/weed/storage/needle/needle_parse_multipart.go @@ -1,8 +1,8 @@ package needle import ( - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/util" "io" "io/ioutil" diff --git a/weed/storage/needle/needle_read_write.go b/weed/storage/needle/needle_read_write.go index c942af206..3fe6a246c 100644 --- a/weed/storage/needle/needle_read_write.go +++ b/weed/storage/needle/needle_read_write.go @@ -8,10 +8,10 @@ import ( "math" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/storage/memory_map" - . "github.com/joeslay/seaweedfs/weed/storage/types" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage/memory_map" + . "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/util" ) const ( diff --git a/weed/storage/needle/needle_read_write_test.go b/weed/storage/needle/needle_read_write_test.go index c63662e5f..4c507f9e6 100644 --- a/weed/storage/needle/needle_read_write_test.go +++ b/weed/storage/needle/needle_read_write_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/storage/types" ) func TestAppend(t *testing.T) { diff --git a/weed/storage/needle/needle_test.go b/weed/storage/needle/needle_test.go index a1aeddd27..0f2dde98e 100644 --- a/weed/storage/needle/needle_test.go +++ b/weed/storage/needle/needle_test.go @@ -3,7 +3,7 @@ package needle import ( "testing" - "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/storage/types" ) func TestParseKeyHash(t *testing.T) { diff --git a/weed/storage/needle_map.go b/weed/storage/needle_map.go index 9aa8fa561..77d081ea7 100644 --- a/weed/storage/needle_map.go +++ b/weed/storage/needle_map.go @@ -5,8 +5,8 @@ import ( "os" "sync" - "github.com/joeslay/seaweedfs/weed/storage/needle_map" - . "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/storage/needle_map" + . "github.com/chrislusf/seaweedfs/weed/storage/types" ) type NeedleMapType int diff --git a/weed/storage/needle_map/btree_map.go b/weed/storage/needle_map/btree_map.go index 01a7ee5e0..a26c5e068 100644 --- a/weed/storage/needle_map/btree_map.go +++ b/weed/storage/needle_map/btree_map.go @@ -1,7 +1,7 @@ package needle_map import ( - . "github.com/joeslay/seaweedfs/weed/storage/types" + . "github.com/chrislusf/seaweedfs/weed/storage/types" "github.com/google/btree" ) diff --git a/weed/storage/needle_map/compact_map.go b/weed/storage/needle_map/compact_map.go index da613124a..76783d0b0 100644 --- a/weed/storage/needle_map/compact_map.go +++ b/weed/storage/needle_map/compact_map.go @@ -4,7 +4,7 @@ import ( "sort" "sync" - . "github.com/joeslay/seaweedfs/weed/storage/types" + . "github.com/chrislusf/seaweedfs/weed/storage/types" ) const ( diff --git a/weed/storage/needle_map/compact_map_perf_test.go b/weed/storage/needle_map/compact_map_perf_test.go index 8d1fa0fcf..3a3648641 100644 --- a/weed/storage/needle_map/compact_map_perf_test.go +++ b/weed/storage/needle_map/compact_map_perf_test.go @@ -8,8 +8,8 @@ import ( "testing" "time" - . "github.com/joeslay/seaweedfs/weed/storage/types" - "github.com/joeslay/seaweedfs/weed/util" + . "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/util" ) /* diff --git a/weed/storage/needle_map/compact_map_test.go b/weed/storage/needle_map/compact_map_test.go index 43761008c..3bad85727 100644 --- a/weed/storage/needle_map/compact_map_test.go +++ b/weed/storage/needle_map/compact_map_test.go @@ -2,7 +2,7 @@ package needle_map import ( "fmt" - . "github.com/joeslay/seaweedfs/weed/storage/types" + . "github.com/chrislusf/seaweedfs/weed/storage/types" "testing" ) diff --git a/weed/storage/needle_map/needle_value.go b/weed/storage/needle_map/needle_value.go index fc54663bb..ef540b55e 100644 --- a/weed/storage/needle_map/needle_value.go +++ b/weed/storage/needle_map/needle_value.go @@ -1,8 +1,8 @@ package needle_map import ( - . "github.com/joeslay/seaweedfs/weed/storage/types" - "github.com/joeslay/seaweedfs/weed/util" + . "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/google/btree" ) diff --git a/weed/storage/needle_map/needle_value_map.go b/weed/storage/needle_map/needle_value_map.go index e0afb355c..0a5a00ef7 100644 --- a/weed/storage/needle_map/needle_value_map.go +++ b/weed/storage/needle_map/needle_value_map.go @@ -1,7 +1,7 @@ package needle_map import ( - . "github.com/joeslay/seaweedfs/weed/storage/types" + . "github.com/chrislusf/seaweedfs/weed/storage/types" ) type NeedleValueMap interface { diff --git a/weed/storage/needle_map_leveldb.go b/weed/storage/needle_map_leveldb.go index 7eec4e349..ef8571e83 100644 --- a/weed/storage/needle_map_leveldb.go +++ b/weed/storage/needle_map_leveldb.go @@ -5,13 +5,13 @@ import ( "os" "path/filepath" - "github.com/joeslay/seaweedfs/weed/storage/idx" + "github.com/chrislusf/seaweedfs/weed/storage/idx" "github.com/syndtr/goleveldb/leveldb/opt" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/storage/needle_map" - . "github.com/joeslay/seaweedfs/weed/storage/types" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage/needle_map" + . "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/util" "github.com/syndtr/goleveldb/leveldb" ) diff --git a/weed/storage/needle_map_memory.go b/weed/storage/needle_map_memory.go index 84ff51a33..ee639a7e6 100644 --- a/weed/storage/needle_map_memory.go +++ b/weed/storage/needle_map_memory.go @@ -3,10 +3,10 @@ package storage import ( "os" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/storage/idx" - "github.com/joeslay/seaweedfs/weed/storage/needle_map" - . "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage/idx" + "github.com/chrislusf/seaweedfs/weed/storage/needle_map" + . "github.com/chrislusf/seaweedfs/weed/storage/types" ) type NeedleMap struct { diff --git a/weed/storage/needle_map_metric.go b/weed/storage/needle_map_metric.go index e22a5b5ca..823a04108 100644 --- a/weed/storage/needle_map_metric.go +++ b/weed/storage/needle_map_metric.go @@ -5,8 +5,8 @@ import ( "os" "sync/atomic" - "github.com/joeslay/seaweedfs/weed/storage/idx" - . "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/storage/idx" + . "github.com/chrislusf/seaweedfs/weed/storage/types" "github.com/willf/bloom" ) diff --git a/weed/storage/needle_map_metric_test.go b/weed/storage/needle_map_metric_test.go index 9b946036f..539f83a87 100644 --- a/weed/storage/needle_map_metric_test.go +++ b/weed/storage/needle_map_metric_test.go @@ -1,8 +1,8 @@ package storage import ( - "github.com/joeslay/seaweedfs/weed/glog" - . "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/glog" + . "github.com/chrislusf/seaweedfs/weed/storage/types" "io/ioutil" "math/rand" "testing" diff --git a/weed/storage/store.go b/weed/storage/store.go index 8a253d2c3..948dd1f0a 100644 --- a/weed/storage/store.go +++ b/weed/storage/store.go @@ -4,11 +4,11 @@ import ( "fmt" "sync/atomic" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/stats" - "github.com/joeslay/seaweedfs/weed/storage/needle" - . "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + . "github.com/chrislusf/seaweedfs/weed/storage/types" "google.golang.org/grpc" ) diff --git a/weed/storage/store_ec.go b/weed/storage/store_ec.go index 570f00713..8271324cf 100644 --- a/weed/storage/store_ec.go +++ b/weed/storage/store_ec.go @@ -8,14 +8,14 @@ import ( "sync" "time" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/stats" - "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" - "github.com/joeslay/seaweedfs/weed/storage/needle" - "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/storage/types" "github.com/klauspost/reedsolomon" ) diff --git a/weed/storage/store_ec_delete.go b/weed/storage/store_ec_delete.go index c1e582668..e027d2887 100644 --- a/weed/storage/store_ec_delete.go +++ b/weed/storage/store_ec_delete.go @@ -4,12 +4,12 @@ import ( "context" "fmt" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" - "github.com/joeslay/seaweedfs/weed/storage/needle" - "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/storage/types" ) func (s *Store) DeleteEcShardNeedle(ctx context.Context, ecVolume *erasure_coding.EcVolume, n *needle.Needle, cookie types.Cookie) (int64, error) { diff --git a/weed/storage/store_vacuum.go b/weed/storage/store_vacuum.go index 6acf5b10e..b1f1a6277 100644 --- a/weed/storage/store_vacuum.go +++ b/weed/storage/store_vacuum.go @@ -3,8 +3,8 @@ package storage import ( "fmt" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) func (s *Store) CheckCompactVolume(volumeId needle.VolumeId) (float64, error) { diff --git a/weed/storage/types/needle_id_type.go b/weed/storage/types/needle_id_type.go index 556e1b9d2..32a296613 100644 --- a/weed/storage/types/needle_id_type.go +++ b/weed/storage/types/needle_id_type.go @@ -2,7 +2,7 @@ package types import ( "fmt" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/util" "strconv" ) diff --git a/weed/storage/types/needle_types.go b/weed/storage/types/needle_types.go index b493af27e..2ebb392db 100644 --- a/weed/storage/types/needle_types.go +++ b/weed/storage/types/needle_types.go @@ -2,7 +2,7 @@ package types import ( "fmt" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/util" "math" "strconv" ) diff --git a/weed/storage/volume.go b/weed/storage/volume.go index 92839f9e6..75f889689 100644 --- a/weed/storage/volume.go +++ b/weed/storage/volume.go @@ -3,10 +3,10 @@ package storage import ( "fmt" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/stats" - "github.com/joeslay/seaweedfs/weed/storage/needle" - "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/storage/types" "os" "path" @@ -14,7 +14,7 @@ import ( "sync" "time" - "github.com/joeslay/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) type Volume struct { diff --git a/weed/storage/volume_backup.go b/weed/storage/volume_backup.go index c9445881c..86d13da7a 100644 --- a/weed/storage/volume_backup.go +++ b/weed/storage/volume_backup.go @@ -6,11 +6,11 @@ import ( "io" "os" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/storage/idx" - "github.com/joeslay/seaweedfs/weed/storage/needle" - . "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/storage/idx" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + . "github.com/chrislusf/seaweedfs/weed/storage/types" "google.golang.org/grpc" ) diff --git a/weed/storage/volume_checking.go b/weed/storage/volume_checking.go index 0f26bd103..8f930546f 100644 --- a/weed/storage/volume_checking.go +++ b/weed/storage/volume_checking.go @@ -4,10 +4,10 @@ import ( "fmt" "os" - "github.com/joeslay/seaweedfs/weed/storage/idx" - "github.com/joeslay/seaweedfs/weed/storage/needle" - . "github.com/joeslay/seaweedfs/weed/storage/types" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/storage/idx" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + . "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/util" ) func CheckVolumeDataIntegrity(v *Volume, indexFile *os.File) (lastAppendAtNs uint64, e error) { diff --git a/weed/storage/volume_create.go b/weed/storage/volume_create.go index d1935f0cd..98b8aa280 100644 --- a/weed/storage/volume_create.go +++ b/weed/storage/volume_create.go @@ -5,7 +5,7 @@ package storage import ( "os" - "github.com/joeslay/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) func createVolumeFile(fileName string, preallocate int64, useMemoryMap uint32) (*os.File, error) { diff --git a/weed/storage/volume_create_linux.go b/weed/storage/volume_create_linux.go index f21267f01..0dc7364fa 100644 --- a/weed/storage/volume_create_linux.go +++ b/weed/storage/volume_create_linux.go @@ -6,7 +6,7 @@ import ( "os" "syscall" - "github.com/joeslay/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) func createVolumeFile(fileName string, preallocate int64, useMemoryMap uint32) (file *os.File, e error) { diff --git a/weed/storage/volume_create_windows.go b/weed/storage/volume_create_windows.go index 1b29b43c8..4c9a146f5 100644 --- a/weed/storage/volume_create_windows.go +++ b/weed/storage/volume_create_windows.go @@ -5,11 +5,11 @@ package storage import ( "os" - "github.com/joeslay/seaweedfs/weed/storage/memory_map" + "github.com/chrislusf/seaweedfs/weed/storage/memory_map" "golang.org/x/sys/windows" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/os_overloads" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/os_overloads" ) func createVolumeFile(fileName string, preallocate int64, memoryMapSizeMB uint32) (*os.File, error) { diff --git a/weed/storage/volume_info.go b/weed/storage/volume_info.go index 6990d42b1..111058b6e 100644 --- a/weed/storage/volume_info.go +++ b/weed/storage/volume_info.go @@ -4,8 +4,8 @@ import ( "fmt" "sort" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) type VolumeInfo struct { diff --git a/weed/storage/volume_info_test.go b/weed/storage/volume_info_test.go index 9ace2be02..5b1bacb52 100644 --- a/weed/storage/volume_info_test.go +++ b/weed/storage/volume_info_test.go @@ -3,7 +3,7 @@ package storage import ( "testing" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) func TestSortVolumeInfos(t *testing.T) { diff --git a/weed/storage/volume_loading.go b/weed/storage/volume_loading.go index 49bbcd22b..db168a134 100644 --- a/weed/storage/volume_loading.go +++ b/weed/storage/volume_loading.go @@ -5,11 +5,11 @@ import ( "os" "time" - "github.com/joeslay/seaweedfs/weed/stats" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/storage/needle" "github.com/syndtr/goleveldb/leveldb/opt" - "github.com/joeslay/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) func loadVolumeWithoutIndex(dirname string, collection string, id needle.VolumeId, needleMapKind NeedleMapType) (v *Volume, e error) { diff --git a/weed/storage/volume_read_write.go b/weed/storage/volume_read_write.go index da9a8429e..767a318c8 100644 --- a/weed/storage/volume_read_write.go +++ b/weed/storage/volume_read_write.go @@ -8,10 +8,10 @@ import ( "os" "time" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/storage/memory_map" - "github.com/joeslay/seaweedfs/weed/storage/needle" - . "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage/memory_map" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + . "github.com/chrislusf/seaweedfs/weed/storage/types" ) var ErrorNotFound = errors.New("not found") diff --git a/weed/storage/volume_super_block.go b/weed/storage/volume_super_block.go index 20a223f7d..7df733b57 100644 --- a/weed/storage/volume_super_block.go +++ b/weed/storage/volume_super_block.go @@ -4,13 +4,13 @@ import ( "fmt" "os" - "github.com/joeslay/seaweedfs/weed/storage/memory_map" + "github.com/chrislusf/seaweedfs/weed/storage/memory_map" "github.com/golang/protobuf/proto" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/storage/needle" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/util" ) const ( diff --git a/weed/storage/volume_super_block_test.go b/weed/storage/volume_super_block_test.go index 433eacdff..06ad8a5d3 100644 --- a/weed/storage/volume_super_block_test.go +++ b/weed/storage/volume_super_block_test.go @@ -3,7 +3,7 @@ package storage import ( "testing" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) func TestSuperBlockReadWrite(t *testing.T) { diff --git a/weed/storage/volume_vacuum.go b/weed/storage/volume_vacuum.go index 1b47f0483..5c10eb20f 100644 --- a/weed/storage/volume_vacuum.go +++ b/weed/storage/volume_vacuum.go @@ -5,13 +5,13 @@ import ( "os" "time" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/stats" - idx2 "github.com/joeslay/seaweedfs/weed/storage/idx" - "github.com/joeslay/seaweedfs/weed/storage/needle" - "github.com/joeslay/seaweedfs/weed/storage/needle_map" - . "github.com/joeslay/seaweedfs/weed/storage/types" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/stats" + idx2 "github.com/chrislusf/seaweedfs/weed/storage/idx" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/storage/needle_map" + . "github.com/chrislusf/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/util" ) func (v *Volume) garbageLevel() float64 { diff --git a/weed/storage/volume_vacuum_test.go b/weed/storage/volume_vacuum_test.go index 2ec9dbfa2..ba1e59f2c 100644 --- a/weed/storage/volume_vacuum_test.go +++ b/weed/storage/volume_vacuum_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "github.com/joeslay/seaweedfs/weed/storage/needle" - "github.com/joeslay/seaweedfs/weed/storage/types" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/storage/types" ) /* diff --git a/weed/topology/allocate_volume.go b/weed/topology/allocate_volume.go index 9dfd46825..342ca6579 100644 --- a/weed/topology/allocate_volume.go +++ b/weed/topology/allocate_volume.go @@ -3,9 +3,9 @@ package topology import ( "context" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/storage/needle" "google.golang.org/grpc" ) diff --git a/weed/topology/cluster_commands.go b/weed/topology/cluster_commands.go index a5843d0e5..152691ccb 100644 --- a/weed/topology/cluster_commands.go +++ b/weed/topology/cluster_commands.go @@ -2,8 +2,8 @@ package topology import ( "github.com/chrislusf/raft" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) type MaxVolumeIdCommand struct { diff --git a/weed/topology/collection.go b/weed/topology/collection.go index c4fd3af61..f6b728ec9 100644 --- a/weed/topology/collection.go +++ b/weed/topology/collection.go @@ -3,9 +3,9 @@ package topology import ( "fmt" - "github.com/joeslay/seaweedfs/weed/storage" - "github.com/joeslay/seaweedfs/weed/storage/needle" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/util" ) type Collection struct { diff --git a/weed/topology/data_center.go b/weed/topology/data_center.go index b419070f8..640cb1937 100644 --- a/weed/topology/data_center.go +++ b/weed/topology/data_center.go @@ -1,6 +1,6 @@ package topology -import "github.com/joeslay/seaweedfs/weed/pb/master_pb" +import "github.com/chrislusf/seaweedfs/weed/pb/master_pb" type DataCenter struct { NodeImpl diff --git a/weed/topology/data_node.go b/weed/topology/data_node.go index 83e58e075..3e72ccdbf 100644 --- a/weed/topology/data_node.go +++ b/weed/topology/data_node.go @@ -4,14 +4,14 @@ import ( "fmt" "sync" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" + "github.com/chrislusf/seaweedfs/weed/storage/needle" "strconv" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" ) type DataNode struct { diff --git a/weed/topology/data_node_ec.go b/weed/topology/data_node_ec.go index 404ce7c7b..75c8784fe 100644 --- a/weed/topology/data_node_ec.go +++ b/weed/topology/data_node_ec.go @@ -1,8 +1,8 @@ package topology import ( - "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) func (dn *DataNode) GetEcShards() (ret []*erasure_coding.EcVolumeInfo) { diff --git a/weed/topology/node.go b/weed/topology/node.go index cfa6bebc4..b2808f589 100644 --- a/weed/topology/node.go +++ b/weed/topology/node.go @@ -7,9 +7,9 @@ import ( "sync" "sync/atomic" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) type NodeId string diff --git a/weed/topology/rack.go b/weed/topology/rack.go index 9926dbbff..932c1a804 100644 --- a/weed/topology/rack.go +++ b/weed/topology/rack.go @@ -1,7 +1,7 @@ package topology import ( - "github.com/joeslay/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" "strconv" "time" ) diff --git a/weed/topology/store_replicate.go b/weed/topology/store_replicate.go index e3f3b445e..d21c4d210 100644 --- a/weed/topology/store_replicate.go +++ b/weed/topology/store_replicate.go @@ -10,12 +10,12 @@ import ( "strconv" "strings" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/security" - "github.com/joeslay/seaweedfs/weed/storage" - "github.com/joeslay/seaweedfs/weed/storage/needle" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/security" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/util" ) func ReplicatedWrite(masterNode string, s *storage.Store, diff --git a/weed/topology/topology.go b/weed/topology/topology.go index 48b8080b7..eff8c99a0 100644 --- a/weed/topology/topology.go +++ b/weed/topology/topology.go @@ -7,12 +7,12 @@ import ( "sync" "github.com/chrislusf/raft" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/sequence" - "github.com/joeslay/seaweedfs/weed/storage" - "github.com/joeslay/seaweedfs/weed/storage/needle" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/sequence" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/util" ) type Topology struct { diff --git a/weed/topology/topology_ec.go b/weed/topology/topology_ec.go index 91330f00f..93b39bb5d 100644 --- a/weed/topology/topology_ec.go +++ b/weed/topology/topology_ec.go @@ -1,10 +1,10 @@ package topology import ( - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/storage/erasure_coding" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) type EcShardLocations struct { diff --git a/weed/topology/topology_event_handling.go b/weed/topology/topology_event_handling.go index c51070a32..041351492 100644 --- a/weed/topology/topology_event_handling.go +++ b/weed/topology/topology_event_handling.go @@ -5,8 +5,8 @@ import ( "math/rand" "time" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" ) func (t *Topology) StartRefreshWritableVolumes(grpcDialOption grpc.DialOption, garbageThreshold float64, preallocate int64) { diff --git a/weed/topology/topology_map.go b/weed/topology/topology_map.go index d779bd590..37a88c9ed 100644 --- a/weed/topology/topology_map.go +++ b/weed/topology/topology_map.go @@ -1,6 +1,6 @@ package topology -import "github.com/joeslay/seaweedfs/weed/pb/master_pb" +import "github.com/chrislusf/seaweedfs/weed/pb/master_pb" func (t *Topology) ToMap() interface{} { m := make(map[string]interface{}) diff --git a/weed/topology/topology_test.go b/weed/topology/topology_test.go index 5910c87db..8f79ad684 100644 --- a/weed/topology/topology_test.go +++ b/weed/topology/topology_test.go @@ -1,10 +1,10 @@ package topology import ( - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/sequence" - "github.com/joeslay/seaweedfs/weed/storage" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/sequence" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/storage/needle" "testing" ) diff --git a/weed/topology/topology_vacuum.go b/weed/topology/topology_vacuum.go index 15b813815..37a6a30b9 100644 --- a/weed/topology/topology_vacuum.go +++ b/weed/topology/topology_vacuum.go @@ -5,12 +5,12 @@ import ( "sync/atomic" "time" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/storage/needle" "google.golang.org/grpc" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/operation" - "github.com/joeslay/seaweedfs/weed/pb/volume_server_pb" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/operation" + "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb" ) func batchVacuumVolumeCheck(grpcDialOption grpc.DialOption, vl *VolumeLayout, vid needle.VolumeId, locationlist *VolumeLocationList, garbageThreshold float64) bool { diff --git a/weed/topology/volume_growth.go b/weed/topology/volume_growth.go index e4446ade0..14f94fbd2 100644 --- a/weed/topology/volume_growth.go +++ b/weed/topology/volume_growth.go @@ -5,11 +5,11 @@ import ( "math/rand" "sync" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/storage/needle" "google.golang.org/grpc" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" ) /* diff --git a/weed/topology/volume_growth_test.go b/weed/topology/volume_growth_test.go index b1573ae00..3573365fd 100644 --- a/weed/topology/volume_growth_test.go +++ b/weed/topology/volume_growth_test.go @@ -5,9 +5,9 @@ import ( "fmt" "testing" - "github.com/joeslay/seaweedfs/weed/sequence" - "github.com/joeslay/seaweedfs/weed/storage" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/sequence" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) var topologyLayout = ` diff --git a/weed/topology/volume_layout.go b/weed/topology/volume_layout.go index b2b1dd49f..799cbca62 100644 --- a/weed/topology/volume_layout.go +++ b/weed/topology/volume_layout.go @@ -7,9 +7,9 @@ import ( "sync" "time" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/storage" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/storage" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) // mapping from volume to its locations, inverted from server to volume diff --git a/weed/topology/volume_location_list.go b/weed/topology/volume_location_list.go index 8fddc1912..8905c54b5 100644 --- a/weed/topology/volume_location_list.go +++ b/weed/topology/volume_location_list.go @@ -3,7 +3,7 @@ package topology import ( "fmt" - "github.com/joeslay/seaweedfs/weed/storage/needle" + "github.com/chrislusf/seaweedfs/weed/storage/needle" ) type VolumeLocationList struct { diff --git a/weed/util/compression.go b/weed/util/compression.go index a825dadcb..c6c9423e2 100644 --- a/weed/util/compression.go +++ b/weed/util/compression.go @@ -7,7 +7,7 @@ import ( "io/ioutil" "strings" - "github.com/joeslay/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/glog" "golang.org/x/tools/godoc/util" ) diff --git a/weed/util/config.go b/weed/util/config.go index 3028b14bf..1ea833d1f 100644 --- a/weed/util/config.go +++ b/weed/util/config.go @@ -1,7 +1,7 @@ package util import ( - "github.com/joeslay/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/glog" "github.com/spf13/viper" ) diff --git a/weed/util/file_util.go b/weed/util/file_util.go index c6da9c934..78add6724 100644 --- a/weed/util/file_util.go +++ b/weed/util/file_util.go @@ -4,7 +4,7 @@ import ( "errors" "os" - "github.com/joeslay/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) func TestFolderWritable(folder string) (err error) { diff --git a/weed/util/net_timeout.go b/weed/util/net_timeout.go index 10f3f893b..b8068e67f 100644 --- a/weed/util/net_timeout.go +++ b/weed/util/net_timeout.go @@ -4,7 +4,7 @@ import ( "net" "time" - "github.com/joeslay/seaweedfs/weed/stats" + "github.com/chrislusf/seaweedfs/weed/stats" ) // Listener wraps a net.Listener, and gives a place to store the timeout diff --git a/weed/util/pprof.go b/weed/util/pprof.go index 088053803..a2621ceee 100644 --- a/weed/util/pprof.go +++ b/weed/util/pprof.go @@ -5,7 +5,7 @@ import ( "runtime" "runtime/pprof" - "github.com/joeslay/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) func SetupProfiling(cpuProfile, memProfile string) { diff --git a/weed/wdclient/masterclient.go b/weed/wdclient/masterclient.go index bfe145b30..da867696d 100644 --- a/weed/wdclient/masterclient.go +++ b/weed/wdclient/masterclient.go @@ -6,9 +6,9 @@ import ( "math/rand" "time" - "github.com/joeslay/seaweedfs/weed/glog" - "github.com/joeslay/seaweedfs/weed/pb/master_pb" - "github.com/joeslay/seaweedfs/weed/util" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" + "github.com/chrislusf/seaweedfs/weed/util" "google.golang.org/grpc" ) diff --git a/weed/wdclient/vid_map.go b/weed/wdclient/vid_map.go index ccb9f926f..01d9cdaed 100644 --- a/weed/wdclient/vid_map.go +++ b/weed/wdclient/vid_map.go @@ -9,7 +9,7 @@ import ( "sync" "time" - "github.com/joeslay/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/glog" ) type Location struct { diff --git a/weed/weed.go b/weed/weed.go index 2bdefc9d7..ecb0ba2a4 100644 --- a/weed/weed.go +++ b/weed/weed.go @@ -16,8 +16,8 @@ import ( "unicode" "unicode/utf8" - "github.com/joeslay/seaweedfs/weed/command" - "github.com/joeslay/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/command" + "github.com/chrislusf/seaweedfs/weed/glog" ) var IsDebug *bool From 476140fd6b9201f4ef0280dd663a40feab184677 Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Thu, 19 Sep 2019 11:59:00 +0100 Subject: [PATCH 29/37] minor change to setProcessWorkingSetSize function --- weed/storage/memory_map/memory_map_windows.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/weed/storage/memory_map/memory_map_windows.go b/weed/storage/memory_map/memory_map_windows.go index 82d7696f1..cf27c629e 100644 --- a/weed/storage/memory_map/memory_map_windows.go +++ b/weed/storage/memory_map/memory_map_windows.go @@ -137,7 +137,7 @@ func (mBuffer *MemoryBuffer) ReleaseMemory() { windows.VirtualUnlock(mBuffer.aligned_ptr, uintptr(mBuffer.aligned_length)) windows.UnmapViewOfFile(mBuffer.aligned_ptr) - var _ = setProcessWorkingSetSize(uintptr(currentProcess), uintptr(currentMinWorkingSet), uintptr(currentMaxWorkingSet)) + var _ = setProcessWorkingSetSize(uintptr(currentProcess), currentMinWorkingSet, currentMaxWorkingSet) mBuffer.ptr = 0 mBuffer.aligned_ptr = 0 @@ -181,7 +181,7 @@ func allocate(hMapFile windows.Handle, offset uint64, length uint64, write bool) // increase the process working set size to hint to windows memory manager to // prioritise keeping this memory mapped in physical memory over other standby memory - var _ = setProcessWorkingSetSize(uintptr(currentProcess), uintptr(currentMinWorkingSet), uintptr(currentMaxWorkingSet)) + var _ = setProcessWorkingSetSize(uintptr(currentProcess), currentMinWorkingSet, currentMaxWorkingSet) addr_ptr, errno := windows.MapViewOfFile(hMapFile, uint32(access), // read/write permission @@ -277,8 +277,8 @@ func getProcessWorkingSetSize(process uintptr, dwMinWorkingSet *uint64, dwMaxWor // ); // https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setprocessworkingsetsize -func setProcessWorkingSetSize(process uintptr, dwMinWorkingSet uintptr, dwMaxWorkingSet uintptr) error { - r1, _, err := syscall.Syscall(procSetProcessWorkingSetSize.Addr(), 3, process, (dwMinWorkingSet), (dwMaxWorkingSet)) +func setProcessWorkingSetSize(process uintptr, dwMinWorkingSet uint64, dwMaxWorkingSet uint64) error { + r1, _, err := syscall.Syscall(procSetProcessWorkingSetSize.Addr(), 3, process, uintptr(dwMinWorkingSet), uintptr(dwMaxWorkingSet)) if r1 == 0 { if err != syscall.Errno(0) { return err From d5f5acb734738e89326ca49aee241b1f6a6c270c Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Fri, 20 Sep 2019 12:44:29 +0100 Subject: [PATCH 30/37] limit locking physical memory to 80% of max physical memory --- weed/storage/memory_map/memory_map_windows.go | 77 +++++++++++++++---- 1 file changed, 64 insertions(+), 13 deletions(-) diff --git a/weed/storage/memory_map/memory_map_windows.go b/weed/storage/memory_map/memory_map_windows.go index cf27c629e..a06b7947c 100644 --- a/weed/storage/memory_map/memory_map_windows.go +++ b/weed/storage/memory_map/memory_map_windows.go @@ -29,6 +29,7 @@ type MemoryMap struct { var FileMemoryMap = make(map[string]*MemoryMap) +type DWORDLONG = uint64 type DWORD = uint32 type WORD = uint16 @@ -36,6 +37,7 @@ var ( modkernel32 = syscall.NewLazyDLL("kernel32.dll") procGetSystemInfo = modkernel32.NewProc("GetSystemInfo") + procGlobalMemoryStatusEx = modkernel32.NewProc("GlobalMemoryStatusEx") procGetProcessWorkingSetSize = modkernel32.NewProc("GetProcessWorkingSetSize") procSetProcessWorkingSetSize = modkernel32.NewProc("SetProcessWorkingSetSize") ) @@ -48,6 +50,9 @@ var _ = getProcessWorkingSetSize(uintptr(currentProcess), ¤tMinWorkingSet, var systemInfo, _ = getSystemInfo() var chunkSize = uint64(systemInfo.dwAllocationGranularity) * 256 +var memoryStatusEx, _ = globalMemoryStatusEx() +var maxMemoryLimitBytes = uint64(float64(memoryStatusEx.ullTotalPhys) * 0.8) + func (mMap *MemoryMap) CreateMemoryMap(file *os.File, maxLength uint64) { chunks := (maxLength / chunkSize) @@ -131,13 +136,15 @@ func (mMap *MemoryMap) ReadMemory(offset uint64, length uint64) (MemoryBuffer, e func (mBuffer *MemoryBuffer) ReleaseMemory() { - currentMinWorkingSet = currentMinWorkingSet - mBuffer.aligned_length - currentMaxWorkingSet = currentMaxWorkingSet - mBuffer.aligned_length - windows.VirtualUnlock(mBuffer.aligned_ptr, uintptr(mBuffer.aligned_length)) windows.UnmapViewOfFile(mBuffer.aligned_ptr) - var _ = setProcessWorkingSetSize(uintptr(currentProcess), currentMinWorkingSet, currentMaxWorkingSet) + currentMinWorkingSet = currentMinWorkingSet - mBuffer.aligned_length + currentMaxWorkingSet = currentMaxWorkingSet - mBuffer.aligned_length + + if currentMinWorkingSet < maxMemoryLimitBytes { + var _ = setProcessWorkingSetSize(uintptr(currentProcess), currentMinWorkingSet, currentMaxWorkingSet) + } mBuffer.ptr = 0 mBuffer.aligned_ptr = 0 @@ -152,7 +159,6 @@ func allocateChunk(mMap *MemoryMap) { if err == nil { mMap.write_map_views = append(mMap.write_map_views, mBuffer) - windows.VirtualLock(mBuffer.aligned_ptr, uintptr(mBuffer.aligned_length)) } } @@ -179,9 +185,11 @@ func allocate(hMapFile windows.Handle, offset uint64, length uint64, write bool) currentMinWorkingSet = currentMinWorkingSet + aligned_length currentMaxWorkingSet = currentMaxWorkingSet + aligned_length - // increase the process working set size to hint to windows memory manager to - // prioritise keeping this memory mapped in physical memory over other standby memory - var _ = setProcessWorkingSetSize(uintptr(currentProcess), currentMinWorkingSet, currentMaxWorkingSet) + if currentMinWorkingSet < maxMemoryLimitBytes { + // increase the process working set size to hint to windows memory manager to + // prioritise keeping this memory mapped in physical memory over other standby memory + var _ = setProcessWorkingSetSize(uintptr(currentProcess), currentMinWorkingSet, currentMaxWorkingSet) + } addr_ptr, errno := windows.MapViewOfFile(hMapFile, uint32(access), // read/write permission @@ -193,6 +201,10 @@ func allocate(hMapFile windows.Handle, offset uint64, length uint64, write bool) return mBuffer, errno } + if currentMinWorkingSet < maxMemoryLimitBytes { + windows.VirtualLock(mBuffer.aligned_ptr, uintptr(mBuffer.aligned_length)) + } + mBuffer.aligned_ptr = addr_ptr mBuffer.aligned_length = aligned_length mBuffer.ptr = addr_ptr + uintptr(diff) @@ -206,6 +218,47 @@ func allocate(hMapFile windows.Handle, offset uint64, length uint64, write bool) return mBuffer, nil } +//typedef struct _MEMORYSTATUSEX { +// DWORD dwLength; +// DWORD dwMemoryLoad; +// DWORDLONG ullTotalPhys; +// DWORDLONG ullAvailPhys; +// DWORDLONG ullTotalPageFile; +// DWORDLONG ullAvailPageFile; +// DWORDLONG ullTotalVirtual; +// DWORDLONG ullAvailVirtual; +// DWORDLONG ullAvailExtendedVirtual; +// } MEMORYSTATUSEX, *LPMEMORYSTATUSEX; +//https://docs.microsoft.com/en-gb/windows/win32/api/sysinfoapi/ns-sysinfoapi-memorystatusex + +type _MEMORYSTATUSEX struct { + dwLength DWORD + dwMemoryLoad DWORD + ullTotalPhys DWORDLONG + ullAvailPhys DWORDLONG + ullTotalPageFile DWORDLONG + ullAvailPageFile DWORDLONG + ullTotalVirtual DWORDLONG + ullAvailVirtual DWORDLONG + ullAvailExtendedVirtual DWORDLONG +} + +// BOOL GlobalMemoryStatusEx( +// LPMEMORYSTATUSEX lpBuffer +// ); +// https://docs.microsoft.com/en-gb/windows/win32/api/sysinfoapi/nf-sysinfoapi-globalmemorystatusex +func globalMemoryStatusEx() (_MEMORYSTATUSEX, error) { + var mem_status _MEMORYSTATUSEX + + mem_status.dwLength = uint32(unsafe.Sizeof(mem_status)) + _, _, err := procGlobalMemoryStatusEx.Call(uintptr(unsafe.Pointer(&mem_status))) + + if err != syscall.Errno(0) { + return mem_status, err + } + return mem_status, nil +} + // typedef struct _SYSTEM_INFO { // union { // DWORD dwOemId; @@ -224,7 +277,7 @@ func allocate(hMapFile windows.Handle, offset uint64, length uint64, write bool) // WORD wProcessorLevel; // WORD wProcessorRevision; // } SYSTEM_INFO; -// https://msdn.microsoft.com/en-us/library/ms724958(v=vs.85).aspx +// https://docs.microsoft.com/en-gb/windows/win32/api/sysinfoapi/ns-sysinfoapi-system_info type _SYSTEM_INFO struct { dwOemId DWORD dwPageSize DWORD @@ -241,12 +294,10 @@ type _SYSTEM_INFO struct { // void WINAPI GetSystemInfo( // _Out_ LPSYSTEM_INFO lpSystemInfo // ); -// https://msdn.microsoft.com/en-us/library/ms724381(VS.85).aspx +// https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getsysteminfo func getSystemInfo() (_SYSTEM_INFO, error) { var si _SYSTEM_INFO - _, _, err := procGetSystemInfo.Call( - uintptr(unsafe.Pointer(&si)), - ) + _, _, err := procGetSystemInfo.Call(uintptr(unsafe.Pointer(&si))) if err != syscall.Errno(0) { return si, err } From eb27c2b03762b2ff214824fad504aa348f397afd Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Tue, 1 Oct 2019 12:21:44 +0100 Subject: [PATCH 31/37] Make releaseMemory private and return byte array instead, fix other platform compilation issues, reduce in-memory chunk size. --- weed/storage/memory_map/memory_map.go | 12 +++++----- weed/storage/memory_map/memory_map_windows.go | 22 +++++++++++-------- weed/storage/needle/needle_read_write.go | 11 +++------- weed/storage/volume_super_block.go | 6 ++--- 4 files changed, 24 insertions(+), 27 deletions(-) diff --git a/weed/storage/memory_map/memory_map.go b/weed/storage/memory_map/memory_map.go index 4baf6fc1f..5f0327ea7 100644 --- a/weed/storage/memory_map/memory_map.go +++ b/weed/storage/memory_map/memory_map.go @@ -25,16 +25,16 @@ type MemoryMap struct { var FileMemoryMap = make(map[string]*MemoryMap) +func (mMap *MemoryMap) CreateMemoryMap(file *os.File, maxLength uint64) { +} + func (mMap *MemoryMap) WriteMemory(offset uint64, length uint64, data []byte) { } -func (mMap *MemoryMap) ReadMemory(offset uint64, length uint64) (MemoryBuffer, error) { - return MemoryBuffer{}, fmt.Errorf("Memory Map not implemented for this platform") -} - -func (mBuffer *MemoryBuffer) ReleaseMemory() { - +func (mMap *MemoryMap) ReadMemory(offset uint64, length uint64) ([]byte, error) { + dataSlice := []byte{} + return dataSlice, fmt.Errorf("Memory Map not implemented for this platform") } func (mBuffer *MemoryMap) DeleteFileAndMemoryMap() { diff --git a/weed/storage/memory_map/memory_map_windows.go b/weed/storage/memory_map/memory_map_windows.go index a06b7947c..ac4493188 100644 --- a/weed/storage/memory_map/memory_map_windows.go +++ b/weed/storage/memory_map/memory_map_windows.go @@ -48,7 +48,7 @@ var currentMaxWorkingSet uint64 = 0 var _ = getProcessWorkingSetSize(uintptr(currentProcess), ¤tMinWorkingSet, ¤tMaxWorkingSet) var systemInfo, _ = getSystemInfo() -var chunkSize = uint64(systemInfo.dwAllocationGranularity) * 256 +var chunkSize = uint64(systemInfo.dwAllocationGranularity) * 128 var memoryStatusEx, _ = globalMemoryStatusEx() var maxMemoryLimitBytes = uint64(float64(memoryStatusEx.ullTotalPhys) * 0.8) @@ -82,7 +82,7 @@ func (mMap *MemoryMap) DeleteFileAndMemoryMap() { windows.CloseHandle(windows.Handle(mMap.File.Fd())) for _, view := range mMap.write_map_views { - view.ReleaseMemory() + view.releaseMemory() } mMap.write_map_views = nil @@ -130,17 +130,21 @@ func (mMap *MemoryMap) WriteMemory(offset uint64, length uint64, data []byte) { } } -func (mMap *MemoryMap) ReadMemory(offset uint64, length uint64) (MemoryBuffer, error) { - return allocate(windows.Handle(mMap.file_memory_map_handle), offset, length, false) +func (mMap *MemoryMap) ReadMemory(offset uint64, length uint64) (dataSlice []byte, err error) { + dataSlice = make([]byte, length) + mBuffer, err := allocate(windows.Handle(mMap.file_memory_map_handle), offset, length, false) + copy(dataSlice, mBuffer.Buffer) + mBuffer.releaseMemory() + return dataSlice, err } -func (mBuffer *MemoryBuffer) ReleaseMemory() { +func (mBuffer *MemoryBuffer) releaseMemory() { windows.VirtualUnlock(mBuffer.aligned_ptr, uintptr(mBuffer.aligned_length)) windows.UnmapViewOfFile(mBuffer.aligned_ptr) - currentMinWorkingSet = currentMinWorkingSet - mBuffer.aligned_length - currentMaxWorkingSet = currentMaxWorkingSet - mBuffer.aligned_length + currentMinWorkingSet -= mBuffer.aligned_length + currentMaxWorkingSet -= mBuffer.aligned_length if currentMinWorkingSet < maxMemoryLimitBytes { var _ = setProcessWorkingSetSize(uintptr(currentProcess), currentMinWorkingSet, currentMaxWorkingSet) @@ -182,8 +186,8 @@ func allocate(hMapFile windows.Handle, offset uint64, length uint64, write bool) access = windows.FILE_MAP_WRITE } - currentMinWorkingSet = currentMinWorkingSet + aligned_length - currentMaxWorkingSet = currentMaxWorkingSet + aligned_length + currentMinWorkingSet += aligned_length + currentMaxWorkingSet += aligned_length if currentMinWorkingSet < maxMemoryLimitBytes { // increase the process working set size to hint to windows memory manager to diff --git a/weed/storage/needle/needle_read_write.go b/weed/storage/needle/needle_read_write.go index 3fe6a246c..5f8bfee8b 100644 --- a/weed/storage/needle/needle_read_write.go +++ b/weed/storage/needle/needle_read_write.go @@ -164,13 +164,11 @@ func (n *Needle) Append(w *os.File, version Version) (offset uint64, size uint32 func ReadNeedleBlob(r *os.File, offset int64, size uint32, version Version) (dataSlice []byte, err error) { dataSize := GetActualSize(size, version) - dataSlice = make([]byte, dataSize) + dataSlice = make([]byte, int(dataSize)) mMap, exists := memory_map.FileMemoryMap[r.Name()] if exists { - mBuffer, err := mMap.ReadMemory(uint64(offset), uint64(dataSize)) - copy(dataSlice, mBuffer.Buffer) - mBuffer.ReleaseMemory() + dataSlice, err := mMap.ReadMemory(uint64(offset), uint64(dataSize)) return dataSlice, err } else { _, err = r.ReadAt(dataSlice, offset) @@ -291,10 +289,7 @@ func ReadNeedleHeader(r *os.File, version Version, offset int64) (n *Needle, byt mMap, exists := memory_map.FileMemoryMap[r.Name()] if exists { - mBuffer, err := mMap.ReadMemory(uint64(offset), NeedleHeaderSize) - copy(bytes, mBuffer.Buffer) - mBuffer.ReleaseMemory() - + bytes, err = mMap.ReadMemory(uint64(offset), NeedleHeaderSize) if err != nil { return nil, bytes, 0, err } diff --git a/weed/storage/volume_super_block.go b/weed/storage/volume_super_block.go index 7df733b57..414d55f68 100644 --- a/weed/storage/volume_super_block.go +++ b/weed/storage/volume_super_block.go @@ -113,13 +113,11 @@ func ReadSuperBlock(dataFile *os.File) (superBlock SuperBlock, err error) { header := make([]byte, _SuperBlockSize) mMap, exists := memory_map.FileMemoryMap[dataFile.Name()] if exists { - mBuffer, e := mMap.ReadMemory(0, _SuperBlockSize) + header, err = mMap.ReadMemory(0, _SuperBlockSize) if err != nil { - err = fmt.Errorf("cannot read volume %s super block: %v", dataFile.Name(), e) + err = fmt.Errorf("cannot read volume %s super block: %v", dataFile.Name(), err) return } - copy(header, mBuffer.Buffer) - mBuffer.ReleaseMemory() } else { if _, err = dataFile.Seek(0, 0); err != nil { err = fmt.Errorf("cannot seek to the beginning of %s: %v", dataFile.Name(), err) From 583dc3afdd4829986d014eca6902da3b37e28a45 Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Mon, 14 Oct 2019 15:57:40 +0100 Subject: [PATCH 32/37] maybe make changes merge? --- go.mod | 1 + 1 file changed, 1 insertion(+) diff --git a/go.mod b/go.mod index dd77af8aa..941dc775e 100644 --- a/go.mod +++ b/go.mod @@ -33,6 +33,7 @@ require ( github.com/seaweedfs/fuse v0.0.0-20190510212405-310228904eff github.com/spf13/viper v1.4.0 github.com/syndtr/goleveldb v1.0.0 + github.com/tidwall/pretty v1.0.0 // indirect github.com/willf/bloom v2.0.3+incompatible go.etcd.io/etcd v3.3.15+incompatible gocloud.dev v0.16.0 From baa813ee3012d52a4b861cb61a2ef87f94e5b127 Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Mon, 14 Oct 2019 16:02:55 +0100 Subject: [PATCH 33/37] maybe prevent merge conflicts this time? --- go.mod | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 78 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 941dc775e..79896c7d3 100644 --- a/go.mod +++ b/go.mod @@ -1,49 +1,122 @@ module github.com/chrislusf/seaweedfs +go 1.12 -go 1.13 require ( cloud.google.com/go v0.44.3 + contrib.go.opencensus.io/exporter/aws v0.0.0-20190807220307-c50fb1bd7f21 // indirect + contrib.go.opencensus.io/exporter/ocagent v0.6.0 // indirect + contrib.go.opencensus.io/exporter/stackdriver v0.12.5 // indirect + contrib.go.opencensus.io/resource v0.1.2 // indirect + github.com/Azure/azure-amqp-common-go v1.1.4 // indirect + github.com/Azure/azure-pipeline-go v0.2.2 // indirect + github.com/Azure/azure-sdk-for-go v33.0.0+incompatible // indirect github.com/Azure/azure-storage-blob-go v0.8.0 + github.com/Azure/go-autorest v13.0.0+incompatible // indirect + github.com/Azure/go-autorest/tracing v0.5.0 // indirect + github.com/DataDog/zstd v1.4.1 // indirect + github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20190828224159-d93c53a4824c // indirect github.com/Shopify/sarama v1.23.1 + github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect + github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4 // indirect github.com/aws/aws-sdk-go v1.23.13 github.com/chrislusf/raft v0.0.0-20190225081310-10d6e2182d92 + github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd // indirect + github.com/coreos/bbolt v1.3.3 // indirect + github.com/coreos/etcd v3.3.15+incompatible // indirect + github.com/coreos/go-semver v0.3.0 // indirect + github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect github.com/dgrijalva/jwt-go v3.2.0+incompatible github.com/disintegration/imaging v1.6.1 github.com/dustin/go-humanize v1.0.0 + github.com/eapache/go-resiliency v1.2.0 // indirect github.com/gabriel-vasile/mimetype v0.3.17 + github.com/go-kit/kit v0.9.0 // indirect github.com/go-redis/redis v6.15.2+incompatible github.com/go-sql-driver/mysql v1.4.1 github.com/gocql/gocql v0.0.0-20190829130954-e163eff7a8c6 + github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48 // indirect + github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 // indirect github.com/golang/protobuf v1.3.2 github.com/google/btree v1.0.0 + github.com/google/pprof v0.0.0-20190723021845-34ac40c74b70 // indirect github.com/gorilla/mux v1.7.3 + github.com/gorilla/websocket v1.4.1 // indirect + github.com/grpc-ecosystem/grpc-gateway v1.11.0 // indirect github.com/jacobsa/daemonize v0.0.0-20160101105449-e460293e890f - github.com/joeslay/seaweedfs v0.0.0-20190912104409-d8c34b032fb6 // indirect + github.com/jcmturner/gofork v1.0.0 // indirect github.com/karlseguin/ccache v2.0.3+incompatible + github.com/karlseguin/expect v1.0.1 // indirect + github.com/klauspost/cpuid v1.2.1 // indirect github.com/klauspost/crc32 v1.2.0 github.com/klauspost/reedsolomon v1.9.2 + github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect + github.com/kr/pty v1.1.8 // indirect github.com/kurin/blazer v0.5.3 github.com/lib/pq v1.2.0 + github.com/magiconair/properties v1.8.1 // indirect + github.com/mattn/go-ieproxy v0.0.0-20190805055040-f9202b1cfdeb // indirect + github.com/mattn/go-isatty v0.0.9 // indirect + github.com/mattn/go-runewidth v0.0.4 // indirect + github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect + github.com/nats-io/gnatsd v1.4.1 // indirect + github.com/nats-io/go-nats v1.7.2 // indirect + github.com/nats-io/nats-server/v2 v2.0.4 // indirect + github.com/onsi/ginkgo v1.10.1 // indirect + github.com/onsi/gomega v1.7.0 // indirect + github.com/opentracing/opentracing-go v1.1.0 // indirect + github.com/pelletier/go-toml v1.4.0 // indirect github.com/peterh/liner v1.1.0 + github.com/pierrec/lz4 v2.2.7+incompatible // indirect github.com/prometheus/client_golang v1.1.0 + github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 // indirect + github.com/prometheus/procfs v0.0.4 // indirect github.com/rakyll/statik v0.1.6 + github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563 // indirect + github.com/rogpeppe/fastuuid v1.2.0 // indirect + github.com/rogpeppe/go-internal v1.3.1 // indirect github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd github.com/satori/go.uuid v1.2.0 github.com/seaweedfs/fuse v0.0.0-20190510212405-310228904eff + github.com/sirupsen/logrus v1.4.2 // indirect + github.com/spaolacci/murmur3 v1.1.0 // indirect + github.com/spf13/afero v1.2.2 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/viper v1.4.0 + github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271 // indirect + github.com/stretchr/testify v1.4.0 // indirect github.com/syndtr/goleveldb v1.0.0 - github.com/tidwall/pretty v1.0.0 // indirect + github.com/tidwall/gjson v1.3.2 + github.com/tidwall/match v1.0.1 + github.com/uber-go/atomic v1.4.0 // indirect + github.com/uber/jaeger-client-go v2.17.0+incompatible // indirect + github.com/uber/jaeger-lib v2.0.0+incompatible // indirect + github.com/ugorji/go v1.1.7 // indirect + github.com/willf/bitset v1.1.10 // indirect github.com/willf/bloom v2.0.3+incompatible + github.com/wsxiaoys/terminal v0.0.0-20160513160801-0940f3fc43a0 // indirect + go.etcd.io/bbolt v1.3.3 // indirect go.etcd.io/etcd v3.3.15+incompatible + go.mongodb.org/mongo-driver v1.1.0 // indirect gocloud.dev v0.16.0 gocloud.dev/pubsub/natspubsub v0.16.0 gocloud.dev/pubsub/rabbitpubsub v0.16.0 + golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472 // indirect + golang.org/x/exp v0.0.0-20190829153037-c13cbed26979 // indirect + golang.org/x/image v0.0.0-20190829233526-b3c06291d021 // indirect + golang.org/x/mobile v0.0.0-20190830201351-c6da95954960 // indirect golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 - golang.org/x/sys v0.0.0-20190830142957-1e83adbbebd0 + golang.org/x/sys v0.0.0-20190830142957-1e83adbbebd0 // indirect golang.org/x/tools v0.0.0-20190830223141-573d9926052a google.golang.org/api v0.9.0 + google.golang.org/appengine v1.6.2 // indirect + google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 // indirect google.golang.org/grpc v1.23.0 + gopkg.in/jcmturner/goidentity.v3 v3.0.0 // indirect + gopkg.in/jcmturner/gokrb5.v7 v7.3.0 // indirect + gopkg.in/karlseguin/expect.v1 v1.0.1 // indirect + honnef.co/go/tools v0.0.1-2019.2.2 // indirect + pack.ag/amqp v0.12.1 // indirect ) -replace github.com/satori/go.uuid v1.2.0 => github.com/satori/go.uuid v0.0.0-20181028125025-b2ce2384e17b +replace github.com/satori/go.uuid v1.2.0 => github.com/satori/go.uuid v0.0.0-20181028125025-b2ce2384e17b \ No newline at end of file From b0ddad6889987a7872fd22a7ca7bcf801643c8f6 Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Fri, 18 Oct 2019 10:32:07 +0100 Subject: [PATCH 34/37] Fix volume_create breaking the build --- weed/storage/volume_create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/storage/volume_create.go b/weed/storage/volume_create.go index 98b8aa280..80bfd104b 100644 --- a/weed/storage/volume_create.go +++ b/weed/storage/volume_create.go @@ -9,7 +9,7 @@ import ( ) func createVolumeFile(fileName string, preallocate int64, useMemoryMap uint32) (*os.File, error) { - file, e = os.OpenFile(fileName, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644) + file, e := os.OpenFile(fileName, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644) if preallocate > 0 { glog.V(0).Infof("Preallocated disk space for %s is not supported", fileName) } From 2c455841eac1edbe415e237b0c4778ea14b50482 Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Fri, 18 Oct 2019 11:01:45 +0100 Subject: [PATCH 35/37] Make volumeCreate more consistent between all 3 implementations. --- weed/storage/volume_create.go | 2 +- weed/storage/volume_create_linux.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/weed/storage/volume_create.go b/weed/storage/volume_create.go index 80bfd104b..65022a60b 100644 --- a/weed/storage/volume_create.go +++ b/weed/storage/volume_create.go @@ -8,7 +8,7 @@ import ( "github.com/chrislusf/seaweedfs/weed/glog" ) -func createVolumeFile(fileName string, preallocate int64, useMemoryMap uint32) (*os.File, error) { +func createVolumeFile(fileName string, preallocate int64, memoryMapSizeMB uint32) (*os.File, error) { file, e := os.OpenFile(fileName, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644) if preallocate > 0 { glog.V(0).Infof("Preallocated disk space for %s is not supported", fileName) diff --git a/weed/storage/volume_create_linux.go b/weed/storage/volume_create_linux.go index 0dc7364fa..d9dfc3862 100644 --- a/weed/storage/volume_create_linux.go +++ b/weed/storage/volume_create_linux.go @@ -9,8 +9,8 @@ import ( "github.com/chrislusf/seaweedfs/weed/glog" ) -func createVolumeFile(fileName string, preallocate int64, useMemoryMap uint32) (file *os.File, e error) { - file, e = os.OpenFile(fileName, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644) +func createVolumeFile(fileName string, preallocate int64, memoryMapSizeMB uint32) (*os.File, error) { + file, e := os.OpenFile(fileName, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644) if preallocate != 0 { syscall.Fallocate(int(file.Fd()), 1, 0, preallocate) glog.V(0).Infof("Preallocated %d bytes disk space for %s", preallocate, fileName) From 248f3be6e37f7c24b8cb3cb4fd072ccae9f2ad63 Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Fri, 18 Oct 2019 11:23:02 +0100 Subject: [PATCH 36/37] using a space instead of a comma to hopefully fix the build! --- weed/storage/volume_create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/storage/volume_create.go b/weed/storage/volume_create.go index 65022a60b..dbfc3b027 100644 --- a/weed/storage/volume_create.go +++ b/weed/storage/volume_create.go @@ -1,4 +1,4 @@ -// +build !linux, !windows +// +build !linux !windows package storage From 2e2fe00dbd69d631bff8189708315ebea5f1e524 Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Fri, 18 Oct 2019 11:31:25 +0100 Subject: [PATCH 37/37] Comma, no space? --- weed/storage/volume_create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/storage/volume_create.go b/weed/storage/volume_create.go index dbfc3b027..ef58e5871 100644 --- a/weed/storage/volume_create.go +++ b/weed/storage/volume_create.go @@ -1,4 +1,4 @@ -// +build !linux !windows +// +build !linux,!windows package storage