geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [2/3] incubator-geode git commit: GEODE-1682: Adding options for starting Geode REST API using gfsh
Date Tue, 02 Aug 2016 16:04:32 GMT
GEODE-1682: Adding options for starting Geode REST API using gfsh


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

Branch: refs/heads/develop
Commit: ab884e7563ae6ec049eb4fb8539b828f5d2ef2ff
Parents: 2e2b446
Author: Avinash <avinash@ampool.io>
Authored: Mon Jul 25 14:29:53 2016 +0530
Committer: Kirk Lund <klund@apache.org>
Committed: Tue Aug 2 09:04:16 2016 -0700

----------------------------------------------------------------------
 .../gemfire/cache/server/CacheServer.java       |  5 +++++
 .../cli/commands/LauncherLifecycleCommands.java | 20 +++++++++++++++++++-
 .../internal/cli/i18n/CliStrings.java           |  9 ++++++++-
 3 files changed, 32 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ab884e75/geode-core/src/main/java/com/gemstone/gemfire/cache/server/CacheServer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/server/CacheServer.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/server/CacheServer.java
index 8aac772..57d7984 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/server/CacheServer.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/server/CacheServer.java
@@ -143,6 +143,11 @@ public interface CacheServer {
    */
   public static final boolean DEFAULT_TCP_NO_DELAY = true;
 
+
+  public static final int HTTP_DEFAULT_PORT = 8080;
+  public static final String HTTP_SERVICE_DEFAULT_BIND_ADDRESS = "";
+
+
   /**
    * Returns the port on which this cache server listens for clients.
    */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ab884e75/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommands.java
b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommands.java
index 2926822..03eff6d 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommands.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommands.java
@@ -1484,7 +1484,20 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport
{
           unspecifiedDefaultValue = "true",
           specifiedDefaultValue = "true",
           help = CliStrings.START_SERVER__USE_CLUSTER_CONFIGURATION__HELP)
-      final Boolean requestSharedConfiguration)
+      final Boolean requestSharedConfiguration,
+          @CliOption(key = CliStrings.START_SERVER__REST_API,
+          unspecifiedDefaultValue = "false",
+          specifiedDefaultValue = "true",
+          help = CliStrings.START_SERVER__REST_API__HELP)
+      final Boolean startRestApi,
+          @CliOption(key = CliStrings.START_SERVER__HTTP_SERVICE_PORT,
+            unspecifiedDefaultValue = ("" + CacheServer.HTTP_DEFAULT_PORT),
+            help = CliStrings.START_SERVER__HTTP_SERVICE_PORT__HELP)
+      final String httpServicePort,
+          @CliOption(key = CliStrings.START_SERVER__HTTP_SERVICE_BIND_ADDRESS,
+           unspecifiedDefaultValue = CacheServer.HTTP_SERVICE_DEFAULT_BIND_ADDRESS,
+           help = CliStrings.START_SERVER__HTTP_SERVICE_BIND_ADDRESS__HELP)
+           final String httpServiceBindAddress)
   // NOTICE: keep the parameters in alphabetical order based on their CliStrings.START_SERVER_*
text
   {
 
@@ -1547,6 +1560,11 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport
{
       gemfireProperties.setProperty(LOCK_MEMORY, StringUtils.valueOf(lockMemory, StringUtils.EMPTY_STRING));
       gemfireProperties.setProperty(OFF_HEAP_MEMORY_SIZE, StringUtils.valueOf(offHeapMemorySize,
StringUtils.EMPTY_STRING));
 
+      gemfireProperties.setProperty(DistributionConfig.START_DEV_REST_API_NAME, StringUtils.valueOf(startRestApi,
StringUtils.EMPTY_STRING));
+      gemfireProperties.setProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME,  StringUtils.valueOf(httpServicePort,
StringUtils.EMPTY_STRING));
+      gemfireProperties.setProperty(DistributionConfig.HTTP_SERVICE_BIND_ADDRESS_NAME,  StringUtils.valueOf(httpServiceBindAddress,
StringUtils.EMPTY_STRING));
+
+
       // read the OSProcess enable redirect system property here -- TODO: replace with new
GFSH argument
       final boolean redirectOutput = Boolean.getBoolean(OSProcess.ENABLE_OUTPUT_REDIRECTION_PROPERTY);
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ab884e75/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
index 120c4e2..0606ee6 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
@@ -2194,7 +2194,14 @@ public class CliStrings {
   public static final String PDX_DELETE_FIELD__SUCCESS = "Successfully deleted field in types:\n{0}";
   public static final String PDX_DELETE_FIELD__ERROR = "Error deleting field : {0}";
   public static final String PDX_DELETE__EMPTY = "Field to be deleted not found in the class.";
-  
+
+
+  public static final String START_SERVER__REST_API = "start-rest-api";
+  public static final String START_SERVER__REST_API__HELP = "When set to true, will start
the REST API service.";
+  public static final String START_SERVER__HTTP_SERVICE_PORT = "http-service-port";
+  public static final String START_SERVER__HTTP_SERVICE_PORT__HELP = "Port on which HTTP
Service will listen on";
+  public static final String START_SERVER__HTTP_SERVICE_BIND_ADDRESS = "http-service-bind-address";
+  public static final String START_SERVER__HTTP_SERVICE_BIND_ADDRESS__HELP = "The IP address
on which the HTTP Service will be bound.  By default, the Server is bound to all local addresses.";
   /**
    * Creates a MessageFormat with the given pattern and uses it to format the given argument.
    *


Mime
View raw message