unreg_domain

Jay Weber jweber at mediamachines.com
Sun Feb 17 15:34:16 UTC 2008


> I've never actually used the namespace notation for domain before. I'm
> not sure if it works.
> 
> Does it work if you flatly specify the domain?

Ah, I see.  The domain should just be "foo", the class is a key class.
Now I don't get that error, thanks!

Though now I get an error:
Can't use string ("1") as a HASH ref while "strict refs" in use at
/usr/lib/perl
5/site_perl/5.8.8/MogileFS/Client.pm line 549, <Sock_127.0.0.1:6001>
line 2.

which I'll have to dig into, unless anybody has a quick suggestion.

jay

> Jay Weber wrote:
> > Hello, just joined, need to start with a plea for help.
> >
> > I'm setting up a test installation, one tracker, one storage server,
> two
> > devices, all on the same machine.  They seem to be running fine:
> >
> > -bash-3.1$ ./mogadm --lib=/usr/lib/perl5/5.8.8 --
> trackers=127.0.0.1:6001
> > check
> >
> > Checking trackers...
> >
> >   127.0.0.1:6001 ... OK
> >
> > Checking hosts...
> >
> >   [ 1] mogilestorage ... OK
> >
> > Checking devices...
> >
> >   host device         size(G)    used(G)    free(G)   use%   ob
state
> I/O%
> >
> >   ---- ------------ ---------- ---------- ---------- ------
---------
> - -----
> >
> >   [ 1] dev1            72.252     55.958     16.294  77.45%
> writeable   0.0
> >
> >   [ 1] dev2            72.252     55.958     16.294  77.45%
> writeable   0.0
> >
> >   ---- ------------ ---------- ---------- ---------- ------
> >
> >              total:   144.505    111.916     32.588  77.45%
> >
> > -bash-3.1$ ./mogadm --lib=/usr/lib/perl5/5.8.8 --
> trackers=127.0.0.1:6001
> > domain
> >
> >  list
> >
> >  domain               class                mindevcount
> >
> > -------------------- -------------------- -------------
> >
> >  foo                  default                   2
> >
> >  foo                  test                      2
> >
> > so I wrote a little test client based on the MogileFS::Client doc:
> >
> > use MogileFS::Client;
> >
> > # create client object w/ server-configured namespace
> >
> > # and IPs of trackers
> >
> > $mogc = MogileFS::Client->new(domain => "foo::test",
> >
> >                               hosts  => ['127.0.0.1:6001']);
> >
> > die "Unable to initialize MogileFS object.\n" unless $mogc;
> >
> > # create a file
> >
> > # mogile is a flat namespace.  no paths.
> >
> > $key   = "test:bar";
> >
> > # must be configured on server
> >
> > $fh = $mogc->new_file($key);
> >
> > die "Unable to allocate filehandle: ".$mogc->errstr.".\n" unless
$fh;
> >
> > $data = "baz";
> >
> > print $fh $data;
> >
> > unless ($fh->close) {
> >
> >    die "Error writing file: " . $mogc->errcode . ": " . $mogc-
> >errstr;
> >
> > }
> >
> > $file_contents = $mogc->get_file_data("foo");
> >
> > print "Retrieved $file_contents\n";
> >
> > and when running it I get an error:
> >
> > -bash-3.1$ perl test1.pl
> >
> > Unable to allocate filehandle: unreg_domain Domain name invalid/not
> found.
> >
> > which I don't understand since I have a domain::class of foo::test,
> as
> > above, looks registered to me.  Or is it that my key namespace must
> be
> > registered with the servers (as suggested by the "must be configured
> on
> > server" comment from the docs).  But I don't know how to register
key
> > namespaces.
> >
> > Any help greatly appreciated.
> >
> > jay
> >
> 




More information about the mogilefs mailing list