本文整理汇总了Java中cascading.tuple.Fields.merge方法的典型用法代码示例。如果您正苦于以下问题:Java Fields.merge方法的具体用法?Java Fields.merge怎么用?Java Fields.merge使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cascading.tuple.Fields
的用法示例。
在下文中一共展示了Fields.merge方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: RedisScheme
import cascading.tuple.Fields; //导入方法依赖的package包/类
public RedisScheme(Fields keyFields, Fields valueFields, String command, String keyDelimiter, String valueDelimiter) {
super(Fields.merge(keyFields, valueFields));
this.keyFields = keyFields;
this.valueFields = valueFields;
this.command = command;
this.keyDelimiter = keyDelimiter;
this.valueDelimiter = valueDelimiter;
logger.debug("Created {}", this);
}
示例2: orderBy
import cascading.tuple.Fields; //导入方法依赖的package包/类
/**
* Specifies that the returned results be ordered by the specified {@link Fields}. Assume natural ordering of the
* input types.
*/
public Data orderBy(Fields... fields) {
if (fields != null && fields.length > 0) {
sortFields = Fields.merge(fields);
}
return this;
}
示例3: withFields
import cascading.tuple.Fields; //导入方法依赖的package包/类
/**
* 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: withFields
import cascading.tuple.Fields; //导入方法依赖的package包/类
/**
* Defines a subset of fields so that you can modify a smaller, pertinent collection of field values with
* {@link #addTuple(Object...)}.
*/
public DataBuilder withFields(Fields... fields) {
Fields fieldMask = Fields.merge(fields);
try {
this.fields.select(fieldMask);
this.fieldMask = fieldMask;
} catch (FieldsResolverException e) {
throw new IllegalArgumentException("selected fields must be contained in record fields: selected fields="
+ fieldMask + ", source fields=" + this.fields);
}
return this;
}
示例5: withFields
import cascading.tuple.Fields; //导入方法依赖的package包/类
public Builder<C> withFields(Fields... fields) {
Fields fieldMask = Fields.merge(fields);
try {
this.fields.select(fieldMask);
this.fieldMask = fieldMask;
} catch (FieldsResolverException e) {
throw new IllegalArgumentException("selected fields must be contained in record fields: selected fields="
+ fieldMask + ", source fields=" + this.fields);
}
return this;
}
示例6: getSinkFields
import cascading.tuple.Fields; //导入方法依赖的package包/类
public Fields getSinkFields() {
if (pathFields == null || scheme.getSinkFields().isAll())
return scheme.getSinkFields();
return Fields.merge(scheme.getSinkFields(), pathFields);
}