geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [54/77] incubator-geode git commit: GEODE-406: Adding --J parameter to validate offline-disk-store
Date Mon, 26 Oct 2015 18:09:57 GMT
GEODE-406: Adding --J parameter to validate offline-disk-store

It's useful when debugging the contents of a disk store to be able to
pass parameters to the validate command to enable tracing of the output.


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

Branch: refs/heads/feature/GEODE-409
Commit: 1cb906cbf286ad0ad3ab9381e4c0cff6af7efd80
Parents: e45f5e3
Author: Dan Smith <upthewaterspout@apache.org>
Authored: Thu Oct 15 15:37:38 2015 -0700
Committer: Dan Smith <upthewaterspout@apache.org>
Committed: Fri Oct 16 14:59:04 2015 -0700

----------------------------------------------------------------------
 .../cli/commands/DiskStoreCommands.java         | 21 ++++++++++++++++----
 .../internal/cli/i18n/CliStrings.java           |  2 ++
 2 files changed, 19 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1cb906cb/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommands.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommands.java
b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommands.java
index 4614ce7..12038dc 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommands.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommands.java
@@ -1148,11 +1148,16 @@ public class DiskStoreCommands extends AbstractCommandsSupport {
                   help=CliStrings.VALIDATE_DISK_STORE__NAME__HELP)
                   String diskStoreName,
       @CliOption(key=CliStrings.VALIDATE_DISK_STORE__DISKDIRS,
-                 mandatory=true,
-                 unspecifiedDefaultValue=CliMetaData.ANNOTATION_NULL_VALUE,             
   
-                 help=CliStrings.VALIDATE_DISK_STORE__DISKDIRS__HELP)
+                  mandatory=true,
+                  unspecifiedDefaultValue=CliMetaData.ANNOTATION_NULL_VALUE,            
    
+                  help=CliStrings.VALIDATE_DISK_STORE__DISKDIRS__HELP)
       @CliMetaData (valueSeparator = ",")
-                  String[] diskDirs) {   
+                  String[] diskDirs,
+      @CliOption(key=CliStrings.VALIDATE_DISK_STORE__J,
+                  unspecifiedDefaultValue=CliMetaData.ANNOTATION_NULL_VALUE,
+                  help=CliStrings.VALIDATE_DISK_STORE__J__HELP)
+      @CliMetaData (valueSeparator = ",")
+      String[] jvmProps) {   
     try {
       String resultString = new String();
       
@@ -1169,6 +1174,14 @@ public class DiskStoreCommands extends AbstractCommandsSupport {
 
       configureLogging(commandList);
       
+      if (jvmProps != null && jvmProps.length != 0) {
+        for (int i = 0; i < jvmProps.length; i++) {
+          commandList.add(jvmProps[i]);
+        }
+      }
+      
+      //Pass any java options on to the command
+      commandList.add(System.getenv("JAVA_OPTS"));
       commandList.add("-classpath");
       commandList.add(System.getProperty("java.class.path", "."));
       commandList.add(DiskStoreValidater.class.getName());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1cb906cb/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
index a4561bf..b6d727d 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
@@ -2063,6 +2063,8 @@ public class CliStrings {
   public static final String VALIDATE_DISK_STORE__NAME__HELP = "Name of the disk store to
be validated.";
   public static final String VALIDATE_DISK_STORE__DISKDIRS = "disk-dirs";
   public static final String VALIDATE_DISK_STORE__DISKDIRS__HELP = "Directories where data
for the disk store was previously written.";
+  public static final String VALIDATE_DISK_STORE__J = "J";
+  public static final String VALIDATE_DISK_STORE__J__HELP = "Arguments passed to the Java
Virtual Machine performing the compact operation on the disk store.";
   public static final String VALIDATE_DISK_STORE__MSG__NO_DIRS = VALIDATE_DISK_STORE__DISKDIRS
+ " is mandatory";
   public static final String VALIDATE_DISK_STORE__MSG__IO_ERROR = "Input/Output error in
validating disk store {0} is : {1}";
   public static final String VALIDATE_DISK_STORE__MSG__ERROR = "Error in validating disk
store {0} is : {1}";


Mime
View raw message