|
28 | 28 | import org.apache.tez.dag.api.records.DAGProtos.TezNamedEntityDescriptorProto; |
29 | 29 |
|
30 | 30 | import com.google.common.annotations.VisibleForTesting; |
31 | | -import com.google.common.base.Preconditions; |
32 | 31 | import com.google.common.collect.BiMap; |
33 | 32 | import com.google.common.collect.HashBiMap; |
34 | 33 | import com.google.common.collect.Lists; |
@@ -127,9 +126,6 @@ public PluginDescriptors parseAllPlugins(boolean isLocal, UserPayload defaultPay |
127 | 126 | amPluginDescriptorProto.getTaskSchedulersList()), |
128 | 127 | tezYarnEnabled, uberEnabled, defaultPayload); |
129 | 128 |
|
130 | | - // post-process task scheduler plugin descriptors |
131 | | - processSchedulerDescriptors(taskSchedulerDescriptors, isLocal, defaultPayload, taskSchedulers); |
132 | | - |
133 | 129 | // parse container launcher plugins |
134 | 130 | parsePlugin(containerLauncherDescriptors, containerLaunchers, |
135 | 131 | (amPluginDescriptorProto == null || |
@@ -192,38 +188,6 @@ public static void addDescriptor(List<NamedEntityDescriptor> list, BiMap<String, |
192 | 188 | pluginMap.put(list.getLast().getEntityName(), list.size() - 1); |
193 | 189 | } |
194 | 190 |
|
195 | | - /** |
196 | | - * Process scheduler descriptors with framework-specific logic. |
197 | | - */ |
198 | | - public void processSchedulerDescriptors(List<NamedEntityDescriptor> descriptors, boolean isLocal, |
199 | | - UserPayload defaultPayload, |
200 | | - BiMap<String, Integer> schedulerPluginMap) { |
201 | | - if (isLocal) { |
202 | | - boolean foundUberServiceName = false; |
203 | | - for (NamedEntityDescriptor<?> descriptor : descriptors) { |
204 | | - if (descriptor.getEntityName().equals(TezConstants.getTezUberServicePluginName())) { |
205 | | - foundUberServiceName = true; |
206 | | - break; |
207 | | - } |
208 | | - } |
209 | | - Preconditions.checkState(foundUberServiceName); |
210 | | - } else { |
211 | | - boolean foundYarn = false; |
212 | | - for (NamedEntityDescriptor descriptor : descriptors) { |
213 | | - if (descriptor.getEntityName().equals(TezConstants.getTezYarnServicePluginName())) { |
214 | | - foundYarn = true; |
215 | | - break; |
216 | | - } |
217 | | - } |
218 | | - if (!foundYarn) { |
219 | | - NamedEntityDescriptor<?> yarnDescriptor = |
220 | | - new NamedEntityDescriptor(TezConstants.getTezYarnServicePluginName(), null) |
221 | | - .setUserPayload(defaultPayload); |
222 | | - addDescriptor(descriptors, schedulerPluginMap, yarnDescriptor); |
223 | | - } |
224 | | - } |
225 | | - } |
226 | | - |
227 | 191 | /** |
228 | 192 | * Get the task schedulers map. |
229 | 193 | */ |
|
0 commit comments