tkalkirill commented on code in PR #1111:
URL: https://github.com/apache/ignite-3/pull/1111#discussion_r977198562
##########
modules/configuration/src/main/java/org/apache/ignite/internal/configuration/util/ConfigurationUtil.java:
##########
@@ -1159,14 +1159,15 @@ public static <T extends ConfigurationProperty<?>> T
getByInternalId(NamedConfig
/**
* Returns named list node element by its internal id rather than its name.
*/
+ @Nullable
public static <N> N getByInternalId(NamedListView<N> node, UUID
internalId) {
Review Comment:
Please add a description of the arguments.
##########
modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/PersistentPageMemoryStorageEngine.java:
##########
@@ -189,11 +188,9 @@ public void stop() throws StorageException {
@Override
public PersistentPageMemoryTableStorage createMvTable(TableConfiguration
tableCfg, TablesConfiguration tablesCfg)
throws StorageException {
- TableView tableView = tableCfg.value();
+ PersistentPageMemoryDataStorageView dataStorageView =
(PersistentPageMemoryDataStorageView) tableCfg.dataStorage().value();
- assert tableView.dataStorage().name().equals(ENGINE_NAME) :
tableCfg.dataStorage().name();
-
- PersistentPageMemoryDataStorageView dataStorageView =
(PersistentPageMemoryDataStorageView) tableView.dataStorage();
+ assert dataStorageView.name().equals(ENGINE_NAME) :
dataStorageView.name();
Review Comment:
Maybe it's not necessary if we've already cast to the correct interface?
##########
modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/VolatilePageMemoryStorageEngine.java:
##########
@@ -95,11 +94,9 @@ public void stop() throws StorageException {
@Override
public VolatilePageMemoryTableStorage createMvTable(TableConfiguration
tableCfg, TablesConfiguration tablesCfg)
throws StorageException {
- TableView tableView = tableCfg.value();
+ VolatilePageMemoryDataStorageView dataStorageView =
(VolatilePageMemoryDataStorageView) tableCfg.dataStorage().value();
- assert tableView.dataStorage().name().equals(ENGINE_NAME) :
tableView.dataStorage().name();
-
- VolatilePageMemoryDataStorageView dataStorageView =
(VolatilePageMemoryDataStorageView) tableView.dataStorage();
+ assert dataStorageView.name().equals(ENGINE_NAME) :
dataStorageView.name();
Review Comment:
Maybe it's not necessary if we've already cast to the correct interface?
##########
modules/configuration/src/main/java/org/apache/ignite/internal/configuration/util/ConfigurationUtil.java:
##########
@@ -1159,14 +1159,15 @@ public static <T extends ConfigurationProperty<?>> T
getByInternalId(NamedConfig
/**
* Returns named list node element by its internal id rather than its name.
*/
+ @Nullable
public static <N> N getByInternalId(NamedListView<N> node, UUID
internalId) {
return node.get(((NamedListNode<?>) node).keyByInternalId(internalId));
}
/**
* Returns internal id for the value associated with the passed key.
*/
- public static <N> UUID getInternalId(NamedListView<N> node, String name) {
+ public static UUID internalId(NamedListView<?> node, String name) {
Review Comment:
Please add a description of the arguments.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]