public void reset() { numRows = 0l; numBytes = 0l; numBlocks = 0; numShuffleOutputs = 0; avgRows = 0l; readBytes = 0l; columnStatses = TUtil.newList(); }
@Override boolean equalsTo(Expr expr) { Relation other = (Relation) expr; return TUtil.checkEquals(tableName, other.tableName) && TUtil.checkEquals(alias, other.alias); }
public Map<String, String> getVariables() { if (variables == null) { variables = TUtil.newHashMap(); } return variables; }
private void initProperties() { if (properties == null) { properties = TUtil.newHashMap(); for (EnforceProperty property : proto.getPropertiesList()) { TUtil.putToNestedList(properties, property.getType(), property); } } }
protected SelfDiagnosisRuleSession(SelfDiagnosisRuleEngine engine) { ruleEngine = engine; categoryPredicate = TUtil.newHashSet(); rulePredicate = TUtil.newHashSet(); }
@Override public NodeState transition(NodeStatus nodeStatus, NodeEvent event) { NodeStatusEvent statusEvent = TUtil.checkTypeAndGet(event, NodeStatusEvent.class); nodeStatus.updateStatus(statusEvent); return NodeState.RUNNING; } }
public void addRelation(RelationNode relation) { if (relation.hasAlias()) { TUtil.putToNestedList(relationAliasMap, relation.getTableName(), relation.getCanonicalName()); } canonicalNameToRelationMap.put(relation.getCanonicalName(), relation); relationList.add(relation); relNodePidAccessPathMap.put(relation.getPID(), new ArrayList<>()); }
public static boolean isUpperCastable(Type define, Type given) { if (given == define) { return true; } return TUtil.containsInNestedMap(FUNCTION_ACCEPTABLE_PARAM_MAP, given, define); }
public static Direction getCastingDirection(Type lhs, Type rhs) { Direction direction = TUtil.getFromNestedMap(CatalogUtil.CASTING_DIRECTION_MAP, lhs, rhs); if (direction == null) { return Direction.BOTH; } return direction; }
@Override public Set<RelationVertex> getRelations() { return TUtil.newHashSet(this); }
@Override public NodeState transition(NodeStatus nodeStatus, NodeEvent event) { NodeStatusEvent statusEvent = TUtil.checkTypeAndGet(event, NodeStatusEvent.class); nodeStatus.updateStatus(statusEvent); return NodeState.RUNNING; } }
public void addRelation(RelationNode relation) { if (relation.hasAlias()) { TUtil.putToNestedList(relationAliasMap, relation.getTableName(), relation.getCanonicalName()); } canonicalNameToRelationMap.put(relation.getCanonicalName(), relation); relationList.add(relation); relNodePidAccessPathMap.put(relation.getPID(), new ArrayList<AccessPathInfo>()); }
public static boolean isUpperCastable(TajoDataTypes.Type define, TajoDataTypes.Type given) { if (given.equals(define)) { return true; } return TUtil.containsInNestedMap(FUNCTION_ACCEPTABLE_PARAM_MAP, given, define); }
public static Direction getCastingDirection(Type lhs, Type rhs) { Direction direction = TUtil.getFromNestedMap(CatalogUtil.CASTING_DIRECTION_MAP, lhs, rhs); if (direction == null) { return Direction.BOTH; } return direction; }
@Override public Collection<Class<? extends LogicalPlanRewriteRule>> getPostRules() { List<Class<? extends LogicalPlanRewriteRule>> rules = TUtil.newList( ProjectionPushDownRule.class, PartitionedTableRewriter.class, AccessPathRewriter.class ); return rules; } }
public boolean equals(Object object) { if (object instanceof ColumnPartition) { ColumnPartition another = (ColumnPartition) object; return type == another.type && TUtil.checkEquals(columns, another.columns); } return false; }
@SuppressWarnings("unused") public Enforcer() { properties = TUtil.newHashMap(); }
@Override boolean equalsTo(Expr expr) { Set<Expr> thisSet = TUtil.newHashSet(relations); RelationList another = (RelationList) expr; Set<Expr> anotherSet = TUtil.newHashSet(another.relations); return thisSet.equals(anotherSet); }
@Override protected void serviceInit(Configuration conf) throws Exception { this.tajoConf = TUtil.checkTypeAndGet(conf, TajoConf.class); super.serviceInit(conf); }
public void addRelation(RelationNode relation, List<AccessPathInfo> accessPathInfos) { if (relation.hasAlias()) { TUtil.putToNestedList(relationAliasMap, relation.getTableName(), relation.getCanonicalName()); } canonicalNameToRelationMap.put(relation.getCanonicalName(), relation); relationList.add(relation); relNodePidAccessPathMap.put(relation.getPID(), new ArrayList<AccessPathInfo>()); }