當前位置: 首頁>>代碼示例>>Java>>正文


Java Projection類代碼示例

本文整理匯總了Java中org.apache.flink.api.java.operators.ProjectOperator.Projection的典型用法代碼示例。如果您正苦於以下問題:Java Projection類的具體用法?Java Projection怎麽用?Java Projection使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Projection類屬於org.apache.flink.api.java.operators.ProjectOperator包,在下文中一共展示了Projection類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: project

import org.apache.flink.api.java.operators.ProjectOperator.Projection; //導入依賴的package包/類
/**
 * Applies a Project transformation on a {@link Tuple} {@link DataSet}.
 *
 * <p><b>Note: Only Tuple DataSets can be projected using field indexes.</b>
 *
 * <p>The transformation projects each Tuple of the DataSet onto a (sub)set of fields.
 *
 * <p>Additional fields can be added to the projection by calling {@link ProjectOperator#project(int[])}.
 *
 * <b>Note: With the current implementation, the Project transformation looses type information.</b>
 *
 * @param fieldIndexes The field indexes of the input tuple that are retained.
 * 					   The order of fields in the output tuple corresponds to the order of field indexes.
 * @return A ProjectOperator that represents the projected DataSet.
 *
 * @see Tuple
 * @see DataSet
 * @see ProjectOperator
 */
public <OUT extends Tuple> ProjectOperator<?, OUT> project(int... fieldIndexes) {
	return new Projection<>(this, fieldIndexes).projectTupleX();
}
 
開發者ID:axbaretto,項目名稱:flink,代碼行數:23,代碼來源:DataSet.java

示例2: project

import org.apache.flink.api.java.operators.ProjectOperator.Projection; //導入依賴的package包/類
/**
 * Initiates a Project transformation on a {@link Tuple} {@link DataSet}.<br/>
 * <b>Note: Only Tuple DataSets can be projected.</b></br>
 * The transformation projects each Tuple of the DataSet onto a (sub)set of fields.</br>
 * This method returns a {@link Projection} on which {@link Projection#types(Class)} needs to
 *   be called to completed the transformation.
 * 
 * @param fieldIndexes The field indexes of the input tuples that are retained.
 * 					   The order of fields in the output tuple corresponds to the order of field indexes.
 * @return A Projection that needs to be converted into a {@link org.apache.flink.api.java.operators.ProjectOperator} to complete the 
 *           Project transformation by calling {@link Projection#types(Class)}.
 * 
 * @see Tuple
 * @see DataSet
 * @see Projection
 * @see org.apache.flink.api.java.operators.ProjectOperator
 */
public Projection<T> project(int... fieldIndexes) {
	return new Projection<T>(this, fieldIndexes);
}
 
開發者ID:citlab,項目名稱:vs.msc.ws14,代碼行數:21,代碼來源:DataSet.java


注:本文中的org.apache.flink.api.java.operators.ProjectOperator.Projection類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。