MCPcopy Create free account
hub / github.com/apache/pig / selectExecType

Method selectExecType

src/org/apache/pig/ExecTypeProvider.java:34–51  ·  view source on GitHub ↗
(Properties properties)

Source from the content-addressed store, hash-verified

32 private static final Log log = LogFactory.getLog(ExecTypeProvider.class);
33
34 public static ExecType selectExecType(Properties properties)
35 throws PigException {
36
37 ServiceLoader<ExecType> frameworkLoader = ServiceLoader
38 .load(ExecType.class);
39
40 for (ExecType execType : frameworkLoader) {
41 log.info("Trying ExecType : " + execType);
42 if (execType.accepts(properties)) {
43 log.info("Picked " + execType + " as the ExecType");
44 return getSingleton(execType);
45 } else {
46 log.debug("Cannot pick " + execType + " as the ExecType");
47 }
48 }
49 throw new PigException("Unknown exec type: "
50 + properties.getProperty("exectype"), 2040);
51 }
52
53 /**
54 * This method attempts to return a singleton instance of the given exec

Callers 2

fromStringMethod · 0.95
PigContextMethod · 0.95

Calls 6

getSingletonMethod · 0.95
infoMethod · 0.80
debugMethod · 0.80
getPropertyMethod · 0.80
acceptsMethod · 0.65
loadMethod · 0.45

Tested by

no test coverage detected