You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Jean-Marc Spaggiari <je...@spaggiari.org> on 2013/10/24 21:40:31 UTC

Do we want HBASE-9820?

Small and simple. Do we want it? Or not really good to have this hardcode?

Another option is to exit if plugins is empty...

Re: Do we want HBASE-9820?

Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
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 <yu...@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 <yu...@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...
> > > >
> > >
> >
>

Re: Do we want HBASE-9820?

Posted by Ted Yu <yu...@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 <yu...@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...
> > >
> >
>

Re: Do we want HBASE-9820?

Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
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 <yu...@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...
> >
>

Re: Do we want HBASE-9820?

Posted by Ted Yu <yu...@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...
>