当前位置: 首页>>代码示例>>Java>>正文


Java TypeDescription.fromString方法代码示例

本文整理汇总了Java中org.apache.orc.TypeDescription.fromString方法的典型用法代码示例。如果您正苦于以下问题:Java TypeDescription.fromString方法的具体用法?Java TypeDescription.fromString怎么用?Java TypeDescription.fromString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.orc.TypeDescription的用法示例。


在下文中一共展示了TypeDescription.fromString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: readObject

import org.apache.orc.TypeDescription; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
	batchSize = in.readInt();
	org.apache.hadoop.conf.Configuration configuration = new org.apache.hadoop.conf.Configuration();
	configuration.readFields(in);

	if (this.conf == null) {
		this.conf = configuration;
	}
	this.schema = TypeDescription.fromString(in.readUTF());

	this.selectedFields = new int[in.readInt()];
	for (int i = 0; i < selectedFields.length; i++) {
		this.selectedFields[i] = in.readInt();
	}

	this.conjunctPredicates = new ArrayList<>();
	int numPreds = in.readInt();
	for (int i = 0; i < numPreds; i++) {
		conjunctPredicates.add((Predicate) in.readObject());
	}
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:23,代码来源:OrcRowInputFormat.java

示例2: setSchemas

import org.apache.orc.TypeDescription; //导入方法依赖的package包/类
/**
 * This method is used for fetching all ORC schemas from config
 * 
 * @param config
 */
private void setSchemas(SecorConfig config) {
    Map<String, String> schemaPerTopic = config.getORCMessageSchema();
    for (Entry<String, String> entry : schemaPerTopic.entrySet()) {
        String topic = entry.getKey();
        TypeDescription schema = TypeDescription.fromString(entry
                .getValue());
        topicToSchemaMap.put(topic, schema);
        // If common schema is given
        if ("*".equals(topic)) {
            schemaForAlltopic = schema;
        }
    }
}
 
开发者ID:pinterest,项目名称:secor,代码行数:19,代码来源:DefaultORCSchemaProvider.java

示例3: forOrcSchema

import org.apache.orc.TypeDescription; //导入方法依赖的package包/类
/**
 * Sets the ORC schema of the files to read as a String.
 *
 * @param orcSchema The ORC schema of the files to read as a String.
 * @return The builder.
 */
public Builder forOrcSchema(String orcSchema) {
	Preconditions.checkNotNull(orcSchema, "ORC schema must not be null.");
	this.schema = TypeDescription.fromString(orcSchema);
	return this;
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:12,代码来源:OrcTableSource.java

示例4: OrcRowInputFormat

import org.apache.orc.TypeDescription; //导入方法依赖的package包/类
/**
 * Creates an OrcRowInputFormat.
 *
 * @param path The path to read ORC files from.
 * @param schemaString The schema of the ORC files as String.
 * @param orcConfig The configuration to read the ORC files with.
 */
public OrcRowInputFormat(String path, String schemaString, Configuration orcConfig) {
	this(path, TypeDescription.fromString(schemaString), orcConfig, DEFAULT_BATCH_SIZE);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:11,代码来源:OrcRowInputFormat.java


注:本文中的org.apache.orc.TypeDescription.fromString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。