You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2014/03/07 21:53:54 UTC

[40/50] [abbrv] git commit: Merge remote-tracking branch 'origin/1.5.2-SNAPSHOT' into 1.6.0-SNAPSHOT

Merge remote-tracking branch 'origin/1.5.2-SNAPSHOT' into 1.6.0-SNAPSHOT

Conflicts:
	core/src/main/java/org/apache/accumulo/core/conf/Property.java


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/d2da4315
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/d2da4315
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/d2da4315

Branch: refs/heads/ACCUMULO-2061
Commit: d2da4315c6907ce9d1cf2f5128b5ebd00d14ee73
Parents: 68afb1e f76b8e0
Author: John Vines <vi...@apache.org>
Authored: Thu Mar 6 16:23:36 2014 -0500
Committer: John Vines <vi...@apache.org>
Committed: Thu Mar 6 16:23:36 2014 -0500

----------------------------------------------------------------------
 .../java/org/apache/accumulo/core/conf/Interpolated.java     | 5 ++++-
 .../main/java/org/apache/accumulo/core/conf/Property.java    | 8 ++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/d2da4315/core/src/main/java/org/apache/accumulo/core/conf/Interpolated.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/conf/Interpolated.java
index d8d4499,0000000..1390db2
mode 100644,000000..100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/Interpolated.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/Interpolated.java
@@@ -1,30 -1,0 +1,33 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the "License"); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + *     http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.accumulo.core.conf;
 +
 +import java.lang.annotation.Inherited;
 +import java.lang.annotation.Retention;
 +import java.lang.annotation.RetentionPolicy;
 +
 +/**
 + * An annotation to denote {@link AccumuloConfiguration} {@link Property} keys, whose values should be interpolated with system properties.
++ * 
++ * Interpolated items need to be careful, as JVM properties could be updates and we may want that propogated when those changes occur. Currently only
++ * VFS_CLASSLOADER_CACHE_DIR, which isn't ZK mutable, is interpolated, so this shouldn't be an issue as java.io.tmpdir also shouldn't be changing.
 + */
 +@Inherited
 +@Retention(RetentionPolicy.RUNTIME)
 +@interface Interpolated {
-   
++
 +}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/d2da4315/core/src/main/java/org/apache/accumulo/core/conf/Property.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/conf/Property.java
index abad4ad,557ca1f..fc4d012
--- a/core/src/main/java/org/apache/accumulo/core/conf/Property.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
@@@ -18,12 -18,9 +18,13 @@@ package org.apache.accumulo.core.conf
  
  import java.io.File;
  import java.lang.annotation.Annotation;
 +import java.util.Collections;
  import java.util.EnumSet;
 +import java.util.HashMap;
  import java.util.HashSet;
 +import java.util.Map;
 +import java.util.Map.Entry;
+ import java.util.Properties;
  import java.util.Set;
  
  import org.apache.accumulo.core.client.security.tokens.PasswordToken;
@@@ -461,11 -387,14 +462,14 @@@ public enum Property 
    public String getRawDefaultValue() {
      return this.defaultValue;
    }
 -  
 +
    public String getDefaultValue() {
 -    if (this.interpolated) {
 +    if (isInterpolated()) {
        PropertiesConfiguration pconf = new PropertiesConfiguration();
-       pconf.append(new SystemConfiguration());
+       Properties systemProperties = System.getProperties();
+       synchronized (systemProperties) {
+         pconf.append(new MapConfiguration(systemProperties));
+       }
        pconf.addProperty("hack_default_value", this.defaultValue);
        String v = pconf.getString("hack_default_value");
        if (this.type == PropertyType.ABSOLUTEPATH)