Browse Source

re-organize code directory structure

pull/2/head
Chris Lu 12 years ago
parent
commit
cb4e8ec16b
  1. 0
      .project
  2. BIN
      bin/weed
  3. 0
      note/memory_usage.txt
  4. 0
      note/replication.txt
  5. 0
      note/weedfs.txt
  6. 0
      src/weed/command.go
  7. 4
      src/weed/directory/file_id.go
  8. 4
      src/weed/export.go
  9. 2
      src/weed/fix.go
  10. 6
      src/weed/master.go
  11. 6
      src/weed/operation/allocate_volume.go
  12. 0
      src/weed/operation/delete_content.go
  13. 4
      src/weed/operation/lookup_volume_id.go
  14. 0
      src/weed/operation/upload_content.go
  15. 6
      src/weed/replication/volume_growth.go
  16. 4
      src/weed/replication/volume_growth_test.go
  17. 0
      src/weed/sequence/sequence.go
  18. 0
      src/weed/shell.go
  19. 0
      src/weed/storage/compact_map.go
  20. 2
      src/weed/storage/compact_map_perf_test.go
  21. 0
      src/weed/storage/compact_map_test.go
  22. 0
      src/weed/storage/compress.go
  23. 0
      src/weed/storage/crc.go
  24. 2
      src/weed/storage/needle.go
  25. 2
      src/weed/storage/needle_map.go
  26. 2
      src/weed/storage/needle_read_write.go
  27. 0
      src/weed/storage/replication_type.go
  28. 0
      src/weed/storage/sample.idx
  29. 2
      src/weed/storage/store.go
  30. 0
      src/weed/storage/volume.go
  31. 0
      src/weed/storage/volume_id.go
  32. 0
      src/weed/storage/volume_info.go
  33. 0
      src/weed/storage/volume_version.go
  34. 0
      src/weed/topology/configuration.go
  35. 0
      src/weed/topology/configuration_test.go
  36. 0
      src/weed/topology/data_center.go
  37. 2
      src/weed/topology/data_node.go
  38. 2
      src/weed/topology/node.go
  39. 2
      src/weed/topology/node_list.go
  40. 0
      src/weed/topology/node_list_test.go
  41. 0
      src/weed/topology/rack.go
  42. 2
      src/weed/topology/topo_test.go
  43. 6
      src/weed/topology/topology.go
  44. 4
      src/weed/topology/topology_compact.go
  45. 2
      src/weed/topology/topology_event_handling.go
  46. 0
      src/weed/topology/topology_map.go
  47. 2
      src/weed/topology/volume_layout.go
  48. 0
      src/weed/topology/volume_location.go
  49. 4
      src/weed/upload.go
  50. 0
      src/weed/util/bytes.go
  51. 0
      src/weed/util/config.go
  52. 0
      src/weed/util/parse.go
  53. 0
      src/weed/util/post.go
  54. 0
      src/weed/version.go
  55. 6
      src/weed/volume.go
  56. 0
      src/weed/weed.go

0
weed-fs/.project → .project

BIN
bin/weed

0
weed-fs/note/memory_usage.txt → note/memory_usage.txt

0
weed-fs/note/replication.txt → note/replication.txt

0
weed-fs/note/weedfs.txt → note/weedfs.txt

0
weed-fs/src/cmd/weed/command.go → src/weed/command.go

4
weed-fs/src/pkg/directory/file_id.go → src/weed/directory/file_id.go

@ -2,8 +2,8 @@ package directory
import ( import (
"encoding/hex" "encoding/hex"
"pkg/storage"
"pkg/util"
"weed/storage"
"weed/util"
"strings" "strings"
) )

4
weed-fs/src/cmd/weed/export.go → src/weed/export.go

@ -7,8 +7,8 @@ import (
"log" "log"
"os" "os"
"path" "path"
"pkg/directory"
"pkg/storage"
"weed/directory"
"weed/storage"
"strconv" "strconv"
"strings" "strings"
"text/template" "text/template"

2
weed-fs/src/cmd/weed/fix.go → src/weed/fix.go

@ -4,7 +4,7 @@ import (
"log" "log"
"os" "os"
"path" "path"
"pkg/storage"
"weed/storage"
"strconv" "strconv"
) )

6
weed-fs/src/cmd/weed/master.go → src/weed/master.go

