Michael Blow has submitted this change and it was merged.

Change subject: [NO ISSUE] Remove instance.name, storage.subdir config 
properties
......................................................................


[NO ISSUE] Remove instance.name, storage.subdir config properties

Change-Id: Ic530559e96eb4c744499f46a5595e3a4c59f7683
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2585
Reviewed-by: Murtadha Hubail <mhub...@apache.org>
Integration-Tests: Murtadha Hubail <mhub...@apache.org>
Tested-by: Murtadha Hubail <mhub...@apache.org>
Reviewed-by: Michael Blow <mb...@apache.org>
---
M asterixdb/asterix-app/src/main/resources/cc-rep.conf
M asterixdb/asterix-app/src/test/resources/cc-multipart.conf
M asterixdb/asterix-app/src/test/resources/cc.conf
M 
asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
M 
asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
M 
asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/MetadataProperties.java
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/NodeProperties.java
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/PropertiesAccessor.java
M asterixdb/asterix-doc/src/site/markdown/ncservice.md
M 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/ClusterStateManager.java
M asterixdb/asterix-server/src/main/opt/local/conf/cc.conf
M asterixdb/asterix-server/src/test/resources/NCServiceExecutionIT/cc.conf
M asterixdb/asterix-server/src/test/resources/NcLifecycleIT/cc.conf
M asterixdb/asterix-server/src/test/resources/ReplicationIT/cc.conf
15 files changed, 4 insertions(+), 34 deletions(-)

Approvals:
  Michael Blow: Looks good to me, but someone else must approve
  Murtadha Hubail: Looks good to me, approved; Verified; Verified



diff --git a/asterixdb/asterix-app/src/main/resources/cc-rep.conf 
b/asterixdb/asterix-app/src/main/resources/cc-rep.conf
index 1f4e5a5..818b835 100644
--- a/asterixdb/asterix-app/src/main/resources/cc-rep.conf
+++ b/asterixdb/asterix-app/src/main/resources/cc-rep.conf
@@ -37,7 +37,6 @@
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m 
-Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.subdir=test_storage
 storage.memorycomponent.globalbudget = 1073741824
 
 [cc]
diff --git a/asterixdb/asterix-app/src/test/resources/cc-multipart.conf 
b/asterixdb/asterix-app/src/test/resources/cc-multipart.conf
index 5cf1bbe..9c64ab4 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-multipart.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-multipart.conf
@@ -35,7 +35,6 @@
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m 
-Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.subdir=test_storage
 storage.buffercache.pagesize=32KB
 storage.buffercache.size=48MB
 storage.memorycomponent.globalbudget=512MB
diff --git a/asterixdb/asterix-app/src/test/resources/cc.conf 
b/asterixdb/asterix-app/src/test/resources/cc.conf
index 1c141f1..fc95dd4 100644
--- a/asterixdb/asterix-app/src/test/resources/cc.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc.conf
@@ -35,7 +35,6 @@
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m 
-Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.subdir=test_storage
 storage.buffercache.pagesize=32KB
 storage.buffercache.size=48MB
 storage.memorycomponent.globalbudget=512MB
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
index 28ef0eb..0e619cc 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
@@ -13,7 +13,6 @@
     "compiler\.sortmemory" : 327680,
     "compiler\.textsearchmemory" : 163840,
     "default\.dir" : "target/io/dir/asterixdb",
-    "instance\.name" : "DEFAULT_INSTANCE",
     "log\.level" : "INFO",
     "max\.wait\.active\.cluster" : 60,
     "messaging\.frame\.count" : 512,
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
index 61cf528..b3a3eed 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
@@ -13,7 +13,6 @@
     "compiler\.sortmemory" : 327680,
     "compiler\.textsearchmemory" : 163840,
     "default\.dir" : "target/io/dir/asterixdb",
-    "instance\.name" : "DEFAULT_INSTANCE",
     "log\.level" : "WARN",
     "max\.wait\.active\.cluster" : 60,
     "messaging\.frame\.count" : 512,
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
index d340386..75e879c 100644
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
@@ -13,7 +13,6 @@
     "compiler\.sortmemory" : 327680,
     "compiler\.textsearchmemory" : 163840,
     "default\.dir" : "target/io/dir/asterixdb",
-    "instance\.name" : "DEFAULT_INSTANCE",
     "log\.level" : "WARN",
     "max\.wait\.active\.cluster" : 60,
     "messaging\.frame\.count" : 512,
