本文整理汇总了Java中cascading.tuple.Fields.ALL属性的典型用法代码示例。如果您正苦于以下问题:Java Fields.ALL属性的具体用法?Java Fields.ALL怎么用?Java Fields.ALL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类cascading.tuple.Fields
的用法示例。
在下文中一共展示了Fields.ALL属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SchemaIntersection
public SchemaIntersection(MessageType fileSchema, Fields requestedFields) {
if(requestedFields == Fields.UNKNOWN)
requestedFields = Fields.ALL;
Fields newFields = Fields.NONE;
List<Type> newSchemaFields = new ArrayList<Type>();
int schemaSize = fileSchema.getFieldCount();
for (int i = 0; i < schemaSize; i++) {
Type type = fileSchema.getType(i);
Fields name = new Fields(type.getName());
if(requestedFields.contains(name)) {
newFields = newFields.append(name);
newSchemaFields.add(type);
}
}
this.sourceFields = newFields;
this.requestedSchema = new MessageType(fileSchema.getName(), newSchemaFields);
}
示例2: getRequestedFields
static protected Fields getRequestedFields(Configuration configuration) {
String fieldsString = configuration.get(PARQUET_CASCADING_REQUESTED_FIELDS);
if(fieldsString == null)
return Fields.ALL;
String[] parts = StringUtils.split(fieldsString, ":");
if(parts.length == 0)
return Fields.ALL;
else
return new Fields(parts);
}
示例3: withFields
/**
* Specifies that the returned results be restricted to the specified {@link Fields}.
*/
public Data withFields(Fields... fields) {
if (fields != null && fields.length > 0) {
for (Fields fieldsElement : fields) {
// this check seems unnecessary, but Fields.merge() doesn't seem to handle this case
if (fieldsElement == Fields.ALL) {
withFields = Fields.ALL;
return this;
}
}
withFields = Fields.merge(fields);
}
return this;
}
示例4: Bucket
/**
* Create a sink tap that will accept any incoming fields.
*/
public Bucket() {
super(new TupleScheme(Fields.UNKNOWN, Fields.ALL));
this.flow = null;
output = new ArrayList<Tuple>();
id = getClass().getSimpleName() + ":" + UUID.randomUUID().toString();
modified();
}