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


Java Order.NONE属性代码示例

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


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

示例1: matchesOrderedPartitioning

public boolean matchesOrderedPartitioning(Ordering o) {
	if (this.partitioning == PartitioningProperty.RANGE_PARTITIONED) {
		if (this.ordering.getNumberOfFields() > o.getNumberOfFields()) {
			return false;
		}
		
		for (int i = 0; i < this.ordering.getNumberOfFields(); i++) {
			if (!this.ordering.getFieldNumber(i).equals(o.getFieldNumber(i))) {
				return false;
			}
			
			// if this one request no order, everything is good
			final Order oo = o.getOrder(i);
			final Order to = this.ordering.getOrder(i);
			if (oo != Order.NONE) {
				if (oo == Order.ANY) {
					// if any order is requested, any not NONE order is good
					if (to == Order.NONE) {
						return false;
					}
				} else if (oo != to) {
					// the orders must be equal
					return false;
				}
			}
		}
		return true;
	} else {
		return false;
	}
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:31,代码来源:GlobalProperties.java

示例2: PythonOperationInfo

public PythonOperationInfo(PythonPlanStreamer streamer, int environmentID) throws IOException {
	identifier = (String) streamer.getRecord();
	parentID = (Integer) streamer.getRecord(true);
	otherID = (Integer) streamer.getRecord(true);
	field = "f0.f" + (Integer) streamer.getRecord(true);
	int encodedOrder = (Integer) streamer.getRecord(true);
	switch (encodedOrder) {
		case 0:
			order = Order.NONE;
			break;
		case 1:
			order = Order.ASCENDING;
			break;
		case 2:
			order = Order.DESCENDING;
			break;
		case 3:
			order = Order.ANY;
			break;
		default:
			order = Order.NONE;
			break;
	}
	keys = normalizeKeys(streamer.getRecord(true));
	keys1 = normalizeKeys(streamer.getRecord(true));
	keys2 = normalizeKeys(streamer.getRecord(true));
	Object tmpType = streamer.getRecord();
	types = tmpType == null ? null : getForObject(tmpType);
	usesUDF = (Boolean) streamer.getRecord();
	name = (String) streamer.getRecord();
	lineDelimiter = (String) streamer.getRecord();
	fieldDelimiter = (String) streamer.getRecord();
	writeMode = ((Integer) streamer.getRecord(true)) == 1
		? WriteMode.OVERWRITE
		: WriteMode.NO_OVERWRITE;
	path = (String) streamer.getRecord();
	frm = (Long) streamer.getRecord();
	to = (Long) streamer.getRecord();
	setID = (Integer) streamer.getRecord(true);
	toError = (Boolean) streamer.getRecord();
	count = (Integer) streamer.getRecord(true);
	int valueCount = (Integer) streamer.getRecord(true);
	values = new Object[valueCount];
	for (int x = 0; x < valueCount; x++) {
		values[x] = streamer.getRecord();
	}
	parallelism = (Integer) streamer.getRecord(true);

	envID = environmentID;
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:50,代码来源:PythonOperationInfo.java


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