Skip to content

Commit

Permalink
GEODE-8570: deprecate cluster-configuration-dir property (#5684)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinmeiliao committed Oct 30, 2020
1 parent a00f18d commit 4024509
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
package org.apache.geode.management.internal.configuration;

import static org.apache.geode.distributed.ConfigurationProperties.CLUSTER_CONFIGURATION_DIR;
import static org.apache.geode.distributed.ConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION;
import static org.apache.geode.distributed.ConfigurationProperties.GROUPS;
import static org.apache.geode.distributed.ConfigurationProperties.LOAD_CLUSTER_CONFIGURATION_FROM_DIR;
Expand Down Expand Up @@ -93,7 +92,6 @@ private MemberVM startLocatorWithLoadCCFromDir() throws Exception {
Properties properties = new Properties();
properties.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
properties.setProperty(LOAD_CLUSTER_CONFIGURATION_FROM_DIR, "true");
properties.setProperty(CLUSTER_CONFIGURATION_DIR, locatorDir.getCanonicalPath());

MemberVM locator = lsRule.startLocatorVM(0, properties);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package org.apache.geode.distributed;

import static org.apache.geode.distributed.AbstractLauncher.Status.STOPPED;
import static org.apache.geode.distributed.ConfigurationProperties.CLUSTER_CONFIGURATION_DIR;
import static org.apache.geode.distributed.ConfigurationProperties.DISABLE_AUTO_RECONNECT;
import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT;
import static org.apache.geode.distributed.internal.InternalConfigurationPersistenceService.CLUSTER_CONFIG_DISK_DIR_PREFIX;
Expand Down Expand Up @@ -120,7 +119,6 @@ protected Builder newBuilder() {
return new Builder()
.setMemberName(getUniqueName())
.setWorkingDirectory(getWorkingDirectoryPath())
.set(CLUSTER_CONFIGURATION_DIR, getClusterConfigDirectoryPath())
.set(DISABLE_AUTO_RECONNECT, "true");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,18 @@ public interface ConfigurationProperties {
* <U>Description</U>: This property specifies the directory in which the cluster configuration
* related disk-store and artifacts are stored This property is only applicable to dedicated
* locators which have "enable-cluster-configuration" set to true.
*
* Since 1.12, the product does not use this property anymore.
* </p>
* <U>Default</U>: ""
* </p>
* <U>Since</U>: GemFire 8.1
*
* @deprecated Since Geode1.14. use import-cluster-configuration and export-cluster-configuration
* to upload/download cluster configuration to/from the cluster.
*/

@Deprecated
String CLUSTER_CONFIGURATION_DIR = "cluster-configuration-dir";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2438,7 +2438,8 @@ public class CliStrings {
+ "\" directory.";
public static final String START_LOCATOR__CLUSTER__CONFIG__DIR = "cluster-config-dir";
public static final String START_LOCATOR__CLUSTER__CONFIG__DIR__HELP =
"Directory used by the cluster configuration service to store the cluster configuration on the filesystem";
"Deprecated: Since Geode 1.14, use import/export cluster-configuration command instead. " +
"This option has no effect since 1.12.";
public static final String START_LOCATOR__HTTP_SERVICE_PORT = "http-service-port";
public static final String START_LOCATOR__HTTP_SERVICE_PORT__HELP =
"Port on which HTTP Service will listen on";
Expand Down
2 changes: 1 addition & 1 deletion geode-docs/reference/topics/gemfire_properties.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Valid values are in the range 0...2147483647</td>
</tr>
<tr>
<td>cluster-configuration-dir</td>
<td>This property specifies the directory in which the cluster configuration related disk-store and artifacts are stored. This property is only applicable to dedicated locators that have &quot;enable-cluster-configuration&quot; set to true.</td>
<td><b>Deprecated.</b> Use the gfsh import/export cluster-configuration command instead. This property specifies the directory in which the cluster configuration related disk-store and artifacts are stored. This property is only applicable to dedicated locators that have &quot;enable-cluster-configuration&quot; set to true.</td>
<td>L</td>
<td><em>not set</em></td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,14 @@

import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;

import java.util.Properties;

import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.TemporaryFolder;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;

import org.apache.geode.distributed.ConfigurationProperties;
import org.apache.geode.distributed.internal.InternalConfigurationPersistenceService;
import org.apache.geode.internal.jndi.JNDIInvoker;
import org.apache.geode.management.internal.configuration.domain.Configuration;
Expand All @@ -50,16 +46,9 @@ public class DestroySecondJndiBindingCommandDUnitTest {
@Rule
public GfshCommandRule gfsh = new GfshCommandRule();

@Rule
public TemporaryFolder temporaryFolder = new TemporaryFolder();

@Before
public void before() throws Exception {
String clusterConfigDir = temporaryFolder.getRoot().getAbsolutePath();
Properties properties = new Properties();
properties.setProperty(ConfigurationProperties.CLUSTER_CONFIGURATION_DIR, clusterConfigDir);

locator = cluster.startLocatorVM(0, properties);
locator = cluster.startLocatorVM(0);
server1 = cluster.startServerVM(1, locator.getPort());
server2 = cluster.startServerVM(2, locator.getPort());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,6 @@ ResultModel doStartLocator(
StartMemberUtils.setPropertyIfNotNull(gemfireProperties,
ConfigurationProperties.LOAD_CLUSTER_CONFIGURATION_FROM_DIR,
loadSharedConfigurationFromDirectory);
StartMemberUtils.setPropertyIfNotNull(gemfireProperties,
ConfigurationProperties.CLUSTER_CONFIGURATION_DIR, clusterConfigDir);
StartMemberUtils.setPropertyIfNotNull(gemfireProperties,
ConfigurationProperties.HTTP_SERVICE_PORT, httpServicePort);
StartMemberUtils.setPropertyIfNotNull(gemfireProperties,
Expand Down

0 comments on commit 4024509

Please sign in to comment.