[GitHub] [ignite-nodejs-thin-client] Mmuzaf merged pull request #7: IGNITE-15759 Replace local affinity function with the custom one

2022-08-11 Thread GitBox


Mmuzaf merged PR #7:
URL: https://github.com/apache/ignite-nodejs-thin-client/pull/7


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [ignite-nodejs-thin-client] isapego merged pull request #6: IGNITE-17389 Increase test node startup timeout

2022-07-19 Thread GitBox


isapego merged PR #6:
URL: https://github.com/apache/ignite-nodejs-thin-client/pull/6


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [ignite-3] korlov42 commented on a diff in pull request #739: IGNITE-16697 MV storage methods and reference implementation

2022-04-04 Thread GitBox


korlov42 commented on code in PR #739:
URL: https://github.com/apache/ignite-3/pull/739#discussion_r841462683


##
modules/core/src/main/java/org/apache/ignite/internal/util/Cursor.java:
##
@@ -25,5 +26,40 @@
  * @param  Type of elements.
  */
 public interface Cursor extends Iterator, Iterable, AutoCloseable {
+/** {@inheritDoc} */
+@Override
+default Iterator iterator() {
+return this;
+}
 
+/**
+ * Creates an iterator based cursor.
+ *
+ * @param it Iterator.
+ * @param  Type of elements in iterator.
+ * @return Cursor.
+ */
+static  Cursor fromIterator(Iterator it) {
+return new Cursor() {
+/** {@inheritDoc} */
+@Override
+public void close() throws Exception {
+if (it instanceof Closeable) {

Review Comment:
   I believe `AutoCloseable` fits better here. The logic is simple: since 
`Cursor` extends `AutoCloseable`, I would expect that wrapped iterator which 
extends `AutoCloseable` as well will be closed by invocation of 'close()' on 
the cursor 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [ignite-3] ibessonov commented on a diff in pull request #754: IGNITE-16691 Storage Configuration refactoring and improvements

2022-04-04 Thread GitBox


ibessonov commented on code in PR #754:
URL: https://github.com/apache/ignite-3/pull/754#discussion_r841445460


##
modules/storage-rocksdb/src/main/java/org/apache/ignite/internal/storage/rocksdb/RocksDbStorageEngineFactory.java:
##
@@ -0,0 +1,42 @@
+/*
+ * 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.ignite.internal.storage.rocksdb;
+
+import java.nio.file.Path;
+import org.apache.ignite.internal.configuration.ConfigurationRegistry;
+import org.apache.ignite.internal.storage.StorageException;
+import org.apache.ignite.internal.storage.engine.StorageEngine;
+import org.apache.ignite.internal.storage.engine.StorageEngineFactory;
+import 
org.apache.ignite.internal.storage.rocksdb.configuration.schema.RocksDbStorageEngineConfiguration;
+
+/**
+ * Implementation for creating {@link RocksDbStorageEngine}'s.
+ */
+public class RocksDbStorageEngineFactory implements StorageEngineFactory {
+/** {@inheritDoc} */
+@Override
+public StorageEngine createEngine(ConfigurationRegistry configRegistry, 
Path storagePath) throws StorageException {
+RocksDbStorageEngineConfiguration engineConfig = 
configRegistry.getConfiguration(RocksDbStorageEngineConfiguration.KEY);
+
+if (engineConfig == null) {

Review Comment:
   I should refactor our approach to validators, too many weird annotations =)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [ignite-3] ibessonov commented on a diff in pull request #739: IGNITE-16697 MV storage methods and reference implementation

2022-04-04 Thread GitBox


ibessonov commented on code in PR #739:
URL: https://github.com/apache/ignite-3/pull/739#discussion_r841437090


##
modules/core/src/main/java/org/apache/ignite/internal/util/Cursor.java:
##
@@ -25,5 +25,38 @@
  * @param  Type of elements.
  */
 public interface Cursor extends Iterator, Iterable, AutoCloseable {
+/** {@inheritDoc} */
+@Override
+default Iterator iterator() {
+return this;
+}
 
+/**
+ * Creates an iterator based cursor.
+ *
+ * @param it Iterator.
+ * @param  Type of elements in iterator.
+ * @return Cursor.
+ */
+static  Cursor fromIterator(Iterator it) {
+return new Cursor() {
+/** {@inheritDoc} */
+@Override
+public void close() throws Exception {
+// No-op.

Review Comment:
   Nice, I'll do it



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [ignite-3] tkalkirill commented on a diff in pull request #754: IGNITE-16691 Storage Configuration refactoring and improvements

2022-04-04 Thread GitBox


tkalkirill commented on code in PR #754:
URL: https://github.com/apache/ignite-3/pull/754#discussion_r841435461


##
modules/storage-rocksdb/src/main/java/org/apache/ignite/internal/storage/rocksdb/RocksDbStorageEngineFactory.java:
##
@@ -0,0 +1,42 @@
+/*
+ * 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.ignite.internal.storage.rocksdb;
+
+import java.nio.file.Path;
+import org.apache.ignite.internal.configuration.ConfigurationRegistry;
+import org.apache.ignite.internal.storage.StorageException;
+import org.apache.ignite.internal.storage.engine.StorageEngine;
+import org.apache.ignite.internal.storage.engine.StorageEngineFactory;
+import 
org.apache.ignite.internal.storage.rocksdb.configuration.schema.RocksDbStorageEngineConfiguration;
+
+/**
+ * Implementation for creating {@link RocksDbStorageEngine}'s.
+ */
+public class RocksDbStorageEngineFactory implements StorageEngineFactory {
+/** {@inheritDoc} */
+@Override
+public StorageEngine createEngine(ConfigurationRegistry configRegistry, 
Path storagePath) throws StorageException {
+RocksDbStorageEngineConfiguration engineConfig = 
configRegistry.getConfiguration(RocksDbStorageEngineConfiguration.KEY);
+
+if (engineConfig == null) {

Review Comment:
   Replaced with: **@PageMemoryDataRegionValidator** and 
**@RocksDbDataRegionValidator**



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [ignite-3] korlov42 commented on a diff in pull request #739: IGNITE-16697 MV storage methods and reference implementation

2022-04-04 Thread GitBox


korlov42 commented on code in PR #739:
URL: https://github.com/apache/ignite-3/pull/739#discussion_r841434095


##
modules/core/src/main/java/org/apache/ignite/internal/util/Cursor.java:
##
@@ -25,5 +25,38 @@
  * @param  Type of elements.
  */
 public interface Cursor extends Iterator, Iterable, AutoCloseable {
+/** {@inheritDoc} */
+@Override
+default Iterator iterator() {
+return this;
+}
 
+/**
+ * Creates an iterator based cursor.
+ *
+ * @param it Iterator.
+ * @param  Type of elements in iterator.
+ * @return Cursor.
+ */
+static  Cursor fromIterator(Iterator it) {
+return new Cursor() {
+/** {@inheritDoc} */
+@Override
+public void close() throws Exception {
+// No-op.

Review Comment:
   Perhaps, it would be better to propagate `close()` to the iterator in case 
the latter implements an interface `AutoCloseable`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [ignite-nodejs-thin-client] NSAmelchev merged pull request #5: IGNITE-16651: replace logger with ignite-log4j2

2022-03-24 Thread GitBox


NSAmelchev merged pull request #5:
URL: https://github.com/apache/ignite-nodejs-thin-client/pull/5


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-nodejs-thin-client] asfgit closed pull request #4: IGNITE-16490 Node.js: Fix API documentation main page

2022-02-08 Thread GitBox


asfgit closed pull request #4:
URL: https://github.com/apache/ignite-nodejs-thin-client/pull/4


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-nodejs-thin-client] isapego commented on a change in pull request #4: IGNITE-16490 Node.js: Fix API documentation main page

2022-02-08 Thread GitBox


isapego commented on a change in pull request #4:
URL: 
https://github.com/apache/ignite-nodejs-thin-client/pull/4#discussion_r801366727



##
File path: api_spec/index.md
##
@@ -0,0 +1,9 @@
+# Node.js Client for Apache Ignite
+
+This thin client allows your Node.js applications to work with Ignite clusters 
via TCP.
+
+A thin client is a lightweight Ignite client that connects to the cluster via 
a standard socket connection. It does not start in JVM process (Java is not 
required at all), does not become a part of the cluster topology, never holds 
any data or used as a destination of compute grid calculations.
+
+What it does is it simply establishes a socket connection to a standard Ignite 
node and performs all operations through that node.
+

Review comment:
   You are right. Fixed.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-nodejs-thin-client] ptupitsyn commented on a change in pull request #4: IGNITE-16490 Node.js: Fix API documentation main page

2022-02-07 Thread GitBox


ptupitsyn commented on a change in pull request #4:
URL: 
https://github.com/apache/ignite-nodejs-thin-client/pull/4#discussion_r801325319



##
File path: api_spec/index.md
##
@@ -0,0 +1,9 @@
+# Node.js Client for Apache Ignite
+
+This thin client allows your Node.js applications to work with Ignite clusters 
via TCP.
+
+A thin client is a lightweight Ignite client that connects to the cluster via 
a standard socket connection. It does not start in JVM process (Java is not 
required at all), does not become a part of the cluster topology, never holds 
any data or used as a destination of compute grid calculations.
+
+What it does is it simply establishes a socket connection to a standard Ignite 
node and performs all operations through that node.
+

Review comment:
   Feels like the same thing is repeated 3 times here (TCP/socket 
connection/socket connection). A socket connection is how any DB driver works, 
do we need to put it here at all?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-nodejs-thin-client] teligenz-developer opened a new pull request #3: Handling multiple response in buffer due to simultaneously request

2021-04-28 Thread GitBox


teligenz-developer opened a new pull request #3:
URL: https://github.com/apache/ignite-nodejs-thin-client/pull/3


   While using NodeJS Thin client to connect with ignite node. When we run 
single query to get data from ignite we were getting data but when we try to 
get 10 query per sec we getting below error random times.
   
   Error: Invalid response id: 3762533188295985673
   in file ignite\internal\ClientSocket.js
   
   JMeter test for 10 request in 1 sec.
   
https://user-images.githubusercontent.com/83343757/116394871-0c70ed00-a841-11eb-96b8-6de5a289219e.mp4
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-nodejs-thin-client] asfgit closed pull request #1: IGNITE-11032 Move to TypeScript

2021-01-12 Thread GitBox


asfgit closed pull request #1:
URL: https://github.com/apache/ignite-nodejs-thin-client/pull/1


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-nodejs-thin-client] asfgit closed pull request #2: IGNITE-13794 Partition awareness for Node.js

2021-01-11 Thread GitBox


asfgit closed pull request #2:
URL: https://github.com/apache/ignite-nodejs-thin-client/pull/2


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-python-thin-client] ivandasch commented on a change in pull request #1: IGNITE-13903 Add tox, docker-compose and travis integration, update pytest versions.

2020-12-24 Thread GitBox


ivandasch commented on a change in pull request #1:
URL: 
https://github.com/apache/ignite-python-thin-client/pull/1#discussion_r548627959



##
File path: docker-compose.yml
##
@@ -0,0 +1,34 @@
+# 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.
+
+services:
+  ignite:
+image: apacheignite/ignite:2.9.0

Review comment:
   Changed to :latest





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-python-thin-client] isapego commented on a change in pull request #1: IGNITE-13903 Add tox, docker-compose and travis integration, update pytest versions.

2020-12-24 Thread GitBox


isapego commented on a change in pull request #1:
URL: 
https://github.com/apache/ignite-python-thin-client/pull/1#discussion_r548558576



##
File path: docker-compose.yml
##
@@ -0,0 +1,34 @@
+# 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.
+
+services:
+  ignite:
+image: apacheignite/ignite:2.9.0

Review comment:
   Are we going to change Ignite version here every time new Ignite is 
released? Can we somehow avoid specifying exact version here?





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-python-thin-client] ivandasch opened a new pull request #1: IGNITE-13903 Add tox, docker-compose and travis integration, update pytest versions.

2020-12-24 Thread GitBox


ivandasch opened a new pull request #1:
URL: https://github.com/apache/ignite-python-thin-client/pull/1


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] vkulichenko opened a new pull request #12: IGNITE-13894 - Improve look of the CLI tool

2020-12-22 Thread GitBox


vkulichenko opened a new pull request #12:
URL: https://github.com/apache/ignite-3/pull/12


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] kgusakov opened a new pull request #11: IGNITE-13782 Add reinit support for corrupted installation

2020-12-22 Thread GitBox


kgusakov opened a new pull request #11:
URL: https://github.com/apache/ignite-3/pull/11


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] pavlukhin merged pull request #10: IGNITE-13875 Configure notifications for ignite-3 git repository

2020-12-22 Thread GitBox


pavlukhin merged pull request #10:
URL: https://github.com/apache/ignite-3/pull/10


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] asfgit closed pull request #4: IGNITE-13610 Initial version of unified CLI tool

2020-12-18 Thread GitBox


asfgit closed pull request #4:
URL: https://github.com/apache/ignite-3/pull/4


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] alievmirza commented on a change in pull request #4: IGNITE-13610 Initial version of unified CLI tool

2020-12-18 Thread GitBox


alievmirza commented on a change in pull request #4:
URL: https://github.com/apache/ignite-3/pull/4#discussion_r545802730



##
File path: 
modules/cli-demo/cli/src/main/java/org/apache/ignite/cli/IgniteCLIException.java
##
@@ -0,0 +1,30 @@
+/*
+ * 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.ignite.cli;
+
+public class IgniteCLIException extends RuntimeException {

Review comment:
   Somewhere you are using `*Cli*`, somewhere `*CLI*`, this should be 
unified





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] pavlukhin opened a new pull request #10: IGNITE-13875 Configure notifications for ignite-3 git repository

2020-12-17 Thread GitBox


pavlukhin opened a new pull request #10:
URL: https://github.com/apache/ignite-3/pull/10


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] AMashenkov commented on a change in pull request #9: IGNITE-13874 Add PMD, Idea inspections, and checkstyle rules

2020-12-17 Thread GitBox


AMashenkov commented on a change in pull request #9:
URL: https://github.com/apache/ignite-3/pull/9#discussion_r545358324



##
File path: checkrules/pmd-ruleset.xml
##
@@ -0,0 +1,29 @@
+

[GitHub] [ignite-3] AMashenkov commented on a change in pull request #9: IGNITE-13874 Add PMD, Idea inspections, and checkstyle rules

2020-12-17 Thread GitBox


AMashenkov commented on a change in pull request #9:
URL: https://github.com/apache/ignite-3/pull/9#discussion_r545358324



##
File path: checkrules/pmd-ruleset.xml
##
@@ -0,0 +1,29 @@
+

[GitHub] [ignite-3] AMashenkov commented on a change in pull request #9: IGNITE-13874 Add PMD, Idea inspections, and checkstyle rules

2020-12-17 Thread GitBox


AMashenkov commented on a change in pull request #9:
URL: https://github.com/apache/ignite-3/pull/9#discussion_r545358324



##
File path: checkrules/pmd-ruleset.xml
##
@@ -0,0 +1,29 @@
+

[GitHub] [ignite-3] AMashenkov commented on a change in pull request #9: IGNITE-13874 Add PMD, Idea inspections, and checkstyle rules

2020-12-17 Thread GitBox


AMashenkov commented on a change in pull request #9:
URL: https://github.com/apache/ignite-3/pull/9#discussion_r545357953



##
File path: checkrules/pmd-ruleset.xml
##
@@ -0,0 +1,29 @@
+
+

Review comment:
   





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] agoncharuk opened a new pull request #9: IGNITE-13874 Add PMD, Idea inspections, and checkstyle rules

2020-12-17 Thread GitBox


agoncharuk opened a new pull request #9:
URL: https://github.com/apache/ignite-3/pull/9


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] kgusakov commented on pull request #8: IGNITE-13857 Update java version to 11

2020-12-16 Thread GitBox


kgusakov commented on pull request #8:
URL: https://github.com/apache/ignite-3/pull/8#issuecomment-746534590


   Merged



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] kgusakov closed pull request #8: IGNITE-13857 Update java version to 11

2020-12-16 Thread GitBox


kgusakov closed pull request #8:
URL: https://github.com/apache/ignite-3/pull/8


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] kgusakov opened a new pull request #8: IGNITE-13857 Update java version to 11

2020-12-15 Thread GitBox


kgusakov opened a new pull request #8:
URL: https://github.com/apache/ignite-3/pull/8


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] vveider closed pull request #7: Apache Ignite 3: RPM build

2020-12-14 Thread GitBox


vveider closed pull request #7:
URL: https://github.com/apache/ignite-3/pull/7


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] vveider opened a new pull request #7: Apache Ignite 3: RPM build

2020-12-14 Thread GitBox


vveider opened a new pull request #7:
URL: https://github.com/apache/ignite-3/pull/7


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] sergey-chugunov-1985 opened a new pull request #6: IGNITE-13718 Integration module for new Unified Configuration providing REST API to access and manage configuration

2020-12-11 Thread GitBox


sergey-chugunov-1985 opened a new pull request #6:
URL: https://github.com/apache/ignite-3/pull/6


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] AMashenkov commented on a change in pull request #4: IGNITE-13610 WIP Initial version of unified CLI tool

2020-12-10 Thread GitBox


AMashenkov commented on a change in pull request #4:
URL: https://github.com/apache/ignite-3/pull/4#discussion_r540229106



##
File path: 
modules/cli-demo/cli/src/main/java/org/apache/ignite/cli/IgniteCliApp.java
##
@@ -0,0 +1,13 @@
+package org.apache.ignite.cli;

Review comment:
   License





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


SammyVimes commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535547981



##
File path: 
modules/configuration/src/main/java/org/apache/ignite/configuration/internal/validation/MaxValidator.java
##
@@ -0,0 +1,42 @@
+/*
+ * 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.ignite.configuration.internal.validation;
+
+import org.apache.ignite.configuration.internal.DynamicConfiguration;
+
+/**
+ * Validate that field value is not greater than some maximum value.
+ *
+ * @param  Root configuration type.
+ */
+public class MaxValidator> extends 
FieldValidator {
+/** Maximum value. */
+private final long maxValue;
+
+/** Constructor. */
+public MaxValidator(long maxValue, String message) {
+super(message);
+this.maxValue = maxValue;
+}
+
+/** {@inheritDoc} */
+@Override public void validate(Number value, C newRoot, C oldRoot) {
+if (value.longValue() > maxValue)
+throw new ConfigurationValidationException(message);

Review comment:
   If we make this exception checked, then every configuration API call like
   ```
   local.baseline.enabled(false);
   ```
   will have to be wrapped in try-catch with ConfigurationValidationException. 
I think it for sure needs further discussion, but we can leave it as-is for 
now, as changing runtime to checked is no biggie





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


SammyVimes commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535440706



##
File path: 
modules/configuration/src/main/java/org/apache/ignite/configuration/internal/validation/FieldValidator.java
##
@@ -0,0 +1,46 @@
+/*
+ * 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.ignite.configuration.internal.validation;
+
+import java.io.Serializable;
+import org.apache.ignite.configuration.internal.DynamicConfiguration;
+
+/**
+ * Base class for field validator. Contains exception message.
+ * @param  Field type.
+ * @param  Root configuration type.
+ */
+public abstract class FieldValidator> {
+/** Validation error message. */
+protected final String message;
+
+/** Constructor. */
+protected FieldValidator(String message) {
+this.message = message;
+}
+
+/**
+ * Validate field.
+ *
+ * @param value New value.
+ * @param newRoot New configuration root.
+ * @param oldRoot Old configuration root.
+ */
+public abstract void validate(T value, C newRoot, C oldRoot);

Review comment:
   I decided to go with the runtime exception in the end (added it to the 
signature and docs of course)





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


SammyVimes commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535440706



##
File path: 
modules/configuration/src/main/java/org/apache/ignite/configuration/internal/validation/FieldValidator.java
##
@@ -0,0 +1,46 @@
+/*
+ * 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.ignite.configuration.internal.validation;
+
+import java.io.Serializable;
+import org.apache.ignite.configuration.internal.DynamicConfiguration;
+
+/**
+ * Base class for field validator. Contains exception message.
+ * @param  Field type.
+ * @param  Root configuration type.
+ */
+public abstract class FieldValidator> {
+/** Validation error message. */
+protected final String message;
+
+/** Constructor. */
+protected FieldValidator(String message) {
+this.message = message;
+}
+
+/**
+ * Validate field.
+ *
+ * @param value New value.
+ * @param newRoot New configuration root.
+ * @param oldRoot Old configuration root.
+ */
+public abstract void validate(T value, C newRoot, C oldRoot);

Review comment:
   I decided to go with the checked exception (added it to the signature 
and docs ofcourse)





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


SammyVimes commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535418386



##
File path: 
modules/configuration-annotation-processor/src/main/java/org/apache/ignite/configuration/processor/internal/Processor.java
##
@@ -0,0 +1,692 @@
+/*
+ * 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.ignite.configuration.processor.internal;

Review comment:
   Reasonable, will do





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


SammyVimes commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535417248



##
File path: modules/config-sample/pom.xml
##
@@ -0,0 +1,86 @@
+
+
+
+
+
+http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.ignite
+ignite-configuration-sample
+3.0-SNAPSHOT
+http://ignite.apache.org
+
+
+1.8
+1.8
+
+
+
+
+log4j
+log4j
+1.2.17
+test
+
+
+
+com.typesafe
+config
+1.4.1
+
+
+
+org.apache.ignite
+ignite-configuration
+${project.version}
+
+
+junit
+junit
+4.13

Review comment:
   Changed to JUnit5, but this method is going to be removed (it's just a 
demo), and also we don't really have a lot of options, as there is no single 
parent pom or smth like that. AFAIK there is no decision on dependency 
management yet, so I'd leave it be





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


SammyVimes commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535414280



##
File path: 
modules/configuration/src/main/java/org/apache/ignite/configuration/internal/validation/FieldValidator.java
##
@@ -0,0 +1,46 @@
+/*
+ * 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.ignite.configuration.internal.validation;
+
+import java.io.Serializable;
+import org.apache.ignite.configuration.internal.DynamicConfiguration;
+
+/**
+ * Base class for field validator. Contains exception message.
+ * @param  Field type.
+ * @param  Root configuration type.
+ */
+public abstract class FieldValidator> {
+/** Validation error message. */
+protected final String message;
+
+/** Constructor. */
+protected FieldValidator(String message) {

Review comment:
   Yes, why?





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


SammyVimes commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535413713



##
File path: 
modules/configuration/src/main/java/org/apache/ignite/configuration/internal/selector/BaseSelectors.java
##
@@ -0,0 +1,125 @@
+/*
+ * 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.ignite.configuration.internal.selector;
+
+import java.lang.invoke.MethodHandle;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import org.apache.ignite.configuration.internal.DynamicConfiguration;
+import org.apache.ignite.configuration.internal.property.Modifier;
+
+/**
+ * Base selector holder.
+ */
+public class BaseSelectors {
+/** Map from string representation of selector to {@link SelectorHolder}. 
*/
+private static final Map selectors = new 
HashMap<>();
+
+/**
+ * Get selector from selectors map by key.
+ *
+ * Valid formats for selector key:
+ * 
+ * root.inner.option.field in case of static config field
+ * root.inner.named[name].field in case of dynamic (named) config 
field
+ * 
+ *
+ * @param name Selector name.
+ * @return Selector.
+ */
+public static , B extends 
Modifier, C, D, E> Selector find(String name) {

Review comment:
   Changed to actual type names, but not sure how to format signature THAT 
big 





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


SammyVimes commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535411746



##
File path: 
modules/configuration/src/main/java/org/apache/ignite/configuration/internal/selector/BaseSelectors.java
##
@@ -0,0 +1,125 @@
+/*
+ * 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.ignite.configuration.internal.selector;
+
+import java.lang.invoke.MethodHandle;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import org.apache.ignite.configuration.internal.DynamicConfiguration;
+import org.apache.ignite.configuration.internal.property.Modifier;
+
+/**
+ * Base selector holder.
+ */
+public class BaseSelectors {
+/** Map from string representation of selector to {@link SelectorHolder}. 
*/
+private static final Map selectors = new 
HashMap<>();
+
+/**
+ * Get selector from selectors map by key.
+ *
+ * Valid formats for selector key:
+ * 
+ * root.inner.option.field in case of static config field
+ * root.inner.named[name].field in case of dynamic (named) config 
field
+ * 
+ *
+ * @param name Selector name.
+ * @return Selector.
+ */
+public static , B extends 
Modifier, C, D, E> Selector find(String name) {

Review comment:
   I personally used it to find selectors in the CLI tool demo. I'm not 
sure if we can make it private though 





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


SammyVimes commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535408185



##
File path: 
modules/configuration/src/main/java/org/apache/ignite/configuration/internal/selector/BaseSelectors.java
##
@@ -0,0 +1,125 @@
+/*
+ * 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.ignite.configuration.internal.selector;
+
+import java.lang.invoke.MethodHandle;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import org.apache.ignite.configuration.internal.DynamicConfiguration;
+import org.apache.ignite.configuration.internal.property.Modifier;
+
+/**
+ * Base selector holder.
+ */
+public class BaseSelectors {
+/** Map from string representation of selector to {@link SelectorHolder}. 
*/
+private static final Map selectors = new 
HashMap<>();
+
+/**
+ * Get selector from selectors map by key.
+ *
+ * Valid formats for selector key:
+ * 
+ * root.inner.option.field in case of static config field
+ * root.inner.named[name].field in case of dynamic (named) config 
field
+ * 
+ *
+ * @param name Selector name.
+ * @return Selector.
+ */
+public static , B extends 
Modifier, C, D, E> Selector find(String name) {
+String[] splitten = name.split("\\.");

Review comment:
   `true`





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


SammyVimes commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535407691



##
File path: 
modules/configuration/src/main/java/org/apache/ignite/configuration/internal/property/NamedList.java
##
@@ -0,0 +1,51 @@
+/*
+ * 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.ignite.configuration.internal.property;
+
+import java.util.Map;
+
+/**
+ * This class holds named configurations in VIEW object.
+ */
+public class NamedList {
+/** Named values. */
+private final Map values;
+
+/**
+ * Constructor.
+ * @param values Named values.
+ */
+public NamedList(Map values) {
+this.values = values;
+}
+
+/**
+ * Get named values.
+ * @return Named values.
+ */
+public Map getValues() {
+return values;
+}
+
+/** {@inheritDoc} */
+@Override public String toString() {
+return "NamedList{" +

Review comment:
   We actually don't need that at all, I'm just going to remove it





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


SammyVimes commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535405567



##
File path: 
modules/configuration/src/main/java/org/apache/ignite/configuration/internal/annotation/Validate.java
##
@@ -0,0 +1,77 @@
+/*
+ * 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.ignite.configuration.internal.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Repeatable;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import org.apache.ignite.configuration.internal.validation.FieldValidator;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.RetentionPolicy.SOURCE;
+
+/**
+ * This annotation applies custom validation to configuration field, for 
example:
+ * 
+ * public class ConfSchema {
+ * {@literal @}Validate(SomeCustomValidator.class)
+ * private String value;
+ * }
+ * 
+ *
+ * If you need multiple custom validations:
+ * 
+ * public class ConfSchema {
+ * {@literal @}Validate.List({

Review comment:
   Yeah, right, I actually use the correct way to repeat annotations in the 
example, just forgot about the doc





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


SammyVimes commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535404023



##
File path: 
modules/configuration/src/main/java/org/apache/ignite/configuration/internal/annotation/Config.java
##
@@ -0,0 +1,69 @@
+/*
+ * 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.ignite.configuration.internal.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import org.apache.ignite.configuration.internal.DynamicConfiguration;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.SOURCE;
+
+/**
+ * This annotation, if applied to a class, marks it as a configuration schema.
+ * Annotation processor generates a couple of classes for each configuration 
schema:

Review comment:
   You're right





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


SammyVimes commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535400429



##
File path: 
modules/configuration/src/main/java/org/apache/ignite/configuration/internal/DynamicConfiguration.java
##
@@ -0,0 +1,147 @@
+/*
+ * 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.ignite.configuration.internal;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.ignite.configuration.internal.property.DynamicProperty;
+import org.apache.ignite.configuration.internal.property.Modifier;
+import org.apache.ignite.configuration.internal.selector.BaseSelectors;
+import org.apache.ignite.configuration.internal.validation.FieldValidator;
+
+/**
+ * This class represents configuration root or node.
+ */
+public abstract class DynamicConfiguration implements 
Modifier {
+/** Fully qualified name of the configuration. */
+protected final String qualifiedName;
+
+/** Configuration key. */
+protected final String key;
+
+/** Configuration prefix. */
+protected final String prefix;
+
+/** Configuration members (leafs and nodes). */
+protected final Map> members = new HashMap<>();
+
+/** Root configuration node. */
+protected final DynamicConfiguration root;
+
+/** {@code true} if this is a member of {@link NamedListConfiguration}. */
+protected final boolean isNamed;
+
+/** Configurator that this configuration is attached to. */
+protected final Configurator> 
configurator;
+
+/**
+ * Constructor.
+ * @param prefix Configuration prefix.
+ * @param key Configuration key.
+ * @param isNamed Is this a part of named configuration.
+ * @param configurator Configurator that this object is attached to.
+ * @param root Root configuration.
+ */
+protected DynamicConfiguration(
+String prefix,
+String key,
+boolean isNamed,
+Configurator> configurator,
+DynamicConfiguration root
+) {
+this.prefix = prefix;
+this.isNamed = isNamed;
+this.configurator = configurator;
+
+this.key = key;
+if (root == null)
+this.qualifiedName = key;
+else {
+if (isNamed)
+qualifiedName = String.format("%s[%s]", prefix, key);

Review comment:
   Actually, we can't move past this formatting, as we need to differ 
static part of the name and  dynamic





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


SammyVimes commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535360759



##
File path: 
modules/configuration/src/main/java/org/apache/ignite/configuration/internal/Configurator.java
##
@@ -0,0 +1,105 @@
+/*
+ * 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.ignite.configuration.internal;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
+import org.apache.ignite.configuration.internal.property.DynamicProperty;
+import org.apache.ignite.configuration.internal.property.Modifier;
+import org.apache.ignite.configuration.internal.property.PropertyListener;
+import org.apache.ignite.configuration.internal.selector.Selector;
+import org.apache.ignite.configuration.internal.validation.FieldValidator;
+import org.apache.ignite.configuration.internal.validation.MemberKey;
+
+public class Configurator> {
+
+private final ConfigurationStorage storage;
+
+private final T root;
+
+private final Map>>> fieldValidators = new HashMap<>();
+
+public Configurator(ConfigurationStorage storage, 
Function, T> rootBuilder) {
+this.storage = storage;
+this.root = rootBuilder.apply(this);
+this.init();
+}
+
+private void init() {
+List props = new ArrayList<>();
+
+props.forEach(property -> {

Review comment:
   Whoops, correct





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


SammyVimes commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535360071



##
File path: 
modules/configuration-annotation-processor/src/test/resources/org/apache/ignite/configuration/processor/internal/TestConfigurationSchema.java
##
@@ -0,0 +1,22 @@
+package org.apache.ignite.configuration.processor.internal;
+
+import org.apache.ignite.configuration.internal.annotation.Config;
+import org.apache.ignite.configuration.internal.annotation.Value;
+
+@Config(value = "test", root = true)
+public class TestConfigurationSchema {
+@Value
+private String value1;
+
+@Value
+private long primitiveLong;
+
+@Value
+private Long boxedLong;
+
+@Value
+private int primitiveInt;
+
+@Value
+private Integer boxedInt;
+}

Review comment:
   This is a test java file in resources, I'm not sure if it should follow 
our style guides as we only need in the test's runtime.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


SammyVimes commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535350963



##
File path: 
modules/configuration-annotation-processor/src/main/java/org/apache/ignite/configuration/processor/internal/validation/ValidationGenerator.java
##
@@ -0,0 +1,111 @@
+/*
+ * 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.ignite.configuration.processor.internal.validation;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.type.MirroredTypesException;
+import javax.lang.model.type.TypeMirror;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import com.squareup.javapoet.CodeBlock;
+import org.apache.ignite.configuration.internal.DynamicConfiguration;
+import org.apache.ignite.configuration.internal.annotation.Validate;
+import org.apache.ignite.configuration.internal.validation.MaxValidator;
+import org.apache.ignite.configuration.internal.validation.MinValidator;
+import org.apache.ignite.configuration.internal.validation.NotNullValidator;
+
+/**
+ * Class that handles validation generation.
+ */
+public class ValidationGenerator {
+/** Private constructor. */
+private ValidationGenerator() {
+}
+
+/**
+ * Generate validation block.
+ *
+ * @param variableElement Configuration field.
+ * @return Code block for field validation.
+ */
+public static CodeBlock generateValidators(VariableElement 
variableElement) {
+List validators = new ArrayList<>();
+final Min minAnnotation = variableElement.getAnnotation(Min.class);
+if (minAnnotation != null) {
+final long minValue = minAnnotation.value();
+final String message = minAnnotation.message();
+final CodeBlock build = CodeBlock.builder().add("new $T<$T>($L, $S)", MinValidator.class, DynamicConfiguration.class, minValue, 
message).build();
+validators.add(build);
+}
+
+final Max maxAnnotation = variableElement.getAnnotation(Max.class);
+if (maxAnnotation != null) {
+final long maxValue = maxAnnotation.value();
+final String message = maxAnnotation.message();
+final CodeBlock build = CodeBlock.builder().add("new $T<$T>($L, $S)", MaxValidator.class, DynamicConfiguration.class, maxValue, 
message).build();
+validators.add(build);
+}
+
+final NotNull notNull = variableElement.getAnnotation(NotNull.class);
+if (notNull != null) {
+final String message = notNull.message();
+final CodeBlock build = CodeBlock.builder().add("new $T<$T>($S)", NotNullValidator.class, DynamicConfiguration.class, message).build();
+validators.add(build);
+}
+
+List validateAnnotations = new ArrayList<>();
+
+final Validate.List validateAnnotationsList = 
variableElement.getAnnotation(Validate.List.class);
+
+if (validateAnnotationsList != null) {
+
validateAnnotations.addAll(Arrays.asList(validateAnnotationsList.value()));
+}
+
+final Validate validateAnnotationSingle = 
variableElement.getAnnotation(Validate.class);
+
+if (validateAnnotationSingle != null) {
+validateAnnotations.add(validateAnnotationSingle);
+}
+
+validateAnnotations.forEach(validateAnnotation -> {
+List values = null;
+try {
+validateAnnotation.value();
+} catch (MirroredTypesException e) {
+values = e.getTypeMirrors();

Review comment:
   Done





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] AMashenkov commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


AMashenkov commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535268251



##
File path: 
modules/configuration-annotation-processor/src/main/java/org/apache/ignite/configuration/processor/internal/Processor.java
##
@@ -0,0 +1,692 @@
+/*
+ * 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.ignite.configuration.processor.internal;

Review comment:
   Does it make sense to change package to 
**org.apache.ignite.internal.configuration.processor** for better filtering?
   Some code checks may use different policies for public and internal API.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] AMashenkov commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


AMashenkov commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535268251



##
File path: 
modules/configuration-annotation-processor/src/main/java/org/apache/ignite/configuration/processor/internal/Processor.java
##
@@ -0,0 +1,692 @@
+/*
+ * 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.ignite.configuration.processor.internal;

Review comment:
   Does it make sense to change package to 
**org.apache.ignite.internal.configuration.processor** for better filtering
   as some code checks may use different policies for public and internal API.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] AMashenkov commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


AMashenkov commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535264583



##
File path: modules/config-sample/pom.xml
##
@@ -0,0 +1,86 @@
+
+
+
+
+
+http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.ignite
+ignite-configuration-sample
+3.0-SNAPSHOT
+http://ignite.apache.org
+
+
+1.8
+1.8
+
+
+
+
+log4j
+log4j
+1.2.17
+test
+
+
+
+com.typesafe
+config
+1.4.1
+
+
+
+org.apache.ignite
+ignite-configuration
+${project.version}
+
+
+junit
+junit
+4.13

Review comment:
   We are going to switch to JUnit 5.
   Let's use property for versions, to be sure we use the same dependency 
version everywhere while possible.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


SammyVimes commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535251190



##
File path: modules/configuration-annotation-processor/pom.xml
##
@@ -0,0 +1,94 @@
+
+
+
+
+
+http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.ignite
+ignite-configuration-annotation-processor
+3.0-SNAPSHOT
+http://ignite.apache.org
+
+
+1.8
+1.8
+
+
+
+
+log4j
+log4j
+1.2.17
+test
+
+
+
+com.squareup
+javapoet
+1.13.0
+
+
+
+org.apache.ignite
+ignite-configuration
+${project.version}
+
+
+
+org.mockito
+mockito-core
+3.4.6
+test
+
+
+
+com.google.testing.compile
+compile-testing
+0.19
+test
+
+
+
+org.junit.jupiter
+junit-jupiter-engine
+5.6.2
+test
+
+
+
+fr.inria.gforge.spoon
+spoon-core

Review comment:
   I'm not an expert either, but as I understand MIT license is permissive 
and compatible with the Apache license. Also, we won't be distributing Spoon as 
it's only a test dependency.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


SammyVimes commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535248128



##
File path: 
modules/config-sample/src/main/java/org/apache/ignite/configuration/internal/AutoAdjustConfigurationSchema.java
##
@@ -0,0 +1,43 @@
+/*
+ * 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.ignite.configuration.internal;

Review comment:
   Sure, this module is just a demo





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


SammyVimes commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535247519



##
File path: modules/configuration-annotation-processor/pom.xml
##
@@ -0,0 +1,94 @@
+
+
+
+
+
+http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.ignite
+ignite-configuration-annotation-processor
+3.0-SNAPSHOT
+http://ignite.apache.org
+
+
+1.8

Review comment:
   Done (but I hope we'll move to Gradle)





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] SammyVimes commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


SammyVimes commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535244939



##
File path: modules/config-sample/pom.xml
##
@@ -0,0 +1,86 @@
+
+
+
+
+
+http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.ignite
+ignite-configuration-sample
+3.0-SNAPSHOT
+http://ignite.apache.org
+
+
+1.8
+1.8
+
+
+
+
+log4j
+log4j
+1.2.17
+test
+
+
+
+com.typesafe
+config
+1.4.1
+
+
+
+org.apache.ignite
+ignite-configuration
+${project.version}
+
+
+junit
+junit
+4.13
+test
+
+
+
+
+
+
+org.apache.maven.plugins
+maven-compiler-plugin
+3.8.1
+
+
+
org.apache.ignite.configuration.processor.internal.Processor

Review comment:
   Done





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] ibessonov commented on a change in pull request #5: IGNITE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


ibessonov commented on a change in pull request #5:
URL: https://github.com/apache/ignite-3/pull/5#discussion_r535139224



##
File path: modules/config-sample/pom.xml
##
@@ -0,0 +1,86 @@
+
+
+
+
+
+http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.ignite
+ignite-configuration-sample
+3.0-SNAPSHOT
+http://ignite.apache.org
+
+
+1.8
+1.8
+
+
+
+
+log4j
+log4j
+1.2.17
+test
+
+
+
+com.typesafe
+config
+1.4.1
+
+
+
+org.apache.ignite
+ignite-configuration
+${project.version}
+
+
+junit
+junit
+4.13
+test
+
+
+
+
+
+
+org.apache.maven.plugins
+maven-compiler-plugin
+3.8.1
+
+
+
org.apache.ignite.configuration.processor.internal.Processor

Review comment:
   Is there a chance of putting this into meta-inf of processor module?

##
File path: modules/config-sample/pom.xml
##
@@ -0,0 +1,86 @@
+
+
+
+
+
+http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.ignite
+ignite-configuration-sample
+3.0-SNAPSHOT
+http://ignite.apache.org
+
+
+1.8
+1.8
+
+
+
+
+log4j
+log4j
+1.2.17
+test
+
+
+
+com.typesafe

Review comment:
   It would be cool to sort dependencies, test dependencies will be clearly 
separated then.

##
File path: 
modules/configuration-annotation-processor/src/main/java/org/apache/ignite/configuration/processor/internal/Processor.java
##
@@ -0,0 +1,692 @@
+/*
+ * 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.ignite.configuration.processor.internal;
+
+import java.io.IOException;
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.MethodType;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Deque;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+import javax.annotation.processing.AbstractProcessor;
+import javax.annotation.processing.Filer;
+import javax.annotation.processing.ProcessingEnvironment;
+import javax.annotation.processing.RoundEnvironment;
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ElementKind;
+import javax.lang.model.element.Modifier;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.util.Elements;
+import com.squareup.javapoet.ClassName;
+import com.squareup.javapoet.CodeBlock;
+import com.squareup.javapoet.FieldSpec;
+import com.squareup.javapoet.JavaFile;
+import com.squareup.javapoet.MethodSpec;
+import com.squareup.javapoet.ParameterizedTypeName;
+import com.squareup.javapoet.TypeName;
+import com.squareup.javapoet.TypeSpec;
+import com.squareup.javapoet.WildcardTypeName;
+import org.apache.ignite.configuration.internal.Configurator;
+import org.apache.ignite.configuration.internal.DynamicConfiguration;
+import org.apache.ignite.configuration.internal.NamedListConfiguration;
+import org.apache.ignite.configuration.internal.annotation.Config;
+import org.apache.ignite.configuration.internal.annotation.ConfigValue;
+import org.apache.ignite.configuration.internal.annotation.NamedConfigValue;
+import 

[GitHub] [ignite-3] SammyVimes opened a new pull request #5: IGINTE-13562 Unified configuration initial prototype

2020-12-03 Thread GitBox


SammyVimes opened a new pull request #5:
URL: https://github.com/apache/ignite-3/pull/5


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-nodejs-thin-client] SammyVimes opened a new pull request #2: IGNITE-13794 Partition awareness for Node.js

2020-12-02 Thread GitBox


SammyVimes opened a new pull request #2:
URL: https://github.com/apache/ignite-nodejs-thin-client/pull/2


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-nodejs-thin-client] SammyVimes opened a new pull request #1: IGNITE-11032 Move to TypeScript

2020-12-01 Thread GitBox


SammyVimes opened a new pull request #1:
URL: https://github.com/apache/ignite-nodejs-thin-client/pull/1


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] kgusakov closed pull request #3: IGNITE-13610 WIP Initial version of unified CLI tool

2020-12-01 Thread GitBox


kgusakov closed pull request #3:
URL: https://github.com/apache/ignite-3/pull/3


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] AMashenkov commented on a change in pull request #3: IGNITE-13610 WIP Initial version of unified CLI tool

2020-11-30 Thread GitBox


AMashenkov commented on a change in pull request #3:
URL: https://github.com/apache/ignite-3/pull/3#discussion_r532742174



##
File path: modules/cli-demo/cli-common/pom.xml
##
@@ -0,0 +1,32 @@
+
+
 
   
   ```

##
File path: modules/cli-demo/demo-module-all/demo-module/pom.xml
##
@@ -0,0 +1,33 @@
+

[GitHub] [ignite-3] kgusakov opened a new pull request #3: IGNITE-13610 WIP Initial version of unified CLI tool

2020-11-30 Thread GitBox


kgusakov opened a new pull request #3:
URL: https://github.com/apache/ignite-3/pull/3


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] AMashenkov opened a new pull request #2: IGNITE-13748: Schema configuration public API.

2020-11-26 Thread GitBox


AMashenkov opened a new pull request #2:
URL: https://github.com/apache/ignite-3/pull/2


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] vkulichenko closed pull request #1: test module

2020-11-23 Thread GitBox


vkulichenko closed pull request #1:
URL: https://github.com/apache/ignite-3/pull/1


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] vkulichenko commented on pull request #1: test module

2020-11-23 Thread GitBox


vkulichenko commented on pull request #1:
URL: https://github.com/apache/ignite-3/pull/1#issuecomment-732547333


   Test PR, will close.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-3] vkulichenko opened a new pull request #1: test module

2020-11-23 Thread GitBox


vkulichenko opened a new pull request #1:
URL: https://github.com/apache/ignite-3/pull/1


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-website] pavlukhin opened a new pull request #12: IGNITE-12965 Redirect ignite-website GitHub notifications

2020-04-30 Thread GitBox


pavlukhin opened a new pull request #12:
URL: https://github.com/apache/ignite-website/pull/12


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-website] mstekl opened a new pull request #11: Several optimizations

2020-04-29 Thread GitBox


mstekl opened a new pull request #11:
URL: https://github.com/apache/ignite-website/pull/11


   Submitting same set of improvements, but removed the usability fix for 
descriptive links on homepage.
   
   - Ran a fresh crawl and rebuilt sitemap.xml
   - Fixed accessibility issues when using on header and homepage
   - Replaced old 4.7 fontawesome with latest 5.11 which avoids font-display 
audit failure



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-website] mstekl commented on a change in pull request #10: Seo updates April 28

2020-04-29 Thread GitBox


mstekl commented on a change in pull request #10:
URL: https://github.com/apache/ignite-website/pull/10#discussion_r417430944



##
File path: index.html
##
@@ -273,9 +278,9 @@ Applications Acceleration  Data Caching
 using Ignite as an in-memory data grid.
 
 
-
-Learn More
+   Learn More About In-Memory Data Grid

Review comment:
   @dmagda, the purpose here was not to introduce a keyword, but to improve 
usability. It is a good usability practice to use descriptive links and avoid 
things like "click here", "read more", etc. 
   Here is some literature: 
   - https://accessibility.oregonstate.edu/descriptivelinks
   - 
https://developers.google.com/web/tools/lighthouse/audits/descriptive-link-text
   
   Also on this particular case I even think having a longer text on those 
buttons give more balance to the elements in terms of design. The button I 
propose is not even as long as the titles on those boxes, and they introduce 
more blue area that fills the empty space generated by the small "learn more" 
buttons.
   
   I don't know which reasons are you basing to consider these as "too much for 
a button title", but please reconsider the merge based on this explanation. 
Thanks!
   
   





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-website] dmagda commented on pull request #9: Added couple of new events

2020-04-29 Thread GitBox


dmagda commented on pull request #9:
URL: https://github.com/apache/ignite-website/pull/9#issuecomment-621296548


   Thanks, Mauricio! Merged.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-website] dmagda commented on a change in pull request #10: Seo updates April 28

2020-04-29 Thread GitBox


dmagda commented on a change in pull request #10:
URL: https://github.com/apache/ignite-website/pull/10#discussion_r417416842



##
File path: index.html
##
@@ -273,9 +278,9 @@ Applications Acceleration  Data Caching
 using Ignite as an in-memory data grid.
 
 
-
-Learn More
+   Learn More About In-Memory Data Grid

Review comment:
   Please revert this change, that's too much for the button title. I 
believe we can sacrifice this SEO optimization in favor of better readability. 
Data Grid keyword is already mentioned three times on the front page.

##
File path: index.html
##
@@ -304,9 +309,9 @@ Digital Integration Hub
 through Apache Ignite’s functionally rich, unified 
and consistent APIs.
 
 
-
-Learn More
+   Learn More About Digital Integration Hub

Review comment:
   Please revert this change, that's too much for the button title. I 
believe we can sacrifice this SEO optimization in favor of better readability. 
Digital Hub keyword is already mentioned a couple of times on this page.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-website] mstekl opened a new pull request #10: Seo updates April 28

2020-04-28 Thread GitBox


mstekl opened a new pull request #10:
URL: https://github.com/apache/ignite-website/pull/10


   I'm submitting a few set of improvements:
   
   - Ran a fresh crawl and rebuilt sitemap.xml
   - Fixed accessibility issues when using  on header and homepage
   - Changed the text for links btns underuse cases section on homapage to a 
more descriptive text
   - Replaced old 4.7 fontawesome with latest 5.11 which avoids font-display 
audit failure



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-website] mstekl opened a new pull request #9: Added couple of new events

2020-04-28 Thread GitBox


mstekl opened a new pull request #9:
URL: https://github.com/apache/ignite-website/pull/9


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [ignite-website] dmagda commented on a change in pull request #6: SEO changes to several urls and some contents on Data Grid page

2020-04-20 Thread GitBox


dmagda commented on a change in pull request #6:
URL: https://github.com/apache/ignite-website/pull/6#discussion_r411562399



##
File path: use-cases/in-memory-data-grid.html
##
@@ -58,60 +57,60 @@ In-Memory Data Grid with Apache 
Ignite
 
 
 
-Apache Ignite® is an in-memory data grid that accelerates and 
scales your databases, services, and APIs.
-It supports key-value and ANSI SQL APIs, ACID transactions, 
co-located compute, and machine learning
-libraries required for real-time applications.
-
-
-An in-memory data grid deployment is a read-through/write-through 
caching strategy, in which the application
-layer treats the data grid as the primary data store. The 
application layer writes to and reads from Ignite.
-Ignite ensures that any underlying database stays updated and 
consistent with the in-memory data.
+The Apache Ignite® in-memory data grid accelerates and scales your 
databases, services, 
+and APIs. It supports key-value and ANSI SQL APIs, ACID 
transactions, co-located processing, 
+and machine learning libraries. Ignite is frequently used to 
increase the performance and 
+scalability of real-time applications, as a digital integration hub to 
provide real-time data 
+access to one or many applications to data from one or many siloed 
data sources, for high 

Review comment:
   I do see that we want to get more searches of DIH and "cache" terms by 
adding them to the first paragraph here but that's a tangential topic and we 
shouldn't overwhelm our readers with more terms, especially, at the beginning 
of the page. 
   
   I'll rework this paragraph after the merge.

##
File path: use-cases/in-memory-data-grid.html
##
@@ -58,60 +57,60 @@ In-Memory Data Grid with Apache 
Ignite
 
 
 
-Apache Ignite® is an in-memory data grid that accelerates and 
scales your databases, services, and APIs.
-It supports key-value and ANSI SQL APIs, ACID transactions, 
co-located compute, and machine learning
-libraries required for real-time applications.
-
-
-An in-memory data grid deployment is a read-through/write-through 
caching strategy, in which the application
-layer treats the data grid as the primary data store. The 
application layer writes to and reads from Ignite.
-Ignite ensures that any underlying database stays updated and 
consistent with the in-memory data.
+The Apache Ignite® in-memory data grid accelerates and scales your 
databases, services, 
+and APIs. It supports key-value and ANSI SQL APIs, ACID 
transactions, co-located processing, 
+and machine learning libraries. Ignite is frequently used to 
increase the performance and 
+scalability of real-time applications, as a digital integration hub to 
provide real-time data 
+access to one or many applications to data from one or many siloed 
data sources, for high 
+performance computing, or for data caching.
 
 
-
-As an in-memory data grid, Ignite provides all essential APIs 
needed to simplify its adoption.
-The APIs include distributed key-value and ANSI SQL queries, ACID 
transactions, co-located
-computations, and machine learning models. While key-value and SQL 
calls let you request, join, and
-group distributed data sets, the compute and machine learning 
components help to eliminate data
-shuffling over the network, thus, boosting compute and 
data-intensive calculations.
-
-
-
-Ignite is capable of storing data both in memory and on disk with 
two options for data persistence
--- you can persist changes in an external database or let Ignite 
keep data in its native persistence.
-Let's review both of these options.
-
-
-Ignite and External Databases
-
-
-Ignite can improve the performance and scalability of any external 
database such as RDBMS,
-NoSQL or Hadoop, by sliding in as an in-memory cache between the 
application and the database
-layer. When an application writes data to the cache, Ignite 
automatically writes-through or
-writes-behind all data modifications to the underlying external 
store. Ignite also performs
-ACID transactions where it coordinates and commits a transaction 
across the cluster as well as
-the database.
-
-
-Additionally, Ignite can be deployed as a shared and unified 
in-memory layer that stores data
-sets originating from disjointed databases. Your applications can 
consume all the data from
-Ignite as a single store while Ignite can keep the original 

[GitHub] dspavlov opened a new pull request #98: IGNITE-10620: Tracked branches & Issue detector unit tests

2018-12-10 Thread GitBox
dspavlov opened a new pull request #98: IGNITE-10620: Tracked branches & Issue 
detector unit tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/98
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zzzadruga opened a new pull request #97: IGNITE-10628 Add support for nightly RunAll

2018-12-10 Thread GitBox
zzzadruga opened a new pull request #97: IGNITE-10628 Add support for nightly 
RunAll
URL: https://github.com/apache/ignite-teamcity-bot/pull/97
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dspavlov commented on a change in pull request #95: IGNITE-9542: new run history stripe

2018-12-10 Thread GitBox
dspavlov commented on a change in pull request #95: IGNITE-9542: new run 
history stripe
URL: https://github.com/apache/ignite-teamcity-bot/pull/95#discussion_r240287246
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/issue/IssueDetector.java
 ##
 @@ -446,9 +463,9 @@ protected String checkFailuresEx(String brachName) {
 backgroundOpsCreds
 );
 
-registerIssuesAndNotifyLater(failures, backgroundOpsCreds);
+String issResult = registerIssuesAndNotifyLater(failures, 
backgroundOpsCreds);
 
 Review comment:
   Yes, I agree, but this string will go to the monitoring, so it is better to 
see null showing there is some unexpected behavior there.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zzzadruga commented on a change in pull request #95: IGNITE-9542: new run history stripe

2018-12-10 Thread GitBox
zzzadruga commented on a change in pull request #95: IGNITE-9542: new run 
history stripe
URL: https://github.com/apache/ignite-teamcity-bot/pull/95#discussion_r240279974
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/issue/IssueDetector.java
 ##
 @@ -446,9 +463,9 @@ protected String checkFailuresEx(String brachName) {
 backgroundOpsCreds
 );
 
-registerIssuesAndNotifyLater(failures, backgroundOpsCreds);
+String issResult = registerIssuesAndNotifyLater(failures, 
backgroundOpsCreds);
 
 Review comment:
   if #registerIssuesAndNotifyLater returns null (if creds == null), method 
return string like "Tests 4 Suites 3 were checked. **null**"


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] asfgit closed pull request #94: Visa History page fix

2018-12-10 Thread GitBox
asfgit closed pull request #94: Visa History page fix
URL: https://github.com/apache/ignite-teamcity-bot/pull/94
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/observer/BuildObserver.java
 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/observer/BuildObserver.java
index 3de27fad..88a858e6 100644
--- 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/observer/BuildObserver.java
+++ 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/observer/BuildObserver.java
@@ -20,9 +20,11 @@
 import java.util.Objects;
 import java.util.Timer;
 import javax.inject.Inject;
-import org.apache.ignite.ci.IAnalyticsEnabledTeamcity;
 import org.apache.ignite.ci.ITcHelper;
 import org.apache.ignite.ci.tcmodel.result.Build;
+import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.ci.teamcity.ignited.ITeamcityIgnited;
+import org.apache.ignite.ci.teamcity.ignited.ITeamcityIgnitedProvider;
 import org.apache.ignite.ci.user.ICredentialsProv;
 import org.apache.ignite.ci.web.model.ContributionKey;
 import org.slf4j.Logger;
@@ -48,6 +50,12 @@
 /** Helper. */
 @Inject private ITcHelper tcHelper;
 
+/** */
+@Inject private ITeamcityIgnitedProvider teamcityIgnitedProvider;
+
+/** */
+@Inject private IStringCompactor strCompactor;
+
 /**
  */
 @Inject
@@ -109,11 +117,11 @@ public String getObservationStatus(ContributionKey key) {
 
 ICredentialsProv creds = tcHelper.getServerAuthorizerCreds();
 
-IAnalyticsEnabledTeamcity teamcity = tcHelper.server(key.srvId, creds);
+ITeamcityIgnited teamcity = teamcityIgnitedProvider.server(key.srvId, 
creds);
 
 if (Objects.nonNull(buildsInfo)) {
 sb.append(buildsInfo.ticket).append(" to be commented, waiting for 
builds. ");
-sb.append(buildsInfo.finishedBuildsCount(teamcity));
+sb.append(buildsInfo.finishedBuildsCount(teamcity, strCompactor));
 sb.append(" builds done from ");
 sb.append(buildsInfo.buildsCount());
 }
diff --git 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/observer/BuildsInfo.java
 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/observer/BuildsInfo.java
index ad1b548c..bbd01daa 100644
--- 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/observer/BuildsInfo.java
+++ 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/observer/BuildsInfo.java
@@ -24,9 +24,10 @@
 import java.util.Date;
 import java.util.List;
 import java.util.Objects;
-import org.apache.ignite.ci.IAnalyticsEnabledTeamcity;
 import org.apache.ignite.ci.tcmodel.result.Build;
 import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.ci.teamcity.ignited.ITeamcityIgnited;
+import org.apache.ignite.ci.teamcity.ignited.fatbuild.FatBuildCompacted;
 import org.apache.ignite.ci.user.ICredentialsProv;
 import org.apache.ignite.ci.web.model.ContributionKey;
 
@@ -103,20 +104,21 @@ public BuildsInfo(String srvId, ICredentialsProv prov, 
String ticket, String bra
 
 /**
  * @param teamcity Teamcity.
+ * @param strCompactor {@link IStringCompactor} instance.
  *
  * @return One of {@link #FINISHED_STATUS}, {@link #CANCELLED_STATUS} or
  * {@link #RUNNING_STATUS} statuses.
  */
-public String getStatus(IAnalyticsEnabledTeamcity teamcity) {
+public String getStatus(ITeamcityIgnited teamcity, IStringCompactor 
strCompactor) {
 boolean isFinished = true;
 
 for (Integer id : builds) {
-Build build = teamcity.getBuild(id);
+FatBuildCompacted build = teamcity.getFatBuild(id);
 
-if (build.isUnknown())
+if (build.isFakeStub() || build.isCancelled(strCompactor))
 return CANCELLED_STATUS;
 
-if (!build.isFinished())
+if (!build.isFinished(strCompactor))
 isFinished = false;
 }
 
@@ -125,16 +127,18 @@ public String getStatus(IAnalyticsEnabledTeamcity 
teamcity) {
 
 /**
  * @param teamcity Teamcity.
+ * @param strCompactor {@link IStringCompactor} instance.
  */
-public boolean isFinished(IAnalyticsEnabledTeamcity teamcity) {
-return FINISHED_STATUS.equals(getStatus(teamcity));
+public boolean isFinished(ITeamcityIgnited teamcity, IStringCompactor 
strCompactor) {
+return FINISHED_STATUS.equals(getStatus(teamcity, strCompactor));
 }
 
 /**
  * @param teamcity Teamcity.
+ * @param strCompactor {@link IStringCompactor} instance.
  */
-public boolean isCancelled(IAnalyticsEnabledTeamcity teamcity) {
-return CANCELLED_STATUS.equals(getStatus(teamcity));
+   

[GitHub] asfgit closed pull request #96: fix typo in schedulers

2018-12-10 Thread GitBox
asfgit closed pull request #96: fix typo in schedulers
URL: https://github.com/apache/ignite-teamcity-bot/pull/96
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/di/scheduler/NoOpSheduler.java
 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/di/scheduler/NoOpScheduler.java
similarity index 96%
rename from 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/di/scheduler/NoOpSheduler.java
rename to 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/di/scheduler/NoOpScheduler.java
index c4cae202..18d4362f 100644
--- 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/di/scheduler/NoOpSheduler.java
+++ 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/di/scheduler/NoOpScheduler.java
@@ -21,7 +21,7 @@
 /**
  * Sheduler which never waits
  */
-public class NoOpSheduler implements IScheduler {
+public class NoOpScheduler implements IScheduler {
 /** {@inheritDoc} */
 @Override public void invokeLater(Runnable cmd, long delay, TimeUnit unit) 
{
 
diff --git 
a/ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/di/scheduler/DirectExecNoWaitSheduler.java
 
b/ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/di/scheduler/DirectExecNoWaitScheduler.java
similarity index 95%
rename from 
ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/di/scheduler/DirectExecNoWaitSheduler.java
rename to 
ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/di/scheduler/DirectExecNoWaitScheduler.java
index a7f8904b..0b034fa4 100644
--- 
a/ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/di/scheduler/DirectExecNoWaitSheduler.java
+++ 
b/ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/di/scheduler/DirectExecNoWaitScheduler.java
@@ -21,7 +21,7 @@
 /**
  * Sheduler which never waits
  */
-public class DirectExecNoWaitSheduler implements IScheduler {
+public class DirectExecNoWaitScheduler implements IScheduler {
 /** {@inheritDoc} */
 @Override public void invokeLater(Runnable cmd, long delay, TimeUnit unit) 
{
 cmd.run();
diff --git 
a/ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/teamcity/ignited/IgnitedTcInMemoryIntegrationTest.java
 
b/ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/teamcity/ignited/IgnitedTcInMemoryIntegrationTest.java
index 1a7d64cb..51403a47 100644
--- 
a/ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/teamcity/ignited/IgnitedTcInMemoryIntegrationTest.java
+++ 
b/ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/teamcity/ignited/IgnitedTcInMemoryIntegrationTest.java
@@ -39,9 +39,9 @@
 import org.apache.ignite.ci.analysis.SuiteInBranch;
 import org.apache.ignite.ci.analysis.TestInBranch;
 import org.apache.ignite.ci.db.TcHelperDb;
-import org.apache.ignite.ci.di.scheduler.DirectExecNoWaitSheduler;
+import org.apache.ignite.ci.di.scheduler.DirectExecNoWaitScheduler;
 import org.apache.ignite.ci.di.scheduler.IScheduler;
-import org.apache.ignite.ci.di.scheduler.NoOpSheduler;
+import org.apache.ignite.ci.di.scheduler.NoOpScheduler;
 import org.apache.ignite.ci.tcbot.chain.PrChainsProcessorTest;
 import org.apache.ignite.ci.tcmodel.changes.ChangesList;
 import org.apache.ignite.ci.tcmodel.conf.BuildType;
@@ -170,7 +170,7 @@ public void saveAndLoadBuildReference() throws IOException {
 Injector injector = Guice.createInjector(module, new AbstractModule() {
 @Override protected void configure() {
 bind(Ignite.class).toInstance(ignite);
-bind(IScheduler.class).to(DirectExecNoWaitSheduler.class);
+bind(IScheduler.class).to(DirectExecNoWaitScheduler.class);
 }
 });
 
@@ -240,7 +240,7 @@ public void saveAndLoadBuildTypes() throws IOException, 
JAXBException {
 Injector injector = Guice.createInjector(module, new AbstractModule() {
 @Override protected void configure() {
 bind(Ignite.class).toInstance(ignite);
-bind(IScheduler.class).to(DirectExecNoWaitSheduler.class);
+bind(IScheduler.class).to(DirectExecNoWaitScheduler.class);
 }
 });
 
@@ -341,7 +341,7 @@ public void 
incrementalActualizationOfBuildsContainsQueued() throws IOException
 Injector injector = Guice.createInjector(module, new AbstractModule() {
 @Override protected void configure() {
 bind(Ignite.class).toInstance(ignite);
-bind(IScheduler.class).to(NoOpSheduler.class);
+bind(IScheduler.class).to(NoOpScheduler.class);
 }
 });
 
@@ -481,7 +481,7 @@ private void saveTmpFile(Object obj, String name) throws 
IOException, JAXBExcept
 
 @Test
 public void testRunHistSaveLoad() {
-  

[GitHub] SomeFire opened a new pull request #96: fix typo in schedulers

2018-12-10 Thread GitBox
SomeFire opened a new pull request #96: fix typo in schedulers
URL: https://github.com/apache/ignite-teamcity-bot/pull/96
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dspavlov commented on a change in pull request #89: IGNITE-10454 Create page with muted tests

2018-12-07 Thread GitBox
dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239939993
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteDao.java
 ##
 @@ -0,0 +1,126 @@
+/*
+ * 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.ignite.ci.tcmodel.mute;
+
+import com.google.common.base.Preconditions;
+import java.util.Set;
+import javax.inject.Inject;
+import javax.inject.Provider;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.ci.db.TcHelperDb;
+import org.apache.ignite.ci.di.AutoProfiling;
+import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.internal.util.typedef.F;
+
+/**
+ *
+ */
+public class MuteDao {
+/** Cache name. */
+public static final String TEAMCITY_MUTE_CACHE_NAME = "teamcityMute";
+
+/** Ignite provider. */
+@Inject private Provider igniteProvider;
+
+/** Builds cache. */
+private IgniteCache muteCache;
+
+/** Compactor. */
+@Inject private IStringCompactor compactor;
+
+/**
+ *
+ */
+public void init() {
+muteCache = 
igniteProvider.get().getOrCreateCache(TcHelperDb.getCacheV2Config(TEAMCITY_MUTE_CACHE_NAME));
+}
+
+/**
+ * @param srvIdMaskHigh Server id mask high.
+ * @param projectId Build id.
+ */
+@AutoProfiling
+public Mutes getMutes(int srvIdMaskHigh, String projectId) {
+Preconditions.checkNotNull(muteCache, "init() was not called");
+
+MutesCompacted compacted = 
muteCache.get(projectIdToCacheKey(srvIdMaskHigh, projectId));
+
+return compacted != null ? compacted.toMutes(compactor) : new Mutes();
+}
+
+/**
+ * Combine server and project into key for storage.
+ *
+ * @param srvIdMaskHigh Server id mask high.
+ * @param projectId Build type id.
+ * @return Key from server-project pair.
+ */
+public static long projectIdToCacheKey(long srvIdMaskHigh, String 
projectId) {
+return (long)projectId.hashCode() | srvIdMaskHigh << 32;
+}
+
+/**
+ * Save small part of loaded mutes.
+ *
+ * @param srvId Server id.
+ * @param projectId Project id.
+ * @param chunk Chunk.
+ */
+public void saveChunk(int srvId, String projectId, Set chunk) {
 
 Review comment:
   To make this method thread-safe we should lock on updated entry before 
read-update-modify. But please consider cache transformation instead.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dspavlov commented on a change in pull request #89: IGNITE-10454 Create page with muted tests

2018-12-07 Thread GitBox
dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239939993
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteDao.java
 ##
 @@ -0,0 +1,126 @@
+/*
+ * 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.ignite.ci.tcmodel.mute;
+
+import com.google.common.base.Preconditions;
+import java.util.Set;
+import javax.inject.Inject;
+import javax.inject.Provider;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.ci.db.TcHelperDb;
+import org.apache.ignite.ci.di.AutoProfiling;
+import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.internal.util.typedef.F;
+
+/**
+ *
+ */
+public class MuteDao {
+/** Cache name. */
+public static final String TEAMCITY_MUTE_CACHE_NAME = "teamcityMute";
+
+/** Ignite provider. */
+@Inject private Provider igniteProvider;
+
+/** Builds cache. */
+private IgniteCache muteCache;
+
+/** Compactor. */
+@Inject private IStringCompactor compactor;
+
+/**
+ *
+ */
+public void init() {
+muteCache = 
igniteProvider.get().getOrCreateCache(TcHelperDb.getCacheV2Config(TEAMCITY_MUTE_CACHE_NAME));
+}
+
+/**
+ * @param srvIdMaskHigh Server id mask high.
+ * @param projectId Build id.
+ */
+@AutoProfiling
+public Mutes getMutes(int srvIdMaskHigh, String projectId) {
+Preconditions.checkNotNull(muteCache, "init() was not called");
+
+MutesCompacted compacted = 
muteCache.get(projectIdToCacheKey(srvIdMaskHigh, projectId));
+
+return compacted != null ? compacted.toMutes(compactor) : new Mutes();
+}
+
+/**
+ * Combine server and project into key for storage.
+ *
+ * @param srvIdMaskHigh Server id mask high.
+ * @param projectId Build type id.
+ * @return Key from server-project pair.
+ */
+public static long projectIdToCacheKey(long srvIdMaskHigh, String 
projectId) {
+return (long)projectId.hashCode() | srvIdMaskHigh << 32;
+}
+
+/**
+ * Save small part of loaded mutes.
+ *
+ * @param srvId Server id.
+ * @param projectId Project id.
+ * @param chunk Chunk.
+ */
+public void saveChunk(int srvId, String projectId, Set chunk) {
 
 Review comment:
   To make this method concurrent we should lock on updated entry. But please 
consider cache transformation instead.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dspavlov commented on a change in pull request #89: IGNITE-10454 Create page with muted tests

2018-12-07 Thread GitBox
dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239939250
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteDao.java
 ##
 @@ -0,0 +1,126 @@
+/*
+ * 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.ignite.ci.tcmodel.mute;
+
+import com.google.common.base.Preconditions;
+import java.util.Set;
+import javax.inject.Inject;
+import javax.inject.Provider;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.ci.db.TcHelperDb;
+import org.apache.ignite.ci.di.AutoProfiling;
+import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.internal.util.typedef.F;
+
+/**
+ *
+ */
+public class MuteDao {
+/** Cache name. */
+public static final String TEAMCITY_MUTE_CACHE_NAME = "teamcityMute";
+
+/** Ignite provider. */
+@Inject private Provider igniteProvider;
+
+/** Builds cache. */
+private IgniteCache muteCache;
+
+/** Compactor. */
+@Inject private IStringCompactor compactor;
+
+/**
+ *
+ */
+public void init() {
+muteCache = 
igniteProvider.get().getOrCreateCache(TcHelperDb.getCacheV2Config(TEAMCITY_MUTE_CACHE_NAME));
+}
+
+/**
+ * @param srvIdMaskHigh Server id mask high.
+ * @param projectId Build id.
+ */
+@AutoProfiling
+public Mutes getMutes(int srvIdMaskHigh, String projectId) {
+Preconditions.checkNotNull(muteCache, "init() was not called");
+
+MutesCompacted compacted = 
muteCache.get(projectIdToCacheKey(srvIdMaskHigh, projectId));
+
+return compacted != null ? compacted.toMutes(compactor) : new Mutes();
+}
+
+/**
+ * Combine server and project into key for storage.
+ *
+ * @param srvIdMaskHigh Server id mask high.
+ * @param projectId Build type id.
+ * @return Key from server-project pair.
+ */
+public static long projectIdToCacheKey(long srvIdMaskHigh, String 
projectId) {
+return (long)projectId.hashCode() | srvIdMaskHigh << 32;
+}
+
+/**
+ * Save small part of loaded mutes.
+ *
+ * @param srvId Server id.
+ * @param projectId Project id.
+ * @param chunk Chunk.
+ */
+public void saveChunk(int srvId, String projectId, Set chunk) {
+if (F.isEmpty(chunk))
+return;
+
+long key = projectIdToCacheKey(srvId, projectId);
+MutesCompacted compacted = muteCache.get(key);
 
 Review comment:
   What if we transform muteCache entries to be separated for each mute 
occurrence? It will save disk IO and saveChunk will become concurrent. We can 
use putAll for saving, and ScanQuery for extracting mutes related to a 
particular project. Actually, I expect there will be just 1 project.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dspavlov commented on a change in pull request #94: Visa History page fix

2018-12-07 Thread GitBox
dspavlov commented on a change in pull request #94: Visa History page fix
URL: https://github.com/apache/ignite-teamcity-bot/pull/94#discussion_r239899293
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/ITeamcityIgnited.java
 ##
 @@ -167,4 +167,9 @@ public default FatBuildCompacted getFatBuild(int id) {
  * @return run statistics of recent runls on all branches.
  */
 @Nullable public IRunStat getSuiteRunStatAllBranches(String 
suiteBuildTypeId);
+
 
 Review comment:
   this change will create 2 responsibility for TC Ignited: it will be as 
always interface to persisted data, but also it will be a provider of the 
compactor. Is it better to keep it separated and provide compactor as a 
parameter or using context?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dspavlov commented on a change in pull request #94: Visa History page fix

2018-12-07 Thread GitBox
dspavlov commented on a change in pull request #94: Visa History page fix
URL: https://github.com/apache/ignite-teamcity-bot/pull/94#discussion_r239898896
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/observer/BuildsInfo.java
 ##
 @@ -107,16 +108,16 @@ public BuildsInfo(String srvId, ICredentialsProv prov, 
String ticket, String bra
  * @return One of {@link #FINISHED_STATUS}, {@link #CANCELLED_STATUS} or
  * {@link #RUNNING_STATUS} statuses.
  */
-public String getStatus(IAnalyticsEnabledTeamcity teamcity) {
+public String getStatus(ITeamcityIgnited teamcity) {
 boolean isFinished = true;
 
 for (Integer id : builds) {
-Build build = teamcity.getBuild(id);
+FatBuildCompacted build = teamcity.getFatBuild(id);
 
-if (build.isUnknown())
+if (build.isFakeStub() || build.isCancelled(teamcity.compactor()))
 
 Review comment:
   we can inject compactor where needed. For cases it is used not in injector 
created classes it is better to use it as a parameter.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dspavlov opened a new pull request #95: IGNITE-9542: new run history stripe

2018-12-07 Thread GitBox
dspavlov opened a new pull request #95: IGNITE-9542: new run history stripe
URL: https://github.com/apache/ignite-teamcity-bot/pull/95
 
 
   - flakiness detection
   - new failures detection
   - switch to new mode


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ololo3000 opened a new pull request #94: Visa History page fix

2018-12-07 Thread GitBox
ololo3000 opened a new pull request #94: Visa History page fix
URL: https://github.com/apache/ignite-teamcity-bot/pull/94
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dspavlov commented on a change in pull request #89: IGNITE-10454 Create page with muted tests

2018-12-07 Thread GitBox
dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239799469
 
 

 ##
 File path: 
ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/di/scheduler/DirectExecNoWaitScheduler.java
 ##
 @@ -21,7 +21,7 @@
 /**
  * Sheduler which never waits
  */
-public class DirectExecNoWaitSheduler implements IScheduler {
+public class DirectExecNoWaitScheduler implements IScheduler {
 
 Review comment:
   Always feel free to create a separate small PRs for such changes (srvNme, 
misprints, etc). It is easier to accept such small changes without relation to 
a big feature. Big feature change can be rejected, but small and needed changes 
will wait. With a separate PRs is it easy to accept separately 
A)refactoring/improving/misprints corrections and B) big feature.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dspavlov commented on a change in pull request #89: IGNITE-10454 Create page with muted tests

2018-12-07 Thread GitBox
dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239798869
 
 

 ##
 File path: ignite-tc-helper-web/src/main/webapp/mutes.html
 ##
 @@ -0,0 +1,224 @@
+
+
+
+
+Apache Ignite Teamcity Bot - Muted tests
+
+https://code.jquery.com/jquery-1.12.4.js";>
+https://code.jquery.com/ui/1.12.1/jquery-ui.js";>
+
+https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css;>
+
+https://cdn.datatables.net/1.10.16/js/jquery.dataTables.js";>
+https://cdn.datatables.net/1.10.16/js/dataTables.jqueryui.js";>
+https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css;>
+https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css;>
+

[GitHub] dspavlov commented on a change in pull request #89: IGNITE-10454 Create page with muted tests

2018-12-07 Thread GitBox
dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239798519
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/tracked/GetTrackedBranchTestResults.java
 ##
 @@ -140,4 +145,31 @@ public TestFailuresSummary 
getAllTestFailsNoCache(@Nullable @QueryParam("branch"
 
 return tbProc.getTrackedBranchTestFailures(branchOpt, checkAllLogs, 
cntLimit, creds);
 }
+
+/**
+ * @param srvId Server id.
+ * @param projectId Project id.
+ * @return Mutes for given server-project pair.
+ */
+@GET
+@Path("mutes")
+public Set mutes(
+@Nullable @QueryParam("serverId") String srvId,
+@Nullable @QueryParam("projectId") String projectId
+) {
+ICredentialsProv creds = ICredentialsProv.get(req);
+
+if (F.isEmpty(srvId))
+srvId = "apache";
+
+if (F.isEmpty(projectId))
+projectId = "IgniteTests24Java8";
 
 Review comment:
   Probably we can create method returning default suite for a server. 
Something similar to recently merged #90 and getContributionStatus() - contains 
iteration on tracked branches. We can extract it as a separate method. This 
change we can do in a standalone PR, but anyway, please consider it as well.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dspavlov commented on a change in pull request #89: IGNITE-10454 Create page with muted tests

2018-12-07 Thread GitBox
dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239798051
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/tracked/GetTrackedBranchTestResults.java
 ##
 @@ -140,4 +145,31 @@ public TestFailuresSummary 
getAllTestFailsNoCache(@Nullable @QueryParam("branch"
 
 return tbProc.getTrackedBranchTestFailures(branchOpt, checkAllLogs, 
cntLimit, creds);
 }
+
+/**
+ * @param srvId Server id.
+ * @param projectId Project id.
+ * @return Mutes for given server-project pair.
+ */
+@GET
+@Path("mutes")
+public Set mutes(
+@Nullable @QueryParam("serverId") String srvId,
+@Nullable @QueryParam("projectId") String projectId
+) {
+ICredentialsProv creds = ICredentialsProv.get(req);
+
+if (F.isEmpty(srvId))
+srvId = "apache";
 
 Review comment:
   Avoid hardcoding. At least use constants - we have method retuning default 
server ID.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dspavlov commented on a change in pull request #89: IGNITE-10454 Create page with muted tests

2018-12-07 Thread GitBox
dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239796897
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteInfoCompacted.java
 ##
 @@ -0,0 +1,154 @@
+/*
+ * 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.ignite.ci.tcmodel.mute;
 
 Review comment:
   Please place compacted objects related to Ignite storage to package 
org.apache.ignite.ci.teamcity.ignited.mute but not in package with TC XML models


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dspavlov commented on a change in pull request #89: IGNITE-10454 Create page with muted tests

2018-12-07 Thread GitBox
dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239796518
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/TeamcityIgnitedImpl.java
 ##
 @@ -550,8 +581,51 @@ private void sheduleResyncBuildRefs() {
  *
  */
 void fullReindex() {
-buildRefSync.runActualizeBuildRefs(srvNme, true, null, conn);
+buildRefSync.runActualizeBuildRefs(srvName, true, null, conn);
 }
 
 
+/**
+ * Refresh mutes for given project.
+ *
+ * @param projectId Project id.
+ * @return Message with loading result.
+ */
+protected String actualizeMuteRefs(String projectId) {
 
 Review comment:
   I suggest moving this actualization outside of TC Ignited class to avoid 
creating a god object in future. We can name it MuteSync or something like that.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dspavlov commented on a change in pull request #89: IGNITE-10454 Create page with muted tests

2018-12-07 Thread GitBox
dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239795515
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteScope.java
 ##
 @@ -0,0 +1,65 @@
+/*
+ * 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.ignite.ci.tcmodel.mute;
+
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import org.apache.ignite.ci.tcmodel.conf.BuildType;
+import org.apache.ignite.ci.tcmodel.conf.Project;
+
+/**
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+public class MuteScope {
+/** Project. */
+@XmlElement public Project project;
+
+/** Build types. */
+@XmlElementWrapper(name = "buildTypes")
+@XmlElement(name = "buildType")
+public List buildTypes;
+
+/** {@inheritDoc} */
+@Override public boolean equals(Object o) {
 
 Review comment:
   Do we really need to compare XML models? If so I suggest to use Objects & 
generated code


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dspavlov commented on a change in pull request #89: IGNITE-10454 Create page with muted tests

2018-12-07 Thread GitBox
dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239795307
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteInfoCompacted.java
 ##
 @@ -0,0 +1,154 @@
+/*
+ * 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.ignite.ci.tcmodel.mute;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.apache.ignite.ci.tcmodel.result.tests.TestRef;
+import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
+import org.apache.ignite.internal.util.typedef.F;
+
+/**
+ * @see MuteInfo
+ */
+public class MuteInfoCompacted {
+/** Mute id. */
+int id;
+
+/** Assignment. Mute date. */
+int muteDate;
+
+/** Assignment. Text. */
+int text;
+
+/** Scope. */
+MuteScopeCompacted scope;
+
+/** Target. Test ids. */
+long[] testIds;
+
+/** Target. Test names. */
+int[] testNames;
+
+/** Target. Test hrefs. */
+int[] testHrefs;
+
+/**
+ * @param mute Mute to compact.
+ * @param comp Compactor.
+ */
+MuteInfoCompacted(MuteInfo mute, IStringCompactor comp) {
+id = mute.id;
+
+muteDate = comp.getStringId(mute.assignment.muteDate);
+text = comp.getStringId(mute.assignment.text);
+
+scope = new MuteScopeCompacted(mute.scope, comp);
+
+List tests = mute.target.tests;
+
+if (F.isEmpty(tests))
+return;
+
+testIds = new long[tests.size()];
+testNames = new int[tests.size()];
+testHrefs = new int[tests.size()];
+
+for (int i = 0; i < tests.size(); i++) {
+TestRef test = tests.get(i);
+
+testIds[i] = Long.valueOf(test.id);
+testNames[i] = comp.getStringId(test.name);
+testHrefs[i] = comp.getStringId(test.href);
 
 Review comment:
   Can we generate href during uncompression of entity? Probably concatenating 
ITeamcityConn.host()+"tests" +testId


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dspavlov commented on a change in pull request #89: IGNITE-10454 Create page with muted tests

2018-12-07 Thread GitBox
dspavlov commented on a change in pull request #89: IGNITE-10454 Create page 
with muted tests
URL: https://github.com/apache/ignite-teamcity-bot/pull/89#discussion_r239794453
 
 

 ##
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/mute/MuteInfo.java
 ##
 @@ -0,0 +1,74 @@
+/*
+ * 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.ignite.ci.tcmodel.mute;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ *
+ */
+@XmlRootElement(name = "mute")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class MuteInfo {
+/** Id. */
+@XmlAttribute public int id;
+
+/** Assignment. */
+@XmlElement public MuteAssignment assignment;
+
+/** Scope. */
+@XmlElement public MuteScope scope;
+
+/** Target. */
+@XmlElement public MuteTarget target;
+
+/** {@inheritDoc} */
+@Override public boolean equals(Object o) {
+if (this == o)
+return true;
+
+if (o == null || getClass() != o.getClass())
+return false;
+
+MuteInfo info = (MuteInfo)o;
+
+if (id != info.id)
+return false;
+
+if (assignment != null ? !assignment.equals(info.assignment) : 
info.assignment != null)
+return false;
+
+if (scope != null ? !scope.equals(info.scope) : info.scope != null)
+return false;
+
+return target != null ? target.equals(info.target) : info.target == 
null;
+}
+
+/** {@inheritDoc} */
+@Override public int hashCode() {
 
 Review comment:
I suggest using autogen hashcode: 
   @Override public int hashCode() {
   return Objects.hashCode(login, avatarUrl);
   }


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


  1   2   3   4   5   >