[
https://issues.apache.org/jira/browse/HIVE-26412?focusedWorklogId=793095&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-793095
]
ASF GitHub Bot logged work on HIVE-26412:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 20/Jul/22 08:37
Start Date: 20/Jul/22 08:37
Worklog Time Spent: 10m
Work Description: adesh-rao commented on code in PR #3456:
URL: https://github.com/apache/hive/pull/3456#discussion_r925333209
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/AvailableSlotsCalculator.java:
##########
@@ -0,0 +1,32 @@
+/*
+ * 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.hadoop.hive.ql.exec.tez;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.tez.runtime.api.InputInitializerContext;
+
+/**
+ * Interface for fetching available slots during split calculation
+ */
+public interface AvailableSlotsCalculator {
+
+ void initialize(Configuration conf);
+
+ int getAvailaleSlots(InputInitializerContext inputInitializerContext);
Review Comment:
Removed the dependency of tez input context on the interface.
Issue Time Tracking
-------------------
Worklog Id: (was: 793095)
Time Spent: 40m (was: 0.5h)
> Create interface to fetch available slots during split calculation
> ------------------------------------------------------------------
>
> Key: HIVE-26412
> URL: https://issues.apache.org/jira/browse/HIVE-26412
> Project: Hive
> Issue Type: Task
> Reporter: Adesh Kumar Rao
> Assignee: Adesh Kumar Rao
> Priority: Major
> Labels: pull-request-available
> Time Spent: 40m
> Remaining Estimate: 0h
>
> HiveSplitGenerator is tightly coupled with Tez's InputContext to fetch the
> available slots during split calculation. Creating a interface to fetch the
> available slots will allow having other implementation too which are more
> suitable for different cloud vendors.
> The idea is to have a default implementation using Tez's InputContext and a
> new HiveConfiguration pointing to the class implementing the interface.
> Different cloud vendors can plugin there strategy by implementing the
> interface.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)