public String assertAppPath() { String path = getAttributes().get(LogicalPlan.APPLICATION_PATH); if (path == null) { throw new AssertionError("Missing " + LogicalPlan.APPLICATION_PATH); } return path; }
public StreamCodec<?> getStreamCodec() { return attributes.get(STREAM_CODEC); }
public void setup(com.datatorrent.api.Context.PortContext context) { pojoType = context.getAttributes().get(Context.PortContext.TUPLE_CLASS); } };
@Override public void setup(Context.PortContext context) { if (context.getAttributes().contains(Context.PortContext.TUPLE_CLASS)) { pojoClass = context.getAttributes().get(Context.PortContext.TUPLE_CLASS); } }
@Override public <T> T getValue(Attribute<T> key) { T attr = attributes.get(key); if (attr == null) { attr = LogicalPlan.this.getValue(key); } if (attr == null) { return key.defaultValue; } return attr; }
public static <T> T getValueWithDefault(Attribute.AttributeMap map, Attribute<T> key) { T value = map.get(key); if (value == null) { value = key.defaultValue; } return value; }
@Override public <T> T getValue(Attribute<T> key) { T attr = attributes.get(key); if (attr != null) { return attr; } return parentContext == null ? key.defaultValue : parentContext.getValue(key); }
@Override public void setup(Context.PortContext context) { if (context.getAttributes().contains(Context.PortContext.TUPLE_CLASS)) { pojoClass = context.getAttributes().get(Context.PortContext.TUPLE_CLASS); } }
/** * Saves the yarn application id which can be used by create application * specific table/region in KeyValue sore. */ @Override public void setApplicationAttributes(AttributeMap map) { this.applicationId = map.get(DAGContext.APPLICATION_ID); getStore().setTableName(applicationId); }
private void setupStringCodecs() { Map<Class<?>, Class<? extends StringCodec<?>>> codecs = this.plan.getLogicalPlan().getAttributes().get(Context.DAGContext.STRING_CODECS); StringCodecs.loadConverters(codecs); }
public void setup(com.datatorrent.api.Context.PortContext context) { pojoType = context.getAttributes().get(Context.PortContext.TUPLE_CLASS); } };
@Override public void setup(PortContext context) { pojoClass = context.getAttributes().get(PortContext.TUPLE_CLASS); streamCodec = getDeduperStreamCodec(); }
@Override public <T> T getValue(Attribute<T> key) { T attr = attributes.get(key); if (attr == null) { return key.defaultValue; } return attr; }
@Override public void setup(PortContext context) { pojoClass = context.getAttributes().get(PortContext.TUPLE_CLASS); streamCodec = getDeduperStreamCodec(); }
@Override public <T> T getValue(Attribute<T> key) { T attr = contextAttributes.get(key); if (attr == null) { return key.defaultValue; } return attr; }
@Override public <T> T getValue(Attribute<T> key) { T get = contextAttributes.get(key); if (get == null) { return key.defaultValue; } return get; }
@Override public <T> T getValue(Attribute<T> key) { T get = contextAttributes.get(key); if (get == null) { return key.defaultValue; } return get; }
@Override public <T> T getValue(Attribute<T> key) { T attr = attributeMap.get(key); return attr != null ? attr : key.defaultValue; }
@Override public <T> T getValue(Attribute<T> key) { T val = attributes.get(key); if (val == null) { return key.defaultValue; } return val; }
private void init() { Map<Class<?>, Class<? extends StringCodec<?>>> codecs = logicalPlan.getAttributes().get(DAGContext.STRING_CODECS); if (codecs != null) { StringCodecs.loadConverters(codecs); } }