On Dec 15, 1:41 am, "孔令华" <[email protected]> wrote:
> Hi Luke,
>
> Thank you very much!!  It works. And I think the new config system is
> something like the getopt with some groups of predefined options, right?

Yeah, it's similar but more extensible and provides better validation.

> The only problem is that if I want to read some items from the config-file
> without creating a client, is there any proper interface?

Yes. I did have that use case in mind. You can create any properties
object use
{{{
    PropertiesPtr props = new Properties(); // I should provide a
short cut here
    props->load(config_filename, Config::file_desc());
}}}

So the only interface difference with the old properties object for
'load' is the second config file description object, which provides
default values and validation of the config file.

> http://groups.google.com/group/hypertable-dev/web/htdump.tgz?hl=en
> This program is written by us used to monitor the hypertable cluster. And I
> cannot find an elegant way to make it work with the new config system. And
> you can use it to help me to learn the new config system, thank you very
> much.

The least disruptive changes would use the properties object like the
above. There are more elegant changes (shorter code, better defaults/
validation of the properties) of course. The program looks useful. Do
you mind that we include this in the src/cc/Tools, so that we can
maintain it when the interface changes (we have some major hyperspace
changes in the works that would require changes to this program)

__Luke

>
> Best wishes!
>
> 2008/12/13 Luke <[email protected]>
>
>
>
>
>
> > On Dec 12, 4:38 am, Phoenix <[email protected]> wrote:
> > > Hi Doug,
>
> > > Oh, sorry. Java6 was mentioned. I missed it.
>
> > > And now it seems that the config is a problem for me. Can you give
> > > some instructions?  And the apache example is out of date. Perhaps
> > > it's time to update it.
>
> > The apache examples should still work as is. The only thing that
> > prevent it from working properly is probably the timeout changes from
> > second to milliseconds, so the RETRY_TIMEOUT in the load program
> > should be 30000 now. I've updated the wiki to reflect that.
>
> > > Thank you. :)
>
> > > Best wishes
>
> > > On Dec 12, 7:16 pm, Phoenix <[email protected]> wrote:
>
> > > > Hi Doug,
>
> > > > According to the src, now the config-options need something called
> > > > Policy which makes it hard to write client program.
>
> > > > In older versions I can run a client program on another machine that
> > > > just needs a config file. But now it seems hard to do so.  The
> > > > configurations is get from the Config namespace, I donnot know how to
> > > > force it read from a local config file.  I tried the Properties ::load
> > > > but failed. A Properties constructor which accepts a config file as a
> > > > parameter may help a lot.
>
> > > > Perhaps we need more and update examples. And also the Makefile now
> > > > needs more libraries to link with. An example is helpful.
>
> > > > BTW, the DfsBroker is using java6 now. It would be better to mention
> > > > this in the log.  As the earlier version can be used with java5.
>
> > > > Best wishes.
>
> > > > On Dec 9, 5:07 am, "Doug Judd" <[email protected]> wrote:
>
> > > > > This latest version of Hypertable is incompatible with older
> > versions.  Here
> > > > > is a list of the incompatibilities:
>
> > > > > 1. All timeouts have changed from seconds to milliseconds
> > > > > 2. Hyperspace data format has changed
> > > > > 3. Network wire protocol has changed
>
> > > > > To use this release, you will have to start with a clean database.
> >  If you
> > > > > have any pre-existing config files, you will have to modify them by
> > changing
> > > > > all of the time properties from *seconds* to *milliseconds*.  Also,
> > there
> > > > > are a few more build dependencies:
>
> > > > > SIGAR (http://sourceforge.net/projects/sigar/)
> > > > > libevent (only required for optional ThriftBroker build)
> > > > > thrift (only required for optional ThriftBroker build)
>
> > > > > - Doug
>
> --
> ******************************************************
> Microprocessor R&D Center, Peking University
> Beijing, P.R.China, 100871
> Tel:   8610-62765828 ext. 874
> Fax:   8610-62756231
> Email: [email protected]
> ******************************************************
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Hypertable Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/hypertable-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to