Search in sources :

Example 1 with OpTreeSignature

use of org.apache.hadoop.hive.ql.optimizer.signature.OpTreeSignature in project hive by apache.

the class SimpleRuntimeStatsSource method lookup.

@Override
public Optional<OperatorStats> lookup(Operator<?> op) {
    try {
        OpTreeSignature sig = OpTreeSignature.of(op);
        List<OperatorStats> v = pm.lookupAll(OperatorStats.class, sig);
        if (v.size() > 0) {
            return Optional.of(v.get(0));
        }
        return Optional.empty();
    } catch (NoSuchElementException | IllegalArgumentException iae) {
        return Optional.empty();
    }
}
Also used : OpTreeSignature(org.apache.hadoop.hive.ql.optimizer.signature.OpTreeSignature) OperatorStats(org.apache.hadoop.hive.ql.stats.OperatorStats) NoSuchElementException(java.util.NoSuchElementException)

Aggregations

NoSuchElementException (java.util.NoSuchElementException)1 OpTreeSignature (org.apache.hadoop.hive.ql.optimizer.signature.OpTreeSignature)1 OperatorStats (org.apache.hadoop.hive.ql.stats.OperatorStats)1