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 (
"encoding/hex"
"pkg/storage"
"pkg/util"
"weed/storage"
"weed/util"
"strings"
)

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

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

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

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

6
weed-fs/src/cmd/weed/master.go → 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"

6
weed-fs/src/pkg/operation/allocate_volume.go → 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 {

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"
_ "fmt"
"net/url"
"pkg/storage"
"pkg/util"
"weed/storage"
"weed/util"
)
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"
"fmt"
"math/rand"
"pkg/operation"
"pkg/storage"
"pkg/topology"
"weed/operation"
"weed/storage"
"weed/topology"
"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"
"fmt"
"math/rand"
"pkg/storage"
"pkg/topology"
"weed/storage"
"weed/topology"
"testing"
"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 (
"log"
"os"
"pkg/util"
"weed/util"
"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"
"net/http"
"path"
"pkg/util"
"weed/util"
"strconv"
"strings"
)

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

@ -3,7 +3,7 @@ package storage
import (
//"log"
"os"
"pkg/util"
"weed/util"
)
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"
"io"
"os"
"pkg/util"
"weed/util"
)
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"
"log"
"net/url"
"pkg/util"
"weed/util"
"strconv"
"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 (
_ "fmt"
"pkg/storage"
"weed/storage"
"strconv"
)

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

@ -2,7 +2,7 @@ package topology
import (
"fmt"
"pkg/storage"
"weed/storage"
)
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 (
"fmt"
"math/rand"
"pkg/storage"
"weed/storage"
)
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"
"fmt"
"math/rand"
"pkg/storage"
"weed/storage"
"testing"
"time"
)

6
weed-fs/src/pkg/topology/topology.go → 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 {

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

@ -5,8 +5,8 @@ import (
"errors"
"fmt"
"net/url"
"pkg/storage"
"pkg/util"
"weed/storage"
"weed/util"
"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 (
"fmt"
"math/rand"
"pkg/storage"
"weed/storage"
"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"
"fmt"
"math/rand"
"pkg/storage"
"weed/storage"
)
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"
"os"
"path"
"pkg/operation"
"pkg/util"
"weed/operation"
"weed/util"
"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"
"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
}

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

Loading…
Cancel
Save