AMashenkov commented on a change in pull request #9081:
URL: https://github.com/apache/ignite/pull/9081#discussion_r633572949



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueryResultFetcher.java
##########
@@ -0,0 +1,243 @@
+/*
+ * 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.processors.cache.query;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.UUID;
+import java.util.concurrent.ConcurrentMap;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.internal.managers.communication.GridIoPolicy;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+/**
+ * This class is responsible for sending request for query result pages to 
remote nodes.
+ */
+public abstract class CacheQueryResultFetcher {
+    /**
+     * Map (requestId -> query future) where request id is unique for all 
requests per query.
+     * This map is populated by query manager.
+     */
+    private final ConcurrentMap<Long, GridCacheDistributedQueryFuture<?, ?, 
?>> qryFuts;
+
+    /** Cache context. */
+    private final GridCacheContext cctx;
+
+    /** Ignite logger. */
+    private final IgniteLogger log;
+
+    /** */
+    CacheQueryResultFetcher(
+        final GridCacheContext cctx,
+        final ConcurrentMap<Long, GridCacheDistributedQueryFuture<?, ?, ?>> 
qryFuts) {

Review comment:
       CacheQueryResultFetcher doesn't look like good class name.
   1. Actually, it is not fetcher for particular query, it is a holder for 
object-fetchers for multiple queries.
   2. Why it depends on qryFuts?
   3. The functionality of the class is limited to create-and-send requests, 
but any response processing is out of scope...
   So, it is a 'requester', but not 'fetcher'




-- 
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:
[email protected]


Reply via email to