@ -5,9 +5,9 @@ import (
"errors" "errors"
"log" "log"
"net/http" "net/http"
"pkg/replication"
"pkg/storage"
"pkg/topology"
"weed/replication"
"weed/storage"
"weed/topology"
"runtime" "runtime"
"strconv" "strconv"
"strings" "strings"

6
weed-fs/src/pkg/operation/allocate_volume.go → src/weed/operation/allocate_volume.go

@ -4,9 +4,9 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"net/url" "net/url"
"pkg/storage"
"pkg/topology"
"pkg/util"
"weed/storage"
"weed/topology"
"weed/util"
) )
type AllocateVolumeResult struct { type AllocateVolumeResult struct {

0
weed-fs/src/pkg/operation/delete_content.go → src/weed/operation/delete_content.go

4
weed-fs/src/pkg/operation/lookup_volume_id.go → src/weed/operation/lookup_volume_id.go

@ -5,8 +5,8 @@ import (
"errors" "errors"
_ "fmt" _ "fmt"
"net/url" "net/url"
"pkg/storage"
"pkg/util"
"weed/storage"
"weed/util"
) )
type Location struct { type Location struct {

0
weed-fs/src/pkg/operation/upload_content.go → src/weed/operation/upload_content.go

6
weed-fs/src/pkg/replication/volume_growth.go → src/weed/replication/volume_growth.go

@ -4,9 +4,9 @@ import (
"errors" "errors"
"fmt" "fmt"
"math/rand" "math/rand"
"pkg/operation"
"pkg/storage"
"pkg/topology"
"weed/operation"
"weed/storage"
"weed/topology"
"sync" "sync"
) )

4
weed-fs/src/pkg/replication/volume_growth_test.go → src/weed/replication/volume_growth_test.go

@ -4,8 +4,8 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"math/rand" "math/rand"
"pkg/storage"
"pkg/topology"
"weed/storage"
"weed/topology"
"testing" "testing"
"time" "time"
) )

0
weed-fs/src/pkg/sequence/sequence.go → src/weed/sequence/sequence.go

0
weed-fs/src/cmd/weed/shell.go → src/weed/shell.go

0
weed-fs/src/pkg/storage/compact_map.go → src/weed/storage/compact_map.go

2
weed-fs/src/pkg/storage/compact_map_perf_test.go → src/weed/storage/compact_map_perf_test.go

@ -3,7 +3,7 @@ package storage
import ( import (
"log" "log"
"os" "os"
"pkg/util"
"weed/util"
"testing" "testing"
) )

0
weed-fs/src/pkg/storage/compact_map_test.go → src/weed/storage/compact_map_test.go

0
weed-fs/src/pkg/storage/compress.go → src/weed/storage/compress.go

0
weed-fs/src/pkg/storage/crc.go → src/weed/storage/crc.go

2
weed-fs/src/pkg/storage/needle.go → src/weed/storage/needle.go

@ -7,7 +7,7 @@ import (
"mime" "mime"
"net/http" "net/http"
"path" "path"
"pkg/util"
"weed/util"
"strconv" "strconv"
"strings" "strings"
) )

2
weed-fs/src/pkg/storage/needle_map.go → src/weed/storage/needle_map.go

