hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Marc Spaggiari <jean-m...@spaggiari.org>
Subject Re: Do we want HBASE-9820?
Date Thu, 24 Oct 2013 20:45:16 GMT
what's about this instead? We don't need to setup the cleaner in the conf
if it's not on the properties files. So we simply exist? Else, I will
update the patch to put the DEFAULT value into HConstants... Because maybe
we don't want this value to be "unset"?

  /**
   * This method modifies the master's configuration in order to inject
   * replication-related features
   * @param conf
   */
  public static void decorateMasterConfiguration(Configuration conf) {
    if (!isReplication(conf)) {
      return;
    }
    String plugins = conf.get(HBASE_MASTER_LOGCLEANER_PLUGINS);
    if (plugins == null)
      return;
    String cleanerClass = ReplicationLogCleaner.class.getCanonicalName();
    if (!plugins.contains(cleanerClass)) {
      conf.set(HBASE_MASTER_LOGCLEANER_PLUGINS, plugins + "," +
cleanerClass);
    }
  }



2013/10/24 Ted Yu <yuzhihong@gmail.com>

> What about the following code ?
>
>     cleaners = conf.getStrings(HConstants.HBASE_MASTER_LOGCLEANER_PLUGINS);
>
> ./hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java
>
> Should default be provided there as well ?
>
>
> On Thu, Oct 24, 2013 at 12:53 PM, Jean-Marc Spaggiari <
> jean-marc@spaggiari.org> wrote:
>
> > Exact. But if anyone change that, typo, or anything, we will fail. So a
> > simple fix can avoid that. I'm not saying it's 100% required, but it's a
> > nice safety valve?
> >
> >
> > 2013/10/24 Ted Yu <yuzhihong@gmail.com>
> >
> > > In hbase-common/src/main/resources/hbase-default.xml, we already have:
> > >
> > >   <property>
> > >     <name>hbase.master.logcleaner.plugins</name>
> > >
> > >
> >
> <value>org.apache.hadoop.hbase.master.cleaner.TimeToLiveLogCleaner</value>
> > > If downstream project propagates default HBase configuration resources
> > > correctly, the change shouldn't be needed, right ?
> > >
> > >
> > > On Thu, Oct 24, 2013 at 12:40 PM, Jean-Marc Spaggiari <
> > > jean-marc@spaggiari.org> wrote:
> > >
> > > > Small and simple. Do we want it? Or not really good to have this
> > > hardcode?
> > > >
> > > > Another option is to exit if plugins is empty...
> > > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message