Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Jenkins (Code Review)
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-cancellation-test/5660/ 
(2/16)


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 00:18:32 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Jenkins (Code Review)
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-ssl-compression/430/ 
(3/16)


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 00:18:32 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Jenkins (Code Review)
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/11139/ (5/16)


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 00:18:33 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Jenkins (Code Review)
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-sonar/9608/ (6/16)


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 00:18:33 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Murtadha Hubail (Code Review)
Murtadha Hubail has uploaded this change for review. ( 
https://asterix-gerrit.ics.uci.edu/3359


Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..

[NO ISSUE][CONF] Introduce ConfigValidator

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Introduce ConfigValidator that can be used to validate
  runtime changes to configurations.
- On storage compression scheme configuration changes, ensure
  new value is a registered scheme.

Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
---
A 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/config/ConfigValidator.java
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/NCAppRuntimeContext.java
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplication.java
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/NCApplication.java
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/api/IApplicationContext.java
A 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/api/IConfigValidator.java
A 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/api/IConfigValidatorFactory.java
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/api/INcApplicationContext.java
M 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/compression/CompressionManager.java
M 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/CcApplicationContext.java
10 files changed, 141 insertions(+), 9 deletions(-)



  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/59/3359/1

diff --git 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/config/ConfigValidator.java
 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/config/ConfigValidator.java
new file mode 100644
index 000..138a2b4
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/config/ConfigValidator.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.app.config;
+
+import org.apache.asterix.common.api.IConfigValidator;
+import org.apache.asterix.common.config.StorageProperties;
+import org.apache.asterix.runtime.compression.CompressionManager;
+import org.apache.hyracks.api.config.IOption;
+
+public class ConfigValidator implements IConfigValidator {
+
+@Override
+public void validate(IOption option, Object value) {
+boolean valid = true;
+if (option == StorageProperties.Option.STORAGE_COMPRESSION_BLOCK) {
+valid = CompressionManager.isRegisteredScheme((String) value);
+}
+if (!valid) {
+throw new IllegalArgumentException("Invalid value " + value + " 
for option " + option.name());
+}
+}
+}
diff --git 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/NCAppRuntimeContext.java
 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/NCAppRuntimeContext.java
index 8b8f5a0..182f982 100644
--- 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/NCAppRuntimeContext.java
+++ 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/NCAppRuntimeContext.java
@@ -31,6 +31,8 @@
 import java.util.stream.Collectors;

 import org.apache.asterix.active.ActiveManager;
+import org.apache.asterix.common.api.IConfigValidator;
+import org.apache.asterix.common.api.IConfigValidatorFactory;
 import org.apache.asterix.common.api.ICoordinationService;
 import org.apache.asterix.common.api.IDatasetLifecycleManager;
 import org.apache.asterix.common.api.IDatasetMemoryManager;
@@ -153,6 +155,7 @@
 private IReplicaManager replicaManager;
 private IReceptionist receptionist;
 private ICacheManager cacheManager;
+private IConfigValidator configValidator;

 public NCAppRuntimeContext(INCServiceContext ncServiceContext, 
List extensions,
 IPropertiesFactory propertiesFactory) throws AsterixException, 
InstantiationException,
@@ -184,7 +187,7 @@

 @Override
 public void initialize(IRecoveryManagerFactory recoveryManagerFactory, 
IReceptionistFactory 

Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Jenkins (Code Review)
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1:

BAD Compatibility Tests Started 
https://asterix-jenkins.ics.uci.edu/job/asterixbad-compat/4301/


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 00:21:32 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Anon. E. Moose (Code Review)
Anon. E. Moose (1000171) has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1: Contrib-2

Analytics Compatibility Compilation Failed
https://cbjenkins.page.link/5gxxEUdfBnsU9zv46 : UNSTABLE


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Anon. E. Moose (1000171)
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 00:22:33 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Jenkins (Code Review)
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-verify-asterix-app/6022/ 
(7/16)


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 00:18:33 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Jenkins (Code Review)
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-verify-no-installer-app/5819/
 (15/16)


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Anon. E. Moose (1000171)
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 00:27:47 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Jenkins (Code Review)
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-verify-storage/6232/ (9/16)


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 00:18:33 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Jenkins (Code Review)
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1:

Integration Tests Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/8426/


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Anon. E. Moose (1000171)
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 00:33:31 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Jenkins (Code Review)
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-asterix-app-openjdk11/1019/
 (16/16)


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Anon. E. Moose (1000171)
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 00:36:10 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Anon. E. Moose (Code Review)
Anon. E. Moose (1000171) has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1: -Contrib

Analytics Compatibility Compilation Successful
https://cbjenkins.page.link/bwMczX1QKFwRVcCWA : SUCCESS


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Anon. E. Moose (1000171)
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 00:41:57 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Jenkins (Code Review)
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-source-assemblies/5872/ 
(14/16)


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 00:18:40 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Jenkins (Code Review)
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1: Contrib+1

BAD Compatibility Tests Successful

https://asterix-jenkins.ics.uci.edu/job/asterixbad-compat/4301/ : SUCCESS


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Anon. E. Moose (1000171)
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 00:38:08 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Jenkins (Code Review)
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-source-format/5626/ 
(4/16)


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 00:18:33 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Jenkins (Code Review)
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1: Integration-Tests+1

Integration Tests Successful

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/8426/ 
: SUCCESS


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Anon. E. Moose (1000171)
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 01:45:21 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Jenkins (Code Review)
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-cancellation-test/5661/ 
(16/16)


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Anon. E. Moose (1000171)
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 02:09:06 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Anon. E. Moose (Code Review)
Anon. E. Moose (1000171) has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1: Contrib+1

Analytics Compatibility Tests Successful
https://cbjenkins.page.link/mKwUooa53YdXJWh6A : SUCCESS


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Anon. E. Moose (1000171)
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 04:20:54 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-23 Thread Till Westmann (Code Review)
Till Westmann has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Anon. E. Moose (1000171)
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: Till Westmann 
Gerrit-Comment-Date: Tue, 23 Apr 2019 15:00:06 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-23 Thread Murtadha Hubail (Code Review)
Murtadha Hubail has submitted this change and it was merged. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..

[NO ISSUE][CONF] Introduce ConfigValidator

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Introduce ConfigValidator that can be used to validate
  runtime changes to configurations.
- On storage compression scheme configuration changes, ensure
  new value is a registered scheme.

Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Reviewed-on: https://asterix-gerrit.ics.uci.edu/3359
Contrib: Jenkins 
Integration-Tests: Jenkins 
Tested-by: Jenkins 
Reviewed-by: Till Westmann 
---
A 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/config/ConfigValidator.java
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/NCAppRuntimeContext.java
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplication.java
M 
asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/NCApplication.java
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/api/IApplicationContext.java
A 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/api/IConfigValidator.java
A 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/api/IConfigValidatorFactory.java
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/api/INcApplicationContext.java
M 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/compression/CompressionManager.java
M 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/CcApplicationContext.java
10 files changed, 141 insertions(+), 9 deletions(-)

Approvals:
  Jenkins: Verified; ; Verified
  Anon. E. Moose (1000171):
  Till Westmann: Looks good to me, approved

Objections:
  Jenkins: Violations found



diff --git 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/config/ConfigValidator.java
 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/config/ConfigValidator.java
new file mode 100644
index 000..138a2b4
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/config/ConfigValidator.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.app.config;
+
+import org.apache.asterix.common.api.IConfigValidator;
+import org.apache.asterix.common.config.StorageProperties;
+import org.apache.asterix.runtime.compression.CompressionManager;
+import org.apache.hyracks.api.config.IOption;
+
+public class ConfigValidator implements IConfigValidator {
+
+@Override
+public void validate(IOption option, Object value) {
+boolean valid = true;
+if (option == StorageProperties.Option.STORAGE_COMPRESSION_BLOCK) {
+valid = CompressionManager.isRegisteredScheme((String) value);
+}
+if (!valid) {
+throw new IllegalArgumentException("Invalid value " + value + " 
for option " + option.name());
+}
+}
+}
diff --git 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/NCAppRuntimeContext.java
 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/NCAppRuntimeContext.java
index 8b8f5a0..182f982 100644
--- 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/NCAppRuntimeContext.java
+++ 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/NCAppRuntimeContext.java
@@ -31,6 +31,8 @@
 import java.util.stream.Collectors;

 import org.apache.asterix.active.ActiveManager;
+import org.apache.asterix.common.api.IConfigValidator;
+import org.apache.asterix.common.api.IConfigValidatorFactory;
 import org.apache.asterix.common.api.ICoordinationService;
 import org.apache.asterix.common.api.IDatasetLifecycleManager;
 import org.apache.asterix.common.api.IDatasetMemoryManager;
@@ -153,6 +155,7 @@
 private IReplicaManager replicaManager;
 private IReceptionist receptionist;
 private ICacheManager cacheManager;
+private IConfigValidator configValidator;

 public NCAppRuntimeContext(INCServiceContext ncServiceContext, 
List extensions,
   

Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Jenkins (Code Review)
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-verify-txnlog/828/ (11/16)


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 00:18:35 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Jenkins (Code Review)
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-spidersilk-tests/591/ 
(13/16)


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 00:18:38 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Jenkins (Code Review)
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1:

Build Started https://asterix-jenkins.ics.uci.edu/job/hyracks-gerrit/5564/ 
(1/16)


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 00:18:31 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Jenkins (Code Review)
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-ensure-ancestor/3662/ 
(8/16)


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 00:18:33 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Jenkins (Code Review)
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-asterix-app-sql-execution/5649/
 (12/16)


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 00:18:37 +
Gerrit-HasComments: No


Change in asterixdb[master]: [NO ISSUE][CONF] Introduce ConfigValidator

2019-04-22 Thread Jenkins (Code Review)
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/3359 )

Change subject: [NO ISSUE][CONF] Introduce ConfigValidator
..


Patch Set 1:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-stabilization-f69489-compat/926/
 (10/16)


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7e9dcde9c93feb2c9e2bdfe790f121b751d4c8ad
Gerrit-Change-Number: 3359
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail 
Gerrit-Reviewer: Jenkins 
Gerrit-Comment-Date: Tue, 23 Apr 2019 00:18:34 +
Gerrit-HasComments: No