diff --git a/go/filer/cassandra_store/cassandra_store.go b/go/filer/cassandra_store/cassandra_store.go index e602548db..1c2be8a8e 100644 --- a/go/filer/cassandra_store/cassandra_store.go +++ b/go/filer/cassandra_store/cassandra_store.go @@ -3,8 +3,6 @@ package cassandra_store import ( "fmt" - "github.com/chrislusf/seaweedfs/go/filer" - "github.com/chrislusf/seaweedfs/go/filer/flat_namespace" "github.com/chrislusf/seaweedfs/go/glog" "github.com/gocql/gocql" @@ -87,20 +85,3 @@ func (c *CassandraStore) Close() { c.session.Close() } } - -func (c *CassandraStore) FindDirectory(dirPath string) (dirId filer.DirectoryId, err error) { - return 0, flat_namespace.ErrNotImplemented -} -func (c *CassandraStore) ListDirectories(dirPath string) (dirs []filer.DirectoryEntry, err error) { - return nil, flat_namespace.ErrNotImplemented -} -func (c *CassandraStore) ListFiles(dirPath string, lastFileName string, limit int) (files []filer.FileEntry, err error) { - return nil, flat_namespace.ErrNotImplemented -} -func (c *CassandraStore) DeleteDirectory(dirPath string, recursive bool) (err error) { - return flat_namespace.ErrNotImplemented -} - -func (c *CassandraStore) Move(fromPath string, toPath string) error { - return flat_namespace.ErrNotImplemented -} diff --git a/go/filer/flat_namespace/flat_namespace_filer.go b/go/filer/flat_namespace/flat_namespace_filer.go index 2a2fd657b..9959b2924 100644 --- a/go/filer/flat_namespace/flat_namespace_filer.go +++ b/go/filer/flat_namespace/flat_namespace_filer.go @@ -29,16 +29,16 @@ func (filer *FlatNamespaceFiler) FindFile(fullFileName string) (fid string, err return filer.store.Get(fullFileName) } func (filer *FlatNamespaceFiler) FindDirectory(dirPath string) (dirId filer.DirectoryId, err error) { - return filer.store.FindDirectory(dirPath) + return 0, ErrNotImplemented } func (filer *FlatNamespaceFiler) ListDirectories(dirPath string) (dirs []filer.DirectoryEntry, err error) { - return filer.store.ListDirectories(dirPath) + return nil, ErrNotImplemented } func (filer *FlatNamespaceFiler) ListFiles(dirPath string, lastFileName string, limit int) (files []filer.FileEntry, err error) { - return filer.store.ListFiles(dirPath, lastFileName, limit) + return nil, ErrNotImplemented } func (filer *FlatNamespaceFiler) DeleteDirectory(dirPath string, recursive bool) (err error) { - return filer.store.DeleteDirectory(dirPath, recursive) + return ErrNotImplemented } func (filer *FlatNamespaceFiler) DeleteFile(fullFileName string) (fid string, err error) { @@ -46,5 +46,5 @@ func (filer *FlatNamespaceFiler) DeleteFile(fullFileName string) (fid string, er } func (filer *FlatNamespaceFiler) Move(fromPath string, toPath string) error { - return filer.store.Move(fromPath, toPath) + return ErrNotImplemented } diff --git a/go/filer/flat_namespace/flat_namespace_store.go b/go/filer/flat_namespace/flat_namespace_store.go index 8bb0d0a13..832b70e40 100644 --- a/go/filer/flat_namespace/flat_namespace_store.go +++ b/go/filer/flat_namespace/flat_namespace_store.go @@ -1,16 +1,9 @@ package flat_namespace -import "github.com/chrislusf/seaweedfs/go/filer" +import () type FlatNamespaceStore interface { Put(fullFileName string, fid string) (err error) Get(fullFileName string) (fid string, err error) Delete(fullFileName string) (fid string, err error) - - //redis store support these functions - FindDirectory(dirPath string) (dirId filer.DirectoryId, err error) - ListDirectories(dirPath string) (dirs []filer.DirectoryEntry, err error) - ListFiles(dirPath string, lastFileName string, limit int) (files []filer.FileEntry, err error) - DeleteDirectory(dirPath string, recursive bool) (err error) - Move(fromPath string, toPath string) error }