diff --git a/weed-fs/.project b/.project similarity index 100% rename from weed-fs/.project rename to .project diff --git a/bin/weed b/bin/weed new file mode 100755 index 000000000..b43465f77 Binary files /dev/null and b/bin/weed differ diff --git a/weed-fs/note/memory_usage.txt b/note/memory_usage.txt similarity index 100% rename from weed-fs/note/memory_usage.txt rename to note/memory_usage.txt diff --git a/weed-fs/note/replication.txt b/note/replication.txt similarity index 100% rename from weed-fs/note/replication.txt rename to note/replication.txt diff --git a/weed-fs/note/weedfs.txt b/note/weedfs.txt similarity index 100% rename from weed-fs/note/weedfs.txt rename to note/weedfs.txt diff --git a/weed-fs/src/cmd/weed/command.go b/src/weed/command.go similarity index 100% rename from weed-fs/src/cmd/weed/command.go rename to src/weed/command.go diff --git a/weed-fs/src/pkg/directory/file_id.go b/src/weed/directory/file_id.go similarity index 97% rename from weed-fs/src/pkg/directory/file_id.go rename to src/weed/directory/file_id.go index cd4204f32..b70f97fd4 100644 --- a/weed-fs/src/pkg/directory/file_id.go +++ b/src/weed/directory/file_id.go @@ -2,8 +2,8 @@ package directory import ( "encoding/hex" - "pkg/storage" - "pkg/util" + "weed/storage" + "weed/util" "strings" ) diff --git a/weed-fs/src/cmd/weed/export.go b/src/weed/export.go similarity index 99% rename from weed-fs/src/cmd/weed/export.go rename to src/weed/export.go index 637e36487..3c31b6ab7 100644 --- a/weed-fs/src/cmd/weed/export.go +++ b/src/weed/export.go @@ -7,8 +7,8 @@ import ( "log" "os" "path" - "pkg/directory" - "pkg/storage" + "weed/directory" + "weed/storage" "strconv" "strings" "text/template" diff --git a/weed-fs/src/cmd/weed/fix.go b/src/weed/fix.go similarity index 99% rename from weed-fs/src/cmd/weed/fix.go rename to src/weed/fix.go index 2dd50249e..0a21965b7 100644 --- a/weed-fs/src/cmd/weed/fix.go +++ b/src/weed/fix.go @@ -4,7 +4,7 @@ import ( "log" "os" "path" - "pkg/storage" + "weed/storage" "strconv" ) diff --git a/weed-fs/src/cmd/weed/master.go b/src/weed/master.go similarity index 99% rename from weed-fs/src/cmd/weed/master.go rename to src/weed/master.go index ccd827172..a06c8a99a 100644 --- a/weed-fs/src/cmd/weed/master.go +++ b/src/weed/master.go @@ -5,9 +5,9 @@ import ( "errors" "log" "net/http" - "pkg/replication" - "pkg/storage" - "pkg/topology" + "weed/replication" + "weed/storage" + "weed/topology" "runtime" "strconv" "strings" diff --git a/weed-fs/src/pkg/operation/allocate_volume.go b/src/weed/operation/allocate_volume.go similarity index 93% rename from weed-fs/src/pkg/operation/allocate_volume.go rename to src/weed/operation/allocate_volume.go index c93ccfb62..1e016abf7 100644 --- a/weed-fs/src/pkg/operation/allocate_volume.go +++ b/src/weed/operation/allocate_volume.go @@ -4,9 +4,9 @@ import ( "encoding/json" "errors" "net/url" - "pkg/storage" - "pkg/topology" - "pkg/util" + "weed/storage" + "weed/topology" + "weed/util" ) type AllocateVolumeResult struct { diff --git a/weed-fs/src/pkg/operation/delete_content.go b/src/weed/operation/delete_content.go similarity index 100% rename from weed-fs/src/pkg/operation/delete_content.go rename to src/weed/operation/delete_content.go diff --git a/weed-fs/src/pkg/operation/lookup_volume_id.go b/src/weed/operation/lookup_volume_id.go similarity index 96% rename from weed-fs/src/pkg/operation/lookup_volume_id.go rename to src/weed/operation/lookup_volume_id.go index 50a6d91e6..ccfca67c8 100644 --- a/weed-fs/src/pkg/operation/lookup_volume_id.go +++ b/src/weed/operation/lookup_volume_id.go @@ -5,8 +5,8 @@ import ( "errors" _ "fmt" "net/url" - "pkg/storage" - "pkg/util" + "weed/storage" + "weed/util" ) type Location struct { diff --git a/weed-fs/src/pkg/operation/upload_content.go b/src/weed/operation/upload_content.go similarity index 100% rename from weed-fs/src/pkg/operation/upload_content.go rename to src/weed/operation/upload_content.go diff --git a/weed-fs/src/pkg/replication/volume_growth.go b/src/weed/replication/volume_growth.go similarity index 99% rename from weed-fs/src/pkg/replication/volume_growth.go rename to src/weed/replication/volume_growth.go index ce0094a7c..0aae05bb3 100644 --- a/weed-fs/src/pkg/replication/volume_growth.go +++ b/src/weed/replication/volume_growth.go @@ -4,9 +4,9 @@ import ( "errors" "fmt" "math/rand" - "pkg/operation" - "pkg/storage" - "pkg/topology" + "weed/operation" + "weed/storage" + "weed/topology" "sync" ) diff --git a/weed-fs/src/pkg/replication/volume_growth_test.go b/src/weed/replication/volume_growth_test.go similarity index 98% rename from weed-fs/src/pkg/replication/volume_growth_test.go rename to src/weed/replication/volume_growth_test.go index 659564c64..ed7467785 100644 --- a/weed-fs/src/pkg/replication/volume_growth_test.go +++ b/src/weed/replication/volume_growth_test.go @@ -4,8 +4,8 @@ import ( "encoding/json" "fmt" "math/rand" - "pkg/storage" - "pkg/topology" + "weed/storage" + "weed/topology" "testing" "time" ) diff --git a/weed-fs/src/pkg/sequence/sequence.go b/src/weed/sequence/sequence.go similarity index 100% rename from weed-fs/src/pkg/sequence/sequence.go rename to src/weed/sequence/sequence.go diff --git a/weed-fs/src/cmd/weed/shell.go b/src/weed/shell.go similarity index 100% rename from weed-fs/src/cmd/weed/shell.go rename to src/weed/shell.go diff --git a/weed-fs/src/pkg/storage/compact_map.go b/src/weed/storage/compact_map.go similarity index 100% rename from weed-fs/src/pkg/storage/compact_map.go rename to src/weed/storage/compact_map.go diff --git a/weed-fs/src/pkg/storage/compact_map_perf_test.go b/src/weed/storage/compact_map_perf_test.go similarity index 98% rename from weed-fs/src/pkg/storage/compact_map_perf_test.go rename to src/weed/storage/compact_map_perf_test.go index cfa521fc8..b99356a73 100644 --- a/weed-fs/src/pkg/storage/compact_map_perf_test.go +++ b/src/weed/storage/compact_map_perf_test.go @@ -3,7 +3,7 @@ package storage import ( "log" "os" - "pkg/util" + "weed/util" "testing" ) diff --git a/weed-fs/src/pkg/storage/compact_map_test.go b/src/weed/storage/compact_map_test.go similarity index 100% rename from weed-fs/src/pkg/storage/compact_map_test.go rename to src/weed/storage/compact_map_test.go diff --git a/weed-fs/src/pkg/storage/compress.go b/src/weed/storage/compress.go similarity index 100% rename from weed-fs/src/pkg/storage/compress.go rename to src/weed/storage/compress.go diff --git a/weed-fs/src/pkg/storage/crc.go b/src/weed/storage/crc.go similarity index 100% rename from weed-fs/src/pkg/storage/crc.go rename to src/weed/storage/crc.go diff --git a/weed-fs/src/pkg/storage/needle.go b/src/weed/storage/needle.go similarity index 99% rename from weed-fs/src/pkg/storage/needle.go rename to src/weed/storage/needle.go index 2ab671426..23016f98b 100644 --- a/weed-fs/src/pkg/storage/needle.go +++ b/src/weed/storage/needle.go @@ -7,7 +7,7 @@ import ( "mime" "net/http" "path" - "pkg/util" + "weed/util" "strconv" "strings" ) diff --git a/weed-fs/src/pkg/storage/needle_map.go b/src/weed/storage/needle_map.go similarity index 99% rename from weed-fs/src/pkg/storage/needle_map.go rename to src/weed/storage/needle_map.go index 563e1081b..505dd36dd 100644 --- a/weed-fs/src/pkg/storage/needle_map.go +++ b/src/weed/storage/needle_map.go @@ -3,7 +3,7 @@ package storage import ( //"log" "os" - "pkg/util" + "weed/util" ) type NeedleMap struct { diff --git a/weed-fs/src/pkg/storage/needle_read_write.go b/src/weed/storage/needle_read_write.go similarity index 99% rename from weed-fs/src/pkg/storage/needle_read_write.go rename to src/weed/storage/needle_read_write.go index d74aac6a1..1dac6d5c4 100644 --- a/weed-fs/src/pkg/storage/needle_read_write.go +++ b/src/weed/storage/needle_read_write.go @@ -5,7 +5,7 @@ import ( "fmt" "io" "os" - "pkg/util" + "weed/util" ) const ( diff --git a/weed-fs/src/pkg/storage/replication_type.go b/src/weed/storage/replication_type.go similarity index 100% rename from weed-fs/src/pkg/storage/replication_type.go rename to src/weed/storage/replication_type.go diff --git a/weed-fs/src/pkg/storage/sample.idx b/src/weed/storage/sample.idx similarity index 100% rename from weed-fs/src/pkg/storage/sample.idx rename to src/weed/storage/sample.idx diff --git a/weed-fs/src/pkg/storage/store.go b/src/weed/storage/store.go similarity index 99% rename from weed-fs/src/pkg/storage/store.go rename to src/weed/storage/store.go index 69e37c606..b016a6491 100644 --- a/weed-fs/src/pkg/storage/store.go +++ b/src/weed/storage/store.go @@ -6,7 +6,7 @@ import ( "io/ioutil" "log" "net/url" - "pkg/util" + "weed/util" "strconv" "strings" ) diff --git a/weed-fs/src/pkg/storage/volume.go b/src/weed/storage/volume.go similarity index 100% rename from weed-fs/src/pkg/storage/volume.go rename to src/weed/storage/volume.go diff --git a/weed-fs/src/pkg/storage/volume_id.go b/src/weed/storage/volume_id.go similarity index 100% rename from weed-fs/src/pkg/storage/volume_id.go rename to src/weed/storage/volume_id.go diff --git a/weed-fs/src/pkg/storage/volume_info.go b/src/weed/storage/volume_info.go similarity index 100% rename from weed-fs/src/pkg/storage/volume_info.go rename to src/weed/storage/volume_info.go diff --git a/weed-fs/src/pkg/storage/volume_version.go b/src/weed/storage/volume_version.go similarity index 100% rename from weed-fs/src/pkg/storage/volume_version.go rename to src/weed/storage/volume_version.go diff --git a/weed-fs/src/pkg/topology/configuration.go b/src/weed/topology/configuration.go similarity index 100% rename from weed-fs/src/pkg/topology/configuration.go rename to src/weed/topology/configuration.go diff --git a/weed-fs/src/pkg/topology/configuration_test.go b/src/weed/topology/configuration_test.go similarity index 100% rename from weed-fs/src/pkg/topology/configuration_test.go rename to src/weed/topology/configuration_test.go diff --git a/weed-fs/src/pkg/topology/data_center.go b/src/weed/topology/data_center.go similarity index 100% rename from weed-fs/src/pkg/topology/data_center.go rename to src/weed/topology/data_center.go diff --git a/weed-fs/src/pkg/topology/data_node.go b/src/weed/topology/data_node.go similarity index 98% rename from weed-fs/src/pkg/topology/data_node.go rename to src/weed/topology/data_node.go index 01f8f768a..bea4729e2 100644 --- a/weed-fs/src/pkg/topology/data_node.go +++ b/src/weed/topology/data_node.go @@ -2,7 +2,7 @@ package topology import ( _ "fmt" - "pkg/storage" + "weed/storage" "strconv" ) diff --git a/weed-fs/src/pkg/topology/node.go b/src/weed/topology/node.go similarity index 99% rename from weed-fs/src/pkg/topology/node.go rename to src/weed/topology/node.go index 02b427a2b..0bc85011c 100644 --- a/weed-fs/src/pkg/topology/node.go +++ b/src/weed/topology/node.go @@ -2,7 +2,7 @@ package topology import ( "fmt" - "pkg/storage" + "weed/storage" ) type NodeId string diff --git a/weed-fs/src/pkg/topology/node_list.go b/src/weed/topology/node_list.go similarity index 98% rename from weed-fs/src/pkg/topology/node_list.go rename to src/weed/topology/node_list.go index 3115e0213..17ab1e0dc 100644 --- a/weed-fs/src/pkg/topology/node_list.go +++ b/src/weed/topology/node_list.go @@ -3,7 +3,7 @@ package topology import ( "fmt" "math/rand" - "pkg/storage" + "weed/storage" ) type NodeList struct { diff --git a/weed-fs/src/pkg/topology/node_list_test.go b/src/weed/topology/node_list_test.go similarity index 100% rename from weed-fs/src/pkg/topology/node_list_test.go rename to src/weed/topology/node_list_test.go diff --git a/weed-fs/src/pkg/topology/rack.go b/src/weed/topology/rack.go similarity index 100% rename from weed-fs/src/pkg/topology/rack.go rename to src/weed/topology/rack.go diff --git a/weed-fs/src/pkg/topology/topo_test.go b/src/weed/topology/topo_test.go similarity index 99% rename from weed-fs/src/pkg/topology/topo_test.go rename to src/weed/topology/topo_test.go index 71a901c8e..b77fb8ad8 100644 --- a/weed-fs/src/pkg/topology/topo_test.go +++ b/src/weed/topology/topo_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "fmt" "math/rand" - "pkg/storage" + "weed/storage" "testing" "time" ) diff --git a/weed-fs/src/pkg/topology/topology.go b/src/weed/topology/topology.go similarity index 98% rename from weed-fs/src/pkg/topology/topology.go rename to src/weed/topology/topology.go index 4fd109a99..d0b12def4 100644 --- a/weed-fs/src/pkg/topology/topology.go +++ b/src/weed/topology/topology.go @@ -4,9 +4,9 @@ import ( "errors" "io/ioutil" "math/rand" - "pkg/directory" - "pkg/sequence" - "pkg/storage" + "weed/directory" + "weed/sequence" + "weed/storage" ) type Topology struct { diff --git a/weed-fs/src/pkg/topology/topology_compact.go b/src/weed/topology/topology_compact.go similarity index 99% rename from weed-fs/src/pkg/topology/topology_compact.go rename to src/weed/topology/topology_compact.go index 93c8e5511..c2b85fe63 100644 --- a/weed-fs/src/pkg/topology/topology_compact.go +++ b/src/weed/topology/topology_compact.go @@ -5,8 +5,8 @@ import ( "errors" "fmt" "net/url" - "pkg/storage" - "pkg/util" + "weed/storage" + "weed/util" "time" ) diff --git a/weed-fs/src/pkg/topology/topology_event_handling.go b/src/weed/topology/topology_event_handling.go similarity index 99% rename from weed-fs/src/pkg/topology/topology_event_handling.go rename to src/weed/topology/topology_event_handling.go index debedc3d3..6afd82dde 100644 --- a/weed-fs/src/pkg/topology/topology_event_handling.go +++ b/src/weed/topology/topology_event_handling.go @@ -3,7 +3,7 @@ package topology import ( "fmt" "math/rand" - "pkg/storage" + "weed/storage" "time" ) diff --git a/weed-fs/src/pkg/topology/topology_map.go b/src/weed/topology/topology_map.go similarity index 100% rename from weed-fs/src/pkg/topology/topology_map.go rename to src/weed/topology/topology_map.go diff --git a/weed-fs/src/pkg/topology/volume_layout.go b/src/weed/topology/volume_layout.go similarity index 99% rename from weed-fs/src/pkg/topology/volume_layout.go rename to src/weed/topology/volume_layout.go index 6d62128d9..c144c1861 100644 --- a/weed-fs/src/pkg/topology/volume_layout.go +++ b/src/weed/topology/volume_layout.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" "math/rand" - "pkg/storage" + "weed/storage" ) type VolumeLayout struct { diff --git a/weed-fs/src/pkg/topology/volume_location.go b/src/weed/topology/volume_location.go similarity index 100% rename from weed-fs/src/pkg/topology/volume_location.go rename to src/weed/topology/volume_location.go diff --git a/weed-fs/src/cmd/weed/upload.go b/src/weed/upload.go similarity index 98% rename from weed-fs/src/cmd/weed/upload.go rename to src/weed/upload.go index 5df29f6a3..bc1361cc5 100644 --- a/weed-fs/src/cmd/weed/upload.go +++ b/src/weed/upload.go @@ -7,8 +7,8 @@ import ( "net/url" "os" "path" - "pkg/operation" - "pkg/util" + "weed/operation" + "weed/util" "strconv" ) diff --git a/weed-fs/src/pkg/util/bytes.go b/src/weed/util/bytes.go similarity index 100% rename from weed-fs/src/pkg/util/bytes.go rename to src/weed/util/bytes.go diff --git a/weed-fs/src/pkg/util/config.go b/src/weed/util/config.go similarity index 100% rename from weed-fs/src/pkg/util/config.go rename to src/weed/util/config.go diff --git a/weed-fs/src/pkg/util/parse.go b/src/weed/util/parse.go similarity index 100% rename from weed-fs/src/pkg/util/parse.go rename to src/weed/util/parse.go diff --git a/weed-fs/src/pkg/util/post.go b/src/weed/util/post.go similarity index 100% rename from weed-fs/src/pkg/util/post.go rename to src/weed/util/post.go diff --git a/weed-fs/src/cmd/weed/version.go b/src/weed/version.go similarity index 100% rename from weed-fs/src/cmd/weed/version.go rename to src/weed/version.go diff --git a/weed-fs/src/cmd/weed/volume.go b/src/weed/volume.go similarity index 99% rename from weed-fs/src/cmd/weed/volume.go rename to src/weed/volume.go index ee569843f..483ead145 100644 --- a/weed-fs/src/cmd/weed/volume.go +++ b/src/weed/volume.go @@ -7,8 +7,8 @@ import ( "mime" "net/http" "os" - "pkg/operation" - "pkg/storage" + "weed/operation" + "weed/storage" "runtime" "strconv" "strings" @@ -242,7 +242,7 @@ func DeleteHandler(w http.ResponseWriter, r *http.Request) { n.Size = 0 ret, err := store.Delete(volumeId, n) if err != nil { - log.Println("delete error: %s", err) + log.Printf("delete error: %s\n", err) return } diff --git a/weed-fs/src/cmd/weed/weed.go b/src/weed/weed.go similarity index 100% rename from weed-fs/src/cmd/weed/weed.go rename to src/weed/weed.go