mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
re-organize code directory structure
This commit is contained in:
parent
d3b267bac2
commit
cb4e8ec16b
|
@ -2,8 +2,8 @@ package directory
|
|||
|
||||
import (
|
||||
"encoding/hex"
|
||||
"pkg/storage"
|
||||
"pkg/util"
|
||||
"weed/storage"
|
||||
"weed/util"
|
||||
"strings"
|
||||
)
|
||||
|
|
@ -7,8 +7,8 @@ import (
|
|||
"log"
|
||||
"os"
|
||||
"path"
|
||||
"pkg/directory"
|
||||
"pkg/storage"
|
||||
"weed/directory"
|
||||
"weed/storage"
|
||||
"strconv"
|
||||
"strings"
|
||||
"text/template"
|
|
@ -4,7 +4,7 @@ import (
|
|||
"log"
|
||||
"os"
|
||||
"path"
|
||||
"pkg/storage"
|
||||
"weed/storage"
|
||||
"strconv"
|
||||
)
|
||||
|
|
@ -5,9 +5,9 @@ import (
|
|||
"errors"
|
||||
"log"
|
||||
"net/http"
|
||||
"pkg/replication"
|
||||
"pkg/storage"
|
||||
"pkg/topology"
|
||||
"weed/replication"
|
||||
"weed/storage"
|
||||
"weed/topology"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
|
@ -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 {
|
|
@ -5,8 +5,8 @@ import (
|
|||
"errors"
|
||||
_ "fmt"
|
||||
"net/url"
|
||||
"pkg/storage"
|
||||
"pkg/util"
|
||||
"weed/storage"
|
||||
"weed/util"
|
||||
)
|
||||
|
||||
type Location struct {
|
|
@ -4,9 +4,9 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"pkg/operation"
|
||||
"pkg/storage"
|
||||
"pkg/topology"
|
||||
"weed/operation"
|
||||
"weed/storage"
|
||||
"weed/topology"
|
||||
"sync"
|
||||
)
|
||||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"pkg/storage"
|
||||
"pkg/topology"
|
||||
"weed/storage"
|
||||
"weed/topology"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
|
@ -3,7 +3,7 @@ package storage
|
|||
import (
|
||||
"log"
|
||||
"os"
|
||||
"pkg/util"
|
||||
"weed/util"
|
||||
"testing"
|
||||
)
|
||||
|
|
@ -7,7 +7,7 @@ import (
|
|||
"mime"
|
||||
"net/http"
|
||||
"path"
|
||||
"pkg/util"
|
||||
"weed/util"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
|
@ -3,7 +3,7 @@ package storage
|
|||
import (
|
||||
//"log"
|
||||
"os"
|
||||
"pkg/util"
|
||||
"weed/util"
|
||||
)
|
||||
|
||||
type NeedleMap struct {
|
|
@ -5,7 +5,7 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"pkg/util"
|
||||
"weed/util"
|
||||
)
|
||||
|
||||
const (
|
|
@ -6,7 +6,7 @@ import (
|
|||
"io/ioutil"
|
||||
"log"
|
||||
"net/url"
|
||||
"pkg/util"
|
||||
"weed/util"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
|
@ -2,7 +2,7 @@ package topology
|
|||
|
||||
import (
|
||||
_ "fmt"
|
||||
"pkg/storage"
|
||||
"weed/storage"
|
||||
"strconv"
|
||||
)
|
||||
|
|
@ -2,7 +2,7 @@ package topology
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"pkg/storage"
|
||||
"weed/storage"
|
||||
)
|
||||
|
||||
type NodeId string
|
|
@ -3,7 +3,7 @@ package topology
|
|||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"pkg/storage"
|
||||
"weed/storage"
|
||||
)
|
||||
|
||||
type NodeList struct {
|
|
@ -4,7 +4,7 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"pkg/storage"
|
||||
"weed/storage"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
|
@ -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 {
|
|
@ -5,8 +5,8 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"net/url"
|
||||
"pkg/storage"
|
||||
"pkg/util"
|
||||
"weed/storage"
|
||||
"weed/util"
|
||||
"time"
|
||||
)
|
||||
|
|
@ -3,7 +3,7 @@ package topology
|
|||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"pkg/storage"
|
||||
"weed/storage"
|
||||
"time"
|
||||
)
|
||||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"pkg/storage"
|
||||
"weed/storage"
|
||||
)
|
||||
|
||||
type VolumeLayout struct {
|
|
@ -7,8 +7,8 @@ import (
|
|||
"net/url"
|
||||
"os"
|
||||
"path"
|
||||
"pkg/operation"
|
||||
"pkg/util"
|
||||
"weed/operation"
|
||||
"weed/util"
|
||||
"strconv"
|
||||
)
|
||||
|
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in a new issue