You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by im...@apache.org on 2018/05/31 21:43:28 UTC

[03/43] asterixdb git commit: [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 <mh...@apache.org>
Integration-Tests: Murtadha Hubail <mh...@apache.org>
Tested-by: Murtadha Hubail <mh...@apache.org>
Reviewed-by: Michael Blow <mb...@apache.org>


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

Branch: refs/heads/release-0.9.4-pre-rc
Commit: 0b9177d559f0084b7eb8325ad7683771e1342abd
Parents: ce86b6e
Author: Michael Blow <mb...@apache.org>
Authored: Thu Apr 12 13:13:52 2018 -0400
Committer: Michael Blow <mb...@apache.org>
Committed: Thu Apr 12 10:17:49 2018 -0700

----------------------------------------------------------------------
 asterixdb/asterix-app/src/main/resources/cc-rep.conf        | 1 -
 asterixdb/asterix-app/src/test/resources/cc-multipart.conf  | 1 -
 asterixdb/asterix-app/src/test/resources/cc.conf            | 1 -
 .../results/api/cluster_state_1/cluster_state_1.1.regexadm  | 1 -
 .../cluster_state_1_full/cluster_state_1_full.1.regexadm    | 1 -
 .../cluster_state_1_less/cluster_state_1_less.1.regexadm    | 1 -
 .../apache/asterix/common/config/MetadataProperties.java    | 7 -------
 .../org/apache/asterix/common/config/NodeProperties.java    | 5 -----
 .../apache/asterix/common/config/PropertiesAccessor.java    | 9 ++++-----
 asterixdb/asterix-doc/src/site/markdown/ncservice.md        | 3 ---
 .../apache/asterix/runtime/utils/ClusterStateManager.java   | 4 ----
 asterixdb/asterix-server/src/main/opt/local/conf/cc.conf    | 1 -
 .../src/test/resources/NCServiceExecutionIT/cc.conf         | 1 -
 .../asterix-server/src/test/resources/NcLifecycleIT/cc.conf | 1 -
 .../asterix-server/src/test/resources/ReplicationIT/cc.conf | 1 -
 15 files changed, 4 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0b9177d5/asterixdb/asterix-app/src/main/resources/cc-rep.conf
----------------------------------------------------------------------
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 @@ address=127.0.0.1
 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]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0b9177d5/asterixdb/asterix-app/src/test/resources/cc-multipart.conf
----------------------------------------------------------------------
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 @@ address=127.0.0.1
 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

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0b9177d5/asterixdb/asterix-app/src/test/resources/cc.conf
----------------------------------------------------------------------
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 @@ address=127.0.0.1
 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

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0b9177d5/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
----------------------------------------------------------------------
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,

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0b9177d5/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
----------------------------------------------------------------------
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,

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0b9177d5/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
----------------------------------------------------------------------
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,

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0b9177d5/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/MetadataProperties.java
----------------------------------------------------------------------
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 @@ import org.apache.hyracks.api.config.Section;
 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 @@ public class MetadataProperties extends AbstractProperties {
         @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:
@@ -97,10 +94,6 @@ public class MetadataProperties extends AbstractProperties {
         super(accessor);
     }
 
-    public String getInstanceName() {
-        return accessor.getString(Option.INSTANCE_NAME);
-    }
-
     public String getMetadataNodeName() {
         return accessor.getString(Option.METADATA_NODE);
     }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0b9177d5/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/NodeProperties.java
----------------------------------------------------------------------
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 @@ public class NodeProperties extends AbstractProperties {
                 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,
@@ -116,8 +115,4 @@ public class NodeProperties extends AbstractProperties {
     public String getTxnLogDir() {
         return accessor.getString(Option.TXN_LOG_DIR);
     }
-
-    public String getStorageSubdir() {
-        return accessor.getString(Option.STORAGE_SUBDIR);
-    }
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0b9177d5/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/PropertiesAccessor.java
----------------------------------------------------------------------
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 @@ public class PropertiesAccessor implements IApplicationConfig {
         // 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);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0b9177d5/asterixdb/asterix-doc/src/site/markdown/ncservice.md
----------------------------------------------------------------------
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 @@ The second configuration file is
 
     [nc]
     app.class=org.apache.asterix.hyracks.bootstrap.NCApplicationEntryPoint
-    storage.subdir=storage
     address=127.0.0.1
     command=asterixnc
 
@@ -331,7 +330,6 @@ The following parameters for slave processes, under "[nc]" sections.
 |   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 @@ The following parameters are configured under the "[common]" section.
 | 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 |

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0b9177d5/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/ClusterStateManager.java
----------------------------------------------------------------------
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 class ClusterStateManager implements IClusterStateManager {
         });
     }
 
-    public String getStoragePathPrefix() {
-        return appCtx.getNodeProperties().getStorageSubdir();
-    }
-
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0b9177d5/asterixdb/asterix-server/src/main/opt/local/conf/cc.conf
----------------------------------------------------------------------
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.api.port=19005
 ${NC_BLUE_EXTRA}
 
 [nc]
-storage.subdir=storage
 address=127.0.0.1
 command=${NC_COMMAND}
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0b9177d5/asterixdb/asterix-server/src/test/resources/NCServiceExecutionIT/cc.conf
----------------------------------------------------------------------
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 @@ address=127.0.0.1
 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]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0b9177d5/asterixdb/asterix-server/src/test/resources/NcLifecycleIT/cc.conf
----------------------------------------------------------------------
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 @@ address=127.0.0.1
 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]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0b9177d5/asterixdb/asterix-server/src/test/resources/ReplicationIT/cc.conf
----------------------------------------------------------------------
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 @@ address=127.0.0.1
 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]