diff --git 
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/MetadataProperties.java
 
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/MetadataProperties.java
index 0b18f98..7325c98 100644
--- 
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/MetadataProperties.java
+++ 
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/MetadataProperties.java
@@ -34,7 +34,6 @@
 public class MetadataProperties extends AbstractProperties {
 
     public enum Option implements IOption {
-        INSTANCE_NAME(STRING, "DEFAULT_INSTANCE"),
         METADATA_NODE(STRING, null),
         METADATA_REGISTRATION_TIMEOUT_SECS(INTEGER, 60),
         METADATA_LISTEN_PORT(INTEGER, 0),
@@ -56,8 +55,6 @@
         @Override
         public String description() {
             switch (this) {
-                case INSTANCE_NAME:
-                    return "The name of this cluster instance";
                 case METADATA_NODE:
                     return "the node which should serve as the metadata node";
                 case METADATA_REGISTRATION_TIMEOUT_SECS:
@@ -95,10 +92,6 @@
 
     public MetadataProperties(PropertiesAccessor accessor) {
         super(accessor);
-    }
-
-    public String getInstanceName() {
-        return accessor.getString(Option.INSTANCE_NAME);
     }
 
     public String getMetadataNodeName() {
diff --git 
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/NodeProperties.java
 
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/NodeProperties.java
index 1443b8e..aaf6316 100644
--- 
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/NodeProperties.java
+++ 
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/NodeProperties.java
@@ -43,7 +43,6 @@
                 appConfig -> 
FileUtil.joinPath(appConfig.getString(ControllerConfig.Option.DEFAULT_DIR), 
"txn-log"),
                 "The directory where transaction logs should be stored",
                 "<value of " + ControllerConfig.Option.DEFAULT_DIR.cmdline() + 
">/txn-log"),
-        STORAGE_SUBDIR(OptionTypes.STRING, "storage", "The subdirectory name 
under each iodevice used for storage"),
         STARTING_PARTITION_ID(
                 OptionTypes.INTEGER,
                 -1,
@@ -115,9 +114,5 @@
 
     public String getTxnLogDir() {
         return accessor.getString(Option.TXN_LOG_DIR);
-    }
-
-    public String getStorageSubdir() {
-        return accessor.getString(Option.STORAGE_SUBDIR);
     }
 }
diff --git 
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/PropertiesAccessor.java
 
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/PropertiesAccessor.java
index 9c002b5..3b6100c 100644
--- 
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/PropertiesAccessor.java
+++ 
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/PropertiesAccessor.java
@@ -18,10 +18,10 @@
  */
 package org.apache.asterix.common.config;
 
-import static 
org.apache.asterix.common.config.NodeProperties.Option.STORAGE_SUBDIR;
+import static 
org.apache.asterix.common.utils.StorageConstants.STORAGE_ROOT_DIR_NAME;
 import static 
org.apache.hyracks.control.common.controllers.NCConfig.Option.IODEVICES;
+import static org.apache.hyracks.util.file.FileUtil.joinPath;
 
-import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
@@ -116,12 +116,11 @@
         // Now we create an array of ClusterPartitions for all the partitions
         // on this NC.
         String[] iodevices = nodeCfg.getStringArray(IODEVICES);
-        String storageSubdir = nodeCfg.getString(STORAGE_SUBDIR);
         String[] nodeStores = new String[iodevices.length];
         ClusterPartition[] nodePartitions = new 
ClusterPartition[iodevices.length];
         for (int i = 0; i < nodePartitions.length; i++) {
-            // Construct final storage path from iodevice dir + storage subdirs
-            nodeStores[i] = iodevices[i] + File.separator + storageSubdir;
+            // Construct final storage path from iodevice dir
+            nodeStores[i] = joinPath(iodevices[i], STORAGE_ROOT_DIR_NAME);
             // Create ClusterPartition instances for this NC.
             ClusterPartition partition = new 
ClusterPartition(uniquePartitionId.getAndIncrement(), ncId, i);
             ClusterPartition orig = 
clusterPartitions.put(partition.getPartitionId(), partition);
diff --git a/asterixdb/asterix-doc/src/site/markdown/ncservice.md 
b/asterixdb/asterix-doc/src/site/markdown/ncservice.md
index d9df232..605ee30 100644
--- a/asterixdb/asterix-doc/src/site/markdown/ncservice.md
+++ b/asterixdb/asterix-doc/src/site/markdown/ncservice.md
@@ -138,7 +138,6 @@
 
     [nc]
     app.class=org.apache.asterix.hyracks.bootstrap.NCApplicationEntryPoint
-    storage.subdir=storage
     address=127.0.0.1
     command=asterixnc
 
@@ -331,7 +330,6 @@
 |   nc    | storage.memorycomponent.numcomponents     | The number of memory 
components to be used per lsm index | 2 |
 |   nc    | storage.memorycomponent.pagesize          | The page size in bytes 
for pages allocated to memory components | 131072 (128 kB) |
 |   nc    | storage.metadata.memorycomponent.numpages | The number of pages to 
allocate for a metadata memory component | 8 |
-|   nc    | storage.subdir                            | The subdirectory name 
under each iodevice used for storage | storage |
 |   nc    | txn.log.dir                               | The directory where 
transaction logs should be stored | ${java.io.tmpdir}/asterixdb/txn-log |
 
 
@@ -346,7 +344,6 @@
 | common  | compiler.parallelism                      | The degree of 
parallelism for query execution. Zero means to use the storage parallelism as 
the query execution parallelism, while other integer values dictate the number 
of query execution parallel partitions. The system will fall back to use the 
number of all available CPU cores in the cluster as the degree of parallelism 
if the number set by a user is too large or too small | 0 |
 | common  | compiler.sortmemory                       | The memory budget (in 
bytes) for a sort operator instance in a partition | 33554432 (32 MB) |
 | common  | compiler.textsearchmemory                       | The memory 
budget (in bytes) for an inverted-index-search operator instance in a partition 
| 33554432 (32 MB) |
-| common  | instance.name                             | The name of this 
cluster instance | DEFAULT_INSTANCE |
 | common  | log.level                                 | The logging level for 
master and slave processes | WARNING |
 | common  | max.wait.active.cluster                   | The max pending time 
(in seconds) for cluster startup. After the threshold, if the cluster still is 
not up and running, it is considered unavailable | 60 |
 | common  | messaging.frame.count                     | Number of reusable 
frames for NC to NC messaging | 512 |
diff --git 
a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/ClusterStateManager.java
 
b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/ClusterStateManager.java
index 73d6705..8539fa4 100644
--- 
a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/ClusterStateManager.java
+++ 
b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/ClusterStateManager.java
@@ -462,8 +462,4 @@
         });
     }
 
-    public String getStoragePathPrefix() {
-        return appCtx.getNodeProperties().getStorageSubdir();
-    }
-
 }
diff --git a/asterixdb/asterix-server/src/main/opt/local/conf/cc.conf 
b/asterixdb/asterix-server/src/main/opt/local/conf/cc.conf
index cc2d9bd..6fc0579 100644
--- a/asterixdb/asterix-server/src/main/opt/local/conf/cc.conf
+++ b/asterixdb/asterix-server/src/main/opt/local/conf/cc.conf
@@ -30,7 +30,6 @@
 ${NC_BLUE_EXTRA}
 
 [nc]
-storage.subdir=storage
 address=127.0.0.1
 command=${NC_COMMAND}
 
diff --git 
a/asterixdb/asterix-server/src/test/resources/NCServiceExecutionIT/cc.conf 
b/asterixdb/asterix-server/src/test/resources/NCServiceExecutionIT/cc.conf
index 4658f1b..f3dcd63 100644
--- a/asterixdb/asterix-server/src/test/resources/NCServiceExecutionIT/cc.conf
+++ b/asterixdb/asterix-server/src/test/resources/NCServiceExecutionIT/cc.conf
@@ -37,7 +37,6 @@
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4g 
-Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.subdir=test_storage
 storage.memorycomponent.globalbudget = 1073741824
 
 [cc]
diff --git a/asterixdb/asterix-server/src/test/resources/NcLifecycleIT/cc.conf 
b/asterixdb/asterix-server/src/test/resources/NcLifecycleIT/cc.conf
index e34cf9e..dc80e56 100644
--- a/asterixdb/asterix-server/src/test/resources/NcLifecycleIT/cc.conf
+++ b/asterixdb/asterix-server/src/test/resources/NcLifecycleIT/cc.conf
@@ -36,7 +36,6 @@
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m 
-Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.subdir=test_storage
 storage.memorycomponent.globalbudget = 1073741824
 
 [cc]
diff --git a/asterixdb/asterix-server/src/test/resources/ReplicationIT/cc.conf 
b/asterixdb/asterix-server/src/test/resources/ReplicationIT/cc.conf
index b36d41c..19e951f 100644
--- a/asterixdb/asterix-server/src/test/resources/ReplicationIT/cc.conf
+++ b/asterixdb/asterix-server/src/test/resources/ReplicationIT/cc.conf
@@ -37,7 +37,6 @@
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m 
-Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.subdir=test_storage
 storage.memorycomponent.globalbudget = 1073741824
 
 [cc]

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2585
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic530559e96eb4c744499f46a5595e3a4c59f7683
Gerrit-PatchSet: 6
Gerrit-Project: asterixdb
Gerrit-Branch: release-0.9.4-pre-rc
Gerrit-Owner: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Murtadha Hubail <mhub...@apache.org>

Reply via email to