[ 
https://issues.apache.org/jira/browse/ACCUMULO-2425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13926270#comment-13926270
 ] 

John Vines commented on ACCUMULO-2425:
--------------------------------------

I got a response from the commons configuration folks, and 
http://commons.apache.org/proper/commons-configuration/userguide/howto_basicfeatures.html#Variable_Interpolation
 was pointed out to me. Changing VFS_CLASSLOADER_CACHE_DIR's default value to 
have a sys: in front of the two variables allowed me to change 
getDefaultValue() to
{code}
  public String getDefaultValue() {
    if (this.interpolated) {
      PropertiesConfiguration pconf = new PropertiesConfiguration();
      pconf.addProperty("hack_default_value", this.defaultValue);
      String v = pconf.getString("hack_default_value");
      if (this.type == PropertyType.ABSOLUTEPATH)
        return new File(v).getAbsolutePath();
      else
        return v;
    } else {
      return getRawDefaultValue();
    }
  }
{code}

Theoretically, we could just make it
{code}
  public String getDefaultValue() {
      PropertiesConfiguration pconf = new PropertiesConfiguration();
      pconf.addProperty("hack_default_value", this.defaultValue);
      String v = pconf.getString("hack_default_value");
      if (this.type == PropertyType.ABSOLUTEPATH)
        return new File(v).getAbsolutePath();
      else
        return v;
  }
{code}

and just squelch interpolation entirely. However, I'm hesitant to even make 
just the first fix because that would actually change the parsing behavior for 
that one property. We'd need to make it clear that that's how system properties 
need to be set up.

> ConcurrentModificationException in master at startup
> ----------------------------------------------------
>
>                 Key: ACCUMULO-2425
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2425
>             Project: Accumulo
>          Issue Type: Bug
>          Components: master
>    Affects Versions: 1.5.1
>            Reporter: John Vines
>            Assignee: John Vines
>             Fix For: 1.5.2, 1.6.0
>
>
> I had brought down my accumulo services hard, immediately ran start-here to 
> bring them up again and the master didn't seem to start. Checked the logs and 
> I had 
> {code}2014-03-03 16:38:05,336 [master.Master] ERROR: Unexpected exception, 
> exiting
> java.util.ConcurrentModificationException
>         at java.util.Hashtable$Enumerator.next(Hashtable.java:1048)
>         at 
> org.apache.commons.configuration.AbstractConfiguration.append(AbstractConfiguration.java:1239)
>         at 
> org.apache.accumulo.core.conf.Property.getDefaultValue(Property.java:401)
>         at 
> org.apache.accumulo.core.conf.DefaultConfiguration.iterator(DefaultConfiguration.java:54)
>         at 
> org.apache.accumulo.core.conf.SiteConfiguration.iterator(SiteConfiguration.java:77)
>         at 
> org.apache.accumulo.server.conf.ZooConfiguration.iterator(ZooConfiguration.java:127)
>         at org.apache.accumulo.server.Accumulo.init(Accumulo.java:125)
>         at org.apache.accumulo.server.master.Master.main(Master.java:2303)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:622)
>         at org.apache.accumulo.start.Main$1.run(Main.java:103)
>         at java.lang.Thread.run(Thread.java:701)
> {code}
> sitting there, and then it seems the master died. Started it up again and it 
> was fine.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to