@ -3,7 +3,7 @@ package storage
import ( import (
//"log" //"log"
"os" "os"
"pkg/util"
"weed/util"
) )
type NeedleMap struct { type NeedleMap struct {

2
weed-fs/src/pkg/storage/needle_read_write.go → src/weed/storage/needle_read_write.go

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"io" "io"
"os" "os"
"pkg/util"
"weed/util"
) )
const ( const (

0
weed-fs/src/pkg/storage/replication_type.go → src/weed/storage/replication_type.go

0
weed-fs/src/pkg/storage/sample.idx → src/weed/storage/sample.idx

2
weed-fs/src/pkg/storage/store.go → src/weed/storage/store.go

@ -6,7 +6,7 @@ import (
"io/ioutil" "io/ioutil"
"log" "log"
"net/url" "net/url"
"pkg/util"
"weed/util"
"strconv" "strconv"
"strings" "strings"
) )

0
weed-fs/src/pkg/storage/volume.go → src/weed/storage/volume.go

0
weed-fs/src/pkg/storage/volume_id.go → src/weed/storage/volume_id.go

0
weed-fs/src/pkg/storage/volume_info.go → src/weed/storage/volume_info.go

0
weed-fs/src/pkg/storage/volume_version.go → src/weed/storage/volume_version.go

0
weed-fs/src/pkg/topology/configuration.go → src/weed/topology/configuration.go

0
weed-fs/src/pkg/topology/configuration_test.go → src/weed/topology/configuration_test.go

0
weed-fs/src/pkg/topology/data_center.go → src/weed/topology/data_center.go

2
weed-fs/src/pkg/topology/data_node.go → src/weed/topology/data_node.go

@ -2,7 +2,7 @@ package topology
import ( import (
_ "fmt" _ "fmt"
"pkg/storage"
"weed/storage"
"strconv" "strconv"
) )

2
weed-fs/src/pkg/topology/node.go → src/weed/topology/node.go

@ -2,7 +2,7 @@ package topology
import ( import (
"fmt" "fmt"
"pkg/storage"
"weed/storage"
) )
type NodeId string type NodeId string

2
weed-fs/src/pkg/topology/node_list.go → src/weed/topology/node_list.go

@ -3,7 +3,7 @@ package topology
import ( import (
"fmt" "fmt"
"math/rand" "math/rand"
"pkg/storage"
"weed/storage"
) )
type NodeList struct { type NodeList struct {

0
weed-fs/src/pkg/topology/node_list_test.go → src/weed/topology/node_list_test.go

0
weed-fs/src/pkg/topology/rack.go → src/weed/topology/rack.go

2
weed-fs/src/pkg/topology/topo_test.go → src/weed/topology/topo_test.go

@ -4,7 +4,7 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"math/rand" "math/rand"
"pkg/storage"
"weed/storage"
"testing" "testing"
"time" "time"
) )

6
weed-fs/src/pkg/topology/topology.go → src/weed/topology/topology.go

@ -4,9 +4,9 @@ import (
"errors" "errors"
"io/ioutil" "io/ioutil"
"math/rand" "math/rand"
"pkg/directory"
"pkg/sequence"
"pkg/storage"
"weed/directory"
"weed/sequence"
"weed/storage"
) )
type Topology struct { type Topology struct {

4
weed-fs/src/pkg/topology/topology_compact.go → src/weed/topology/topology_compact.go

@ -5,8 +5,8 @@ import (
"errors" "errors"
"fmt" "fmt"
"net/url" "net/url"
"pkg/storage"
"pkg/util"
"weed/storage"
"weed/util"
"time" "time"
) )

2
weed-fs/src/pkg/topology/topology_event_handling.go → src/weed/topology/topology_event_handling.go

@ -3,7 +3,7 @@ package topology
import ( import (
"fmt" "fmt"
"math/rand" "math/rand"
"pkg/storage"
"weed/storage"
"time" "time"
) )

0
weed-fs/src/pkg/topology/topology_map.go → src/weed/topology/topology_map.go

2
weed-fs/src/pkg/topology/volume_layout.go → src/weed/topology/volume_layout.go

@ -4,7 +4,7 @@ import (
"errors" "errors"
"fmt" "fmt"
"math/rand" "math/rand"
"pkg/storage"
"weed/storage"
) )
type VolumeLayout struct { type VolumeLayout struct {

0
weed-fs/src/pkg/topology/volume_location.go → src/weed/topology/volume_location.go

4
weed-fs/src/cmd/weed/upload.go → src/weed/upload.go

@ -7,8 +7,8 @@ import (
"net/url" "net/url"
"os" "os"
"path" "path"
"pkg/operation"
"pkg/util"
"weed/operation"
"weed/util"
"strconv" "strconv"
) )

0
weed-fs/src/pkg/util/bytes.go → src/weed/util/bytes.go

0
weed-fs/src/pkg/util/config.go → src/weed/util/config.go

0
weed-fs/src/pkg/util/parse.go → src/weed/util/parse.go

0
weed-fs/src/pkg/util/post.go → src/weed/util/post.go

0
weed-fs/src/cmd/weed/version.go → src/weed/version.go

6
weed-fs/src/cmd/weed/volume.go → src/weed/volume.go

@ -7,8 +7,8 @@ import (
"mime" "mime"
"net/http" "net/http"
"os" "os"
"pkg/operation"
"pkg/storage"
"weed/operation"
"weed/storage"
"runtime" "runtime"
"strconv" "strconv"
"strings" "strings"
@ -242,7 +242,7 @@ func DeleteHandler(w http.ResponseWriter, r *http.Request) {
n.Size = 0 n.Size = 0
ret, err := store.Delete(volumeId, n) ret, err := store.Delete(volumeId, n)
if err != nil { if err != nil {
log.Println("delete error: %s", err)
log.Printf("delete error: %s\n", err)
return return
} }

0
weed-fs/src/cmd/weed/weed.go → src/weed/weed.go

Loading…
Cancel
Save