本文整理了Java中org.apache.pig.ResourceSchema.fieldNames
方法的一些代码示例,展示了ResourceSchema.fieldNames
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ResourceSchema.fieldNames
方法的具体详情如下:
包路径:org.apache.pig.ResourceSchema
类名称:ResourceSchema
方法名:fieldNames
[英]Get all field names.
[中]获取所有字段名。
代码示例来源:origin: infochimps-labs/wonderdog
/**
Check that schema is reasonable and serialize the field names as a string for later use.
*/
@Override
public void checkSchema(ResourceSchema s) throws IOException {
UDFContext context = UDFContext.getUDFContext();
Properties property = context.getUDFProperties(ResourceSchema.class);
String fieldNames = "";
for (String field : s.fieldNames()) {
fieldNames += field;
fieldNames += COMMA;
}
property.setProperty(PIG_ES_FIELD_NAMES, fieldNames);
}
代码示例来源:origin: infochimps-labs/wonderdog
/**
Here we set the field names for a given tuple even if we
*/
@Override
public void checkSchema(ResourceSchema s) throws IOException {
UDFContext context = UDFContext.getUDFContext();
Properties property = context.getUDFProperties(ResourceSchema.class);
String fieldNames = "";
for (String field : s.fieldNames()) {
fieldNames += field;
fieldNames += COMMA;
}
property.setProperty(PIG_ES_FIELD_NAMES, fieldNames);
}
代码示例来源:origin: org.apache.pig/pig
OutputStream os = headerFilePath.create();
try {
String[] names = schema.fieldNames();
String fn;
for (int i=0; i < names.length; i++) {
内容来源于网络,如有侵权,请联系作者